add formatting guidelines
5. Do the work, write good commit messages, push your branch to the forked repository:
- ```
+ ```bash
git add <modified file>
git commit -m <meaningful description>
git push --set-upstream origin <branch-name>
## Guidelines
- Use same style and formatting as rest of code.
- - For the Android code you can run:
- 1. `./gradlew checkStyle` --> returns java files with incorrect style.
- 2. `./gradlew applyStyle` --> applies neccessary style changes to all java files.
- - For the Arduino and Python code, just try to blend in.
+ - For the Java (Android) and Python code see [below](#Formatting).
+ - For any other code, just try to blend in.
- Update documentation associated with code changes you made.
- If you want to include 3rd party dependencies, please discuss this in the issue first.
- Pull requests should implement single features with as few changes as possible.
- Rebase/merge master into your branch before you submit the pull request.
- If possible, test your code on Windows, Linux and OSX.
+## Formatting
+
+### Java
+
+We use a gradle script for formatting java code. Make sure you are in the `android` directory.
+
+You can check your code with:
+
+```bash
+./gradlew checkStyle
+```
+
+You can apply the style to all files by running:
+
+```bash
+./gradlew applyStyle
+```
+
+### Python
+
+We use [black](https://pypi.org/project/black/) for formatting python code.
+
+You can check your code in the current directory with:
+
+```bash
+black --check .
+```
+
+You can apply the style to all files in the current directory by running:
+
+```bash
+black .
+```
+
+## Further resources
If you are looking for more information about contributing to open-source projects, here are two good references:
