You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: DEVELOPMENT_GUIDE.rst
+17-2Lines changed: 17 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,8 +26,23 @@ Setup Python locally using `pyenv`_
26
26
#. ``pyenv install 2.7.14``
27
27
#. Make the Python version available in the project: ``pyenv local 2.7.14``
28
28
29
+
2. Install Additional Tooling
30
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31
+
1. Black
32
+
~~~~~~~~
33
+
We format our code using [Black](https://github.com/python/black) and verify the source code is black compliant
34
+
in Appveyor during PRs. You can find installation instructions on [Black's docs](https://black.readthedocs.io/en/stable/installation_and_usage.html).
29
35
30
-
2. Activate Virtualenv
36
+
After installing, you can run our formatting through our Makefile by `make black-format` or integrating Black directly in your favorite IDE (instructions
37
+
can be found [here](https://black.readthedocs.io/en/stable/editor_integration.html))
38
+
39
+
Pre-commit
40
+
~~~~~~~~~~
41
+
If you don't wish to manually run black on each pr or install black manually, we have integrated black into git hooks through [pre-commit](https://pre-commit.com/).
42
+
After installing pre-commit, run `pre-commit install` in the root of the project. This will install black for you and run the black formatting on
43
+
commit.
44
+
45
+
3. Activate Virtualenv
31
46
~~~~~~~~~~~~~~~~~~~~~~
32
47
Virtualenv allows you to install required libraries outside of the Python installation. A good practice is to setup
33
48
a different virtualenv for each project. `pyenv`_ comes with a handy plugin that can create virtualenv.
@@ -37,7 +52,7 @@ a different virtualenv for each project. `pyenv`_ comes with a handy plugin that
37
52
#. [Optional] Automatically activate the virtualenv in for this folder: ``pyenv local samtranslator27``
38
53
39
54
40
-
3. Install dependencies
55
+
4. Install dependencies
41
56
~~~~~~~~~~~~~~~~~~~~~~~
42
57
Install dependencies by running the following command. Make sure the Virtualenv you created above is active.
0 commit comments