Skip to content

Latest commit

 

History

History
106 lines (72 loc) · 2.5 KB

File metadata and controls

106 lines (72 loc) · 2.5 KB

Contributing Guidelines

Pre-commit

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 install

If 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-files

If you want to commit and skip checks

git commit --no-verify -m "some message"

Development

make install  # Install dependencies
make test     # Run tests with coverage
make lint     # Run linting
make format   # Auto-format code

Releasing

Releases are automated via GitHub Actions. To create a new release:

  1. Bump the version in pyproject.toml as part of your PR
  2. Get the PR reviewed and merged to main
  3. 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.

Reporting Bugs/Feature Requests

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.

Repo config

This repo uses the gh CLI extension gh-repo-settings to configure and maintain the repo's settings.

Pull Request Process

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:

Creating a feature

  1. Clone the repo

    git clone git@github.com:ONSDigital/dis-infra-python-logging.git
    cd dis-infra-python-logging
  2. Create a new branch off main

    git switch -c feature/<feature_name>
  3. Make your changes and commit

  4. Push your branch

    git push origin feature/<feature_name>
  5. Create a PR against the main branch

Rebasing

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