Contributing#
Contributions are welcome and encouraged! We ask only that all contributors follow the Zarr Developers Code of Conduct.
Contributing code#
Before opening a PR to contribute code you should check that your changes work by running the test suite locally.
mamba env create -f ci/environment.yml
mamba activate virtualizarr-tests
pre-commit install
# git checkout -b new-feature
python -m pip install -e . --no-deps
python -m pytest ./virtualizarr --run-network-tests --cov=./ --cov-report=xml --verbose
The --run-network-tests
argument is optional - it will run additional tests that require downloading files over the network. Skip this if you want the tests to run faster or you have no internet access.
Contributing documentation#
Whilst the CI will build the updated documentation for each PR, it can also be useful to check that the documentation has rendered as expected by building it locally.
Build the documentation locally#
mamba env create -f ci/doc.yml
mamba activate virtualizarr-docs
python -m pip install -e . # From project's root - needed to generate API docs
cd docs # From project's root
rm -rf generated
make clean
make html
Access the documentation locally#
Open docs/_build/html/index.html
in a web browser (on MacOS you can do this from the terminal using open docs/_build/html/index.html
).
Making a release#
Anyone with commit privileges to the repository can issue a release, and you should feel free to issue a release at any point in time when all the CI tests on main
are passing.
Decide on the release version number for the new release, following the EffVer versioning scheme (e.g., releasing v0.2.0 as the next release after v0.1.0 denotes that “some small effort may be required to make sure this version works for you”).
Write a high-level summary of the changes in this release, and write it into the release notes in
docs/releases.rst
. Create and merge a PR which adds the summary and also changes the release notes to say today’s date and the version number of the new release. Don’t add the blank template for future releases yet.Navigate to the zarr-developers/virtualizarr releases page.
Select ‘Draft a new release’.
Select ‘Choose a tag’, then ‘Create a new tag’
Enter the name for the new tag (i.e. the release version number).
Click ‘Generate Release Notes’ to draft notes based on merged pull requests, and paste the same release summary you wrote earlier at the top.
Edit the draft release notes for consistency.
Select ‘Publish’ to publish the release. This should automatically upload the new release to PyPI and conda-forge.
Check that this has run successfully (PyPI should show the new version number very quickly, but conda-forge might take several hours).
Create and merge a PR to add a new empty section to the
docs/releases.rst
for the next release in the future.(Optional) Advertise the release on social media 📣