Library for parsing webhook payloads from popular git forges
We welcome all contributions. If you plan to submit a pull request with changes, you should run the automated tests to check for issues.
This project includes a nox
configuration to automate tests, checks, and other functions.
You can use these automated tests to help you verify changes before you submit a PR.
-
Install
nox
usingpython3 -m pip install nox
or your distribution's package manager. -
Execute
nox
from the repository root with no arguments to run all Python code checkers. -
Alternatively, you can run only certain tasks as outlined in the following sections. Run
nox --list
to view available sessions.
-
Perform static analysis with ruff.
nox -s static
-
Reformat code with black and isort.
nox -s formatters
-
Check code for formatting issues without applying changes.
nox -s formatters_check
-
Perform static type checking with mypy.
nox -s typing
nox
sessions use dependencies from requirements files in the requirements/
directory.
Each session has a requirements/*.in
file with direct dependencies and a lock file in requirements/*.txt
that pins exact versions for both direct and transitive dependencies.
-
Use the following
nox
session to update all dependency lock files:nox -s pip-compile
-
Update specific dependency lock files with individual
nox
sessions, for example:nox -s "pip-compile-3.12(formatters)"
By default, the nox
sessions upgrade dependencies.
You can pass pip-compile
options --no-upgrade
and --upgrade-package
to update only specific packages and keep other dependencies at their current version.
For example, to upgrade the isort
package only:
nox -s "pip-compile-3.12(formatters)" -- --no-upgrade --upgrade-package=isort