diff options
-rw-r--r-- | .pre-commit-config.yaml | 8 | ||||
-rw-r--r-- | CONTRIBUTING.rst | 10 | ||||
-rw-r--r-- | requirements/README.md | 6 | ||||
-rw-r--r-- | requirements/developer.txt | 2 |
4 files changed, 21 insertions, 5 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..059fe70f --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,8 @@ +# Install pre-commit hooks via +# pre-commit install + +repos: +- repo: https://github.com/ambv/black + rev: stable + hooks: + - id: black diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index b8c3edc1..292fd113 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -48,7 +48,11 @@ Contributor Guide system. To ensure you have a properly-configured development environment for running the tests, see `Build environment setup`_. -4. To submit your contribution: +4. Format your code: + + * We use psf/black to format Python code. + +5. To submit your contribution: * Push your changes back to your fork on GitHub:: @@ -65,7 +69,7 @@ For a more detailed discussion, read these :doc:`detailed documents <gitwash/index>` on how to use Git with ``networkx`` (`<https://networkx.github.io/documentation/latest/developer/gitwash/index.html>`_). -5. Review process: +6. Review process: * Reviewers (the other developers and interested community members) will write inline and/or general comments on your Pull Request (PR) to help @@ -95,7 +99,7 @@ For a more detailed discussion, read these :doc:`detailed documents If closing a bug, also add "Fixes #1480" where 1480 is the issue number. -6. Document changes +7. Document changes If your change introduces any API modifications, please update ``doc/release/release_dev.rst``. diff --git a/requirements/README.md b/requirements/README.md index 737d9329..ee23aa30 100644 --- a/requirements/README.md +++ b/requirements/README.md @@ -5,13 +5,15 @@ - [`default.txt`](default.txt) Default requirements - [`optional.txt`](optional.txt) - Optional requirements that are easy to install. + Optional requirements that are easy to install - [`extras.txt`](extras.txt) - Optional requirements that may require extra steps to install. + Optional requirements that may require extra steps to install - [`test.txt`](test.txt) Requirements for running test suite - [`doc.txt`](doc.txt) Requirements for building the documentation (see `../doc/`) +- [`developer.txt`](developer.txt) + Requirements for developers - [`release.txt`](release.txt) Requirements for making releases diff --git a/requirements/developer.txt b/requirements/developer.txt new file mode 100644 index 00000000..81fc38ce --- /dev/null +++ b/requirements/developer.txt @@ -0,0 +1,2 @@ +black +pre-commit |