We encourage the use of pre-commit locally, this reduces the amount of common
mistakes and engineers can just focus on reviewing the actual changes.
# Install pre-commit
brew install pre-commit
# This will enable pre-commit to run every time you git commit
pre-commit installIf you want to do an adhoc run of pre-commit
Warning
This will only run on files that are staged in git
pre-commit run --all-filesIf you want to commit and skip checks
git commit --no-verify -m "some message"make install # Install dependencies
make test # Run tests with coverage
make lint # Run linting
make format # Auto-format codeReleases are automated via GitHub Actions. To create a new release:
- Bump the
versioninpyproject.tomlas part of your PR - Get the PR reviewed and merged to
main - The release workflow detects the version change and automatically creates a GitHub Release with auto-generated notes
The version in pyproject.toml is the single source of truth.
We welcome you to use the GitHub issue tracker to report bugs or suggest features.
When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already reported the issue. Please try to include as much information as you can.
This repo uses the gh CLI extension gh-repo-settings to configure and maintain the repo's settings.
When contributing to this repository, please first discuss the change you wish to make via issue, slack, or any other method with the owners of this repository before making a change.
We use Trunk-Based Development (TBD), please adhere to the following:
-
Clone the repo
git clone git@github.com:ONSDigital/dis-infra-python-logging.git cd dis-infra-python-logging -
Create a new branch off
maingit switch -c feature/<feature_name>
-
Make your changes and commit
-
Push your branch
git push origin feature/<feature_name>
-
Create a PR against the
mainbranch
Rebasing is heavily encouraged using TBD as all history needs to be linear
git switch main
git pull --rebase origin main
git switch feature/<feature_name>
git rebase main
git push origin feature/<feature_name> --force-with-lease