Skip to content

Commit

Permalink
Document pre-commit & code style (#106)
Browse files Browse the repository at this point in the history
* Update README with information about pre-commit (and move the bleeding edge releases documentation)

* Document .git-blame-ignore-revs

* Add dotnet-format to .git-blame-ignore-revs

* Add black to .git-blame-ignore-revs

* Move contributing instructions to CONTRIBUTING.md

* Add Scoop instructions
  • Loading branch information
mikeage authored Apr 19, 2021
1 parent db1a649 commit 8bf5d79
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fbe9985b182e64aa110aef3f8d4336887550ff8f
eba58b2225c2d33e091b4c584904418d82853092
30 changes: 29 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
# Development / Contributing

## Coding Style
While the original Tilt Brush used a Google code style, Open Brush follows standard C# and Python conventions for formatting, indentation, etc. To reduce the work required by contributors, we use the [pre-commit](https://pre-commit.com) python package and git hook to automatically run some syntax checking and formatting prior to commits. Similarly, all Pull Requests use pre-commit to check that these rules are followed. To have your code automatically checked, please run the following (you will need python 3.5+ installed):
```bash
pip install pre-commit # This installs the pre-commit packages.
pre-commit install # This installs the hook in your repo / clone.
dotnet tool install -g dotnet-format # This needs to be installed manually; all other checks will be downloaded automatically.
git commit ...
# If any formatting was done, you'll need to rerun the git commit command with the newly-modified file
```
If you already made any commits without having the pre-commit hook installed, you can manually run the checkers / formatters via `pre-commit run -a`. If any changes are made, please commit them.

If you use Windows, you may want to use [Scoop](https://scoop.sh) to easily install python and dotnet. After installing the Scoop installer, simply run `scoop install dotnet dotnet-sdk python`.

There is also an extensive `.editorconfig` file which will configure many editors' formatting tools properly.

## Git history
As the addition of the coding style above changed almost every single file, you may want to ignore these changes when looking at `git blame`. You can do this by running:
```bash
git config blame.ignoreRevsFile .git-blame-ignore-revs
```
within your clone. The `.git-blame-ignore-revs` file lists the (squashed) commits in which only formatting changes were made, and which should be ignored by git by default. Unfortunately, the Github UI does not support the use of this file.

---

# Tilt Brush CONTRIBUTING

# How to Contribute

We encourage you to fork the repository; this repository does not currently
Expand Down Expand Up @@ -30,4 +58,4 @@ information on using pull requests.
## Community Guidelines

This project follows
[Google's Open Source Community Guidelines](https://opensource.google/conduct/).
[Google's Open Source Community Guidelines](https://opensource.google/conduct/).
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ See our [Trello](https://trello.com/b/jItetqYe/open-brush) board for more inform
* [SiMonk0](http://www.furjandesign.com/) for the great new logo!
* The [SideQuest](https://sidequestvr.com/) team for your support.

## Bleeding Edge Releases

Instead of waiting for a formal release, you can download a ZIP from Github containing an automatically built release for either Windows (SteamVR) or Oculus Quest / Quest 2 from the [Github releases page](https://github.com/icosa-gallery/open-brush/releases). Versions of the form "vX.Y.0" are official releases, whereas versions that do not end in .0 are made available for testing purposes only, with no guarantees as to their quality. Additionally, these releases are marked as "pre-release". However, if you'd like to test a recent change prior to the official release, you can use these either in place of or in parallel with the formal Open Brush releases.

These builds share a save location with the official Open Brush release, but can be installed alongside the formal version. The Oculus build, like all sideloaded content, will be listed in "Unknown Sources", and will have the word "Github" appended to the name (with a different package name as well) to differentiate it from the official release).

Note that the "experimental" builds contain experimental brushes, and sketches created using the experimental brushes may appear differently when loaded in the official build of Open Brush!

In addition, there are also versions created for Linux (SteamVR and Monoscopic), OS X (Monoscopic only), and Windows Monoscopic that are listed as "Artifacts" of the Github Actions, however, these are intended only for developers, and should not be used by general users. You can find them by browsing to the [commit list](https://github.com/icosa-gallery/open-brush/commits/main), and then clicking on the green check mark below the title (next to the XXX committed XXX ago), and scroll to the build you want, and click on **Details**. Then, towards the upper right corner, click on **Artifacts (6)** and click on the name of the build. Unzip the downloaded file, and either run the executable (Desktop SteamVR/Monoscopic) or install the apk (Android Oculus) using `adb install com.Icosa.OpenBrush-github.apk`. Note that if you download a Mac OS X build, you'll need to run `xattr -d com.apple.quarantine /path/to/OpenBrush-github.app` prior to be able to launch the app, as it is not signed with Apple developer keys.
---

# Tilt Brush README
Expand Down Expand Up @@ -400,13 +409,3 @@ executable.

Experimental brushes and environments are located in the `Assets/Resources/X`
folder. They are not included in non-experimental builds.

## Bleeding Edge Releases

Instead of waiting for a formal release, you can download a ZIP from Github containing an automatically built release for either Windows (SteamVR) or Oculus Quest / Quest 2 from the [Github releases page](https://github.com/icosa-gallery/open-brush/releases). Versions of the form "vX.Y.0" are official releases, whereas versions that do not end in .0 are made available for testing purposes only, with no guarantees as to their quality. Additionally, these releases are marked as "pre-release". However, if you'd like to test a recent change prior to the official release, you can use these either in place of or in parallel with the formal Open Brush releases.

These builds share a save location with the official Open Brush release, but can be installed alongside the formal version. The Oculus build, like all sideloaded content, will be listed in "Unknown Sources", and will have the word "Github" appended to the name (with a different package name as well) to differentiate it from the official release).

Note that the "experimental" builds contain experimental brushes, and sketches created using the experimental brushes may appear differently when loaded in the official build of Open Brush!

In addition, there are also versions created for Linux (SteamVR and Monoscopic), OS X (Monoscopic only), and Windows Monoscopic that are listed as "Artifacts" of the Github Actions, however, these are intended only for developers, and should not be used by general users. You can find them by browsing to the [commit list](https://github.com/icosa-gallery/open-brush/commits/main), and then clicking on the green check mark below the title (next to the XXX committed XXX ago), and scroll to the build you want, and click on **Details**. Then, towards the upper right corner, click on **Artifacts (6)** and click on the name of the build. Unzip the downloaded file, and either run the executable (Desktop SteamVR/Monoscopic) or install the apk (Android Oculus) using `adb install com.Icosa.OpenBrush-github.apk`. Note that if you download a Mac OS X build, you'll need to run `xattr -d com.apple.quarantine /path/to/OpenBrush-github.app` prior to be able to launch the app, as it is not signed with Apple developer keys.

0 comments on commit 8bf5d79

Please sign in to comment.