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.
CacheControl's only external development requirement is Python 3.7 or newer.
First, clone this repository:
git clone https://github.com/psf/cachecontrol
cd cachecontrolThen, bootstrap your local development environment:
make bootstrap
# OPTIONAL: enter the new environment, if you'd like to run things directly
source .venv/bin/activateOnce 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.
You can run the current formatters with:
make formatYou can run the unit tests locally with:
# run the test suite in the current environment
make testYou can build the Sphinx-based documentation with:
# puts the generated HTML in docs/_build/html/
make docNOTE: 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:
-
Update
CacheControl'sversionattribute. It can be found in thepyproject.tomlfile, under the[project]section. -
Create a new tag corresponding to your new version, with a
vprefix. For example:# IMPORTANT: don't forget the `v` prefix! git tag v1.2.3 -
Push your changes to
masterand to the new remote tag. -
Create, save, and publish a GitHub release for your new tag, including any
CHANGELOGentries.