This release is a pre-release and may not be stable for production use.
xwmt
xWMT is a Python package that provides a framework for calculating water mass tranformations in an xarray-based environment.
Quick Start Guide
Minimal installation within an existing environment
conda install -c conda-forge xwmt
Installing from scratch using conda
This is the recommended mode of installation for developers.
git clone git@github.com:NOAA-GFDL/xwmt.git
cd xwmt
conda env create -f docs/environment.yml
conda activate docs_env_xwmt
pip install -e .
You can verify that the package was properly installed by confirming it passes all of the tests with:
pytest -v
You can launch a Jupyterlab instance using this environment with:
python -m ipykernel install --user --name docs_env_xwmt --display-name "docs_env_xwmt"
jupyter-lab
Releasing
The git tag is the version. xwmt has no version string checked into the
source tree: hatch-vcs derives it from the tag at build time and writes
xwmt/_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 upstream/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 Upload Python Package 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/xwmt/.
- conda-forge builds from the PyPI sdist and lags by design; the autotick bot
opens the version-bump PR. The feedstock recipe must list
hatch-vcsalongsidehatchlingin itshostrequirements, 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 — xwmt/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 xwmt 0.3.0rc1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| xwmt-0.3.0rc1.tar.gz | 91.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| xwmt-0.3.0rc1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 174.5 kB
Release files / xwmt-0.3.0rc1.tar.gz
| Download URL | xwmt-0.3.0rc1.tar.gz |
|---|---|
| Size | 91.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2464a9b90427bd67caf70f88e3efc273a12c76cf1ae0bab281d54839d88251dd
|
|
BLAKE2b-256 checksum How to use checksums |
8f4c0855efa351961b68ea624855abb292451d9137556522fed0a4ea081174e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / xwmt-0.3.0rc1-py3-none-any.whl
| Download URL | xwmt-0.3.0rc1-py3-none-any.whl |
|---|---|
| Size | 83.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ff4d57b6ad0cf5e63c5eba658b5644c8b07382b438eb3ef411168599190b240b
|
|
BLAKE2b-256 checksum How to use checksums |
36a3d249e408a636f15a160d9719aab5f2fb3e0663e612b232a3aeaa739c193b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|