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: CONTRIBUTING.md
+7-4
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@
10
10
11
11
2. Initialize the pre-commit hooks
12
12
13
-
Please initialize the pre-commit hooks, which will automatically run the linters (check for code errors) and formatting (with blakc) before each commit.
13
+
Please initialize the pre-commit hooks, which will automatically run the flake8 linter (check for code errors) and formatting (with blakc) before each commit.
14
14
15
15
```bash
16
16
pre-commit install
@@ -24,18 +24,21 @@
24
24
git checkout -b <branch-name>
25
25
```
26
26
27
-
4. Make your changes
27
+
4. Make your changes, format your code, and run the tests
28
28
29
-
Make your changes.
29
+
Make your changes (VSCode is strongly recommended as an editor)
30
30
Please, format your code with a formatter (e.g. black).
31
31
If you are using VSCode as your editor, you can install the Python extension, and set the formatter to black ([https://code.visualstudio.com/docs/python/formatting](https://code.visualstudio.com/docs/python/formatting)).
32
-
The pre-commit hooks will automatically run the linters and formatters before each commit, but better to already have the code well formatted before committing.
32
+
The pre-commit hooks will automatically run the linter and formatter before each commit.
33
+
If some code needs to be formatted, the pre-commit hooks stop the commit and format the code. You can then commit again (so better to already have the code well formatted before committing to avoid re-doing the commit).
33
34
Then, make sure that the tests are passing. You can manually run the tests with pytest:
34
35
35
36
```bash
36
37
python -m pytest
37
38
```
38
39
40
+
If you are using VSCode as your editor, you can also install the [Python extension](https://code.visualstudio.com/docs/python/testing), and run the tests from the editor.
41
+
39
42
5. Push your changes to the remote repository
40
43
41
44
Please push your changes to the remote repository, and open a pull request.
0 commit comments