Contributing How-to Guides#
We recommend having already gone over the Contributing overview page before reading the sections below.
Running the test suite locally#
This section covers how to run the test suite locally.
That is, without using
tox (as recommended on the Contributing overview
or triggering CI by opening a pull request on GitHub.
You should follow these steps for example if you want to reproduce and fix a bug
that depends on the NumPy version and therefore need to test
on an environment that has a specific set of dependencies installed.
Install xarray-einstats in editable mode in the desired environment:
pip install -e ".[test,einops,numba]"
This will install xarray-einstats in editable mode together with all optional dependencies and all testing related dependencies.
pytest tests/ --cov --cov-report term
This will run the tests in the tests suite and coverage analysis and print all the results on the terminal.
Making a new release#
Create a new branch
Review the change log (
docs/source/changelog.md). The unreleased section should be updated to the current version and release date and not yet added
Update the version number in
__init__.py. That is, remove the
devflag, it should not be increased.
Rerun the notebooks in
Open a PR, make sure docs build correctly and all tests pass. Once everything is green, merge the PR
Create a new release from GitHub, use as tag the version number prepended by
Post release tasks#
Check the new version appears on the readthedocs version switcher. If it doesn’t go to readthedocs and add it.
Bump the minor version, set the patch version to 0 and add the
devflag. It should look like
0.2.0.dev0. Also add the Unreleased section in the changelog again.
Update the changelog to add the unreleased section back