regionate
A package for creating xgcm-grid consistent regional masks and boundaries, leveraging its sibling package sectionate.
Quick Start Guide
For users: minimal installation within an existing environment
conda install -c conda-forge regionate
For developers: installing from scratch using conda
git clone git@github.com:hdrake/regionate.git
cd regionate
conda env create -f docs/environment.yml
conda activate docs_env_regionate
pip install -e .
python -m ipykernel install --user --name docs_env_regionate --display-name "docs_env_regionate"
jupyter-lab
Releasing
The git tag is the version. regionate has no version string checked into
the source tree: hatch-vcs derives it from the tag at build time and writes
regionate/_version.py (gitignored, but shipped inside the sdist and wheel). To
cut a release you tag; there is no file to bump and nothing to keep in sync.
- Make sure
mainis green and has everything you want in the release. - Publish a GitHub Release whose tag is
vX.Y.Z, targeting the commit you want to ship:gh release create vX.Y.Z --target "$(git rev-parse origin/main)" \ --title vX.Y.Z --generate-notes
Publishing it (not merely pushing a tag) is what fires the workflow. Target the commit you actually want: a tag placed before the commit you meant to release builds the previous version, and PyPI rejects it as a duplicate. - The Publish to PyPI workflow builds from that tag and uploads. It checks
out with
fetch-depth: 0so the tag is visible tohatch-vcs, and asserts that the built version matches the tag before publishing. - Verify: https://pypi.org/project/regionate/.
- conda-forge builds from the PyPI sdist and lags by design; the autotick bot
opens the version-bump PR. Its recipe must list
hatch-vcsalongsidehatchlinginhost, since it builds with--no-build-isolation.
Two things follow from the tag being the version. Never add a version literal
back to the tree — regionate/version.py is a shim over the generated file, and
a 0.0.0+unknown from it means the package was imported without being built or
installed, not that a number is missing. And any checkout that installs the
package needs its tags: a shallow clone, or a fork that never fetched them,
resolves a .devN version instead of the release line. That is why CI checks out
with fetch-depth: 0 and Read the Docs unshallows in post_checkout.
Release files for regionate 0.5.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| regionate-0.5.7.tar.gz | 32.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| regionate-0.5.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 61.2 kB
Release files / regionate-0.5.7.tar.gz
| Download URL | regionate-0.5.7.tar.gz |
|---|---|
| Size | 32.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6d2617afd9bcc8b61b2e7cd989d3ceb399e5bb9db957996de49eadb25bcc7e57
|
|
BLAKE2b-256 checksum How to use checksums |
5c049e1dac545094f8dfb9d02ec03bbb4d820aec17410665501c0b1b499b9bd4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / regionate-0.5.7-py3-none-any.whl
| Download URL | regionate-0.5.7-py3-none-any.whl |
|---|---|
| Size | 28.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9b13f4505e0b58f6f2988f836e48b0de0bf86aac4442508fe4bad9b388abacac
|
|
BLAKE2b-256 checksum How to use checksums |
4cefd1833e4001e1770926b4abe8d9a1de10ee87e183e3a843c4f4d3a1cce51d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|