Skip to content

Latest commit

 

History

History
83 lines (54 loc) · 1.85 KB

File metadata and controls

83 lines (54 loc) · 1.85 KB

Contributing to CacheControl

Thank you for your interest in contributing to CacheControl!

The information below will help you set up a local development environment and perform common development tasks.

Requirements

CacheControl's only external development requirement is Python 3.7 or newer.

Development steps

First, clone this repository:

git clone https://github.com/psf/cachecontrol
cd cachecontrol

Then, bootstrap your local development environment:

make bootstrap
# OPTIONAL: enter the new environment, if you'd like to run things directly
source .venv/bin/activate

Once you've run make bootstrap, you can run the other make targets to perform particular tasks.

Any changes you make to the cachecontrol source tree will take effect immediately in the development environment.

Linting

You can run the current formatters with:

make format

Testing

You can run the unit tests locally with:

# run the test suite in the current environment
make test

Documentation

You can build the Sphinx-based documentation with:

# puts the generated HTML in docs/_build/html/
make doc

Releasing

NOTE: If you're a non-maintaining contributor, you don't need the steps here! They're documented for completeness and for onboarding future maintainers.

Releases of CacheControl are managed by GitHub Actions.

To perform a release:

  1. Update CacheControl's version attribute. It can be found in the pyproject.toml file, under the [project] section.

  2. Create a new tag corresponding to your new version, with a v prefix. For example:

    # IMPORTANT: don't forget the `v` prefix!
    git tag v1.2.3
  3. Push your changes to master and to the new remote tag.

  4. Create, save, and publish a GitHub release for your new tag, including any CHANGELOG entries.