-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update dev env instructions in contributor guide
- Loading branch information
Showing
1 changed file
with
23 additions
and
13 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 |
---|---|---|
|
@@ -89,22 +89,32 @@ GitHub Docs. | |
Setting up a development environment | ||
==================================== | ||
|
||
To set up an isolated virtualenv for Darker development, run the test suite and lint | ||
the code base on a Unix-like system:: | ||
To set up an isolated virtualenv for Darker development, modify code in your own branch, | ||
run the test suite and lint modified code on a Unix-like system:: | ||
|
||
git clone [email protected]:akaihola/darker.git | ||
python -m venv .venv-darker | ||
source .venv-darker/bin/activate | ||
cd darker | ||
pip install -e '.[test]' mypy pylint flake8 | ||
pip install -e '.[test]' | ||
git checkout -b my-feature-branch | ||
# modify code | ||
git commit -m "My feature" | ||
pytest | ||
pylint src | ||
mypy . | ||
flake8 src | ||
|
||
Before pushing your commits to a feature branch, it's good to run:: | ||
|
||
darker --isort -L mypy -L pylint -L flake8 -r master... . | ||
|
||
This will fix formatting on modified lines and list any linting errors your changes may | ||
have introduced compared to the branching point of your feature branch from ``master``. | ||
darker | ||
|
||
Darker will fix formatting on modified lines and list any linting errors your changes | ||
may have introduced compared to the branching point of your feature branch from | ||
``master``. | ||
|
||
Darker is configured in ``pyproject.toml`` to do the following on modified lines: | ||
- reformat using Black | ||
- sort imports using isort | ||
- run Flake8 | ||
- run Mypy | ||
- run Pydocstyle | ||
- run Pylint | ||
- run Ruff | ||
|
||
Those tools have also been configured to match the conventions in the Darker code | ||
base. |