-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0c319d9
commit fb1855b
Showing
3 changed files
with
48 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
## Development | ||
|
||
To improve code quality, we use [nox] to run linters, type checkers, unit | ||
tests, documentation and more. We recommend installing nox using [pipx] to have | ||
it available globally. | ||
|
||
```bash | ||
# install | ||
python -m pip install pipx | ||
python -m pipx install nox | ||
|
||
# run all sessions | ||
nox | ||
|
||
# list all sessions | ||
nox -l | ||
|
||
# run individual session | ||
nox -s session_name | ||
|
||
# run individual session (reuse install) | ||
nox -Rs session_name | ||
``` | ||
|
||
Note that the nox sessions create [editable] installs. In case there are issues, | ||
try recreating environments by dropping the `-R` option. If your project is | ||
incompatible with editable installs, adjust the `noxfile.py` to disable them. | ||
|
||
We also provide a [pre-commit][pre] config to autoformat code upon commits. It | ||
can be set up using the following commands: | ||
|
||
```bash | ||
python -m pipx install pre-commit | ||
pre-commit install | ||
``` | ||
|
||
[nox]: https://nox.thea.codes/en/stable/index.html | ||
[pipx]: https://pypa.github.io/pipx/ | ||
[pre]: https://pre-commit.com/ | ||
[editable]: https://setuptools.pypa.io/en/latest/userguide/development_mode.html | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters