1
0
Fork 0

Merging upstream version 2.2.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-07 00:48:48 +01:00
parent ab1302c465
commit 95bca6b33d
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
42 changed files with 1085 additions and 840 deletions

View file

@ -24,9 +24,9 @@ Ready to contribute? Here's how to set up CLI Helpers for local development.
$ pip install virtualenv
$ virtualenv cli_helpers_dev
We've just created a virtual environment that we'll use to install all the dependencies
and tools we need to work on CLI Helpers. Whenever you want to work on CLI Helpers, you
need to activate the virtual environment::
We've just created a virtual environment called ``cli_helpers_dev``
that we'll use to install all the dependencies and tools we need to work on CLI Helpers.
Whenever you want to work on CLI Helpers, you need to activate the virtual environment::
$ source cli_helpers_dev/bin/activate
@ -34,7 +34,7 @@ Ready to contribute? Here's how to set up CLI Helpers for local development.
$ deactivate
5. Install the dependencies and development tools::
5. From within the virtual environment, install the dependencies and development tools::
$ pip install -r requirements-dev.txt
$ pip install --editable .
@ -43,11 +43,14 @@ Ready to contribute? Here's how to set up CLI Helpers for local development.
$ git checkout -b <name-of-bugfix-or-feature> master
7. While you work on your bugfix or feature, be sure to pull the latest changes from ``upstream``. This ensures that your local codebase is up-to-date::
7. While you work on your bugfix or feature, be sure to pull the latest changes from ``upstream``.
This ensures that your local codebase is up-to-date::
$ git pull upstream master
8. When your work is ready for the CLI Helpers team to review it, push your branch to your fork::
8. When your work is ready for the CLI Helpers team to review it,
make sure to add an entry to CHANGELOG file, and add your name to the AUTHORS file.
Then, push your branch to your fork::
$ git push origin <name-of-bugfix-or-feature>
@ -77,18 +80,31 @@ You can also measure CLI Helper's test coverage by running::
Coding Style
------------
CLI Helpers requires code submissions to adhere to
`PEP 8 <https://www.python.org/dev/peps/pep-0008/>`_.
It's easy to check the style of your code, just run::
When you submit a PR, the changeset is checked for pep8 compliance using
`black <https://github.com/psf/black>`_. If you see a build failing because
of these checks, install ``black`` and apply style fixes:
$ pep8radius master
::
If you see any PEP 8 style issues, you can automatically fix them by running::
$ pip install black
$ black .
$ pep8radius master --in-place
Then commit and push the fixes.
Be sure to commit and push any PEP 8 fixes.
To enforce ``black`` applied on every commit, we also suggest installing ``pre-commit`` and
using the ``pre-commit`` hooks available in this repo:
::
$ pip install pre-commit
$ pre-commit install
Git blame
---------
Use ``git blame my_file.py --ignore-revs-file .git-blame-ignore-revs`` to exclude irrelevant commits
(specifically Black) from ``git blame``. For more information,
see `here <https://github.com/psf/black#migrating-your-code-style-without-ruining-git-blame>`_.
Documentation
-------------