From 0e4ffbe46c4f04e9800854f85a9f67ec1bdf9a0f Mon Sep 17 00:00:00 2001 From: Lucas de Sousa Rosa Date: Sun, 10 Dec 2023 12:19:14 -0300 Subject: [PATCH] Update CONTRIBUTING.rst file - Add instructions to setup git-hooks and poetry-bumpversion plugin --- CONTRIBUTING.rst | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index f23ef0d..ba25413 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -66,14 +66,19 @@ Ready to contribute? Here's how to set up `pipreqs` for local development. 3. Pipreqs is developed using Poetry. Refer to the `documentation `_ to install Poetry in your local environment. Next, you should install pipreqs's dependencies:: $ poetry install --with dev + $ poetry self add poetry-bumpversion -4. Create a branch for local development:: +4. Configure `./git-hooks/` directory so that it becomes visible to git hooks:: + + $ git config core.hooksPath .git-hooks + +5. Create a branch for local development:: $ git checkout -b name-of-your-bugfix-or-feature Now you can make your changes locally. -5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox:: +6. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox:: $ poetry run flake8 pipreqs tests $ poetry run python -m unittest discover @@ -81,13 +86,13 @@ Ready to contribute? Here's how to set up `pipreqs` for local development. To test all versions of python using tox you need to have them installed and for this two options are recommended: `pyenv` or `asdf`. -6. Commit your changes and push your branch to GitHub:: +7. Commit your changes and push your branch to GitHub:: $ git add . $ git commit -m "Your detailed description of your changes." $ git push origin name-of-your-bugfix-or-feature -7. Submit a pull request through the GitHub website. +8. Submit a pull request through the GitHub website. Pull Request Guidelines -----------------------