Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ jobs:
run: uv sync --all-extras --all-groups

- name: Run Tests
run: uv run pytest tests --verbose --color=yes --cov=eodc-cf --cov-report term-missing
run: uv run pytest tests --verbose --color=yes --cov=cf-cm-tree --cov-report term-missing
6 changes: 0 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,3 @@ jobs:

- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
#with:
# skip_existing: true
# verbose: true
# verify_metadata: true
#user: __token__
#password: ${{ secrets.PYPI_API_TOKEN }} # this needs to be uploaded to github actions secrets
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: |
gh release create ${{ github.ref_name }} \
--repo ${{ github.repository }} \
--title "eodc-cf - ${{ github.ref_name }}" \
--title "cf-cm-tree - ${{ github.ref_name }}" \
--notes-file release-notes.md \
--fail-on-no-commits \
--draft
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

<!-- insertion marker -->
## [v0.2.2](https://github.com/eodcgmbh/eodc-cf/releases/tag/v0.2.2) - 2026-08-06
## [v1.0.0](https://github.com/eodcgmbh/eodc-cf/releases/tag/v1.0.0) - 2026-08-07

<small>[Compare with 0.2.1](https://github.com/eodcgmbh/eodc-cf/compare/0.2.1...v0.2.2)</small>
<small>[Compare with 0.2.1](https://github.com/eodcgmbh/eodc-cf/compare/0.2.1...v1.0.0)</small>

### Summary

- complete rename of the package from "eodc-cf" to "cf-cm-tree"
- changed "conversions" to "Conversions" attribute
- removed standard_name length restriction
- updated tests, README and docstrings
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# eodc-cf
# cf-cm-tree

Generic and light-weight package to assist CF-compliant dataset creation.

> **GeoZarr note.** `eodc-cf` is a **CF-conventions** helper. It does *not*
> **GeoZarr note.** `cf-cm-tree` is a **CF-conventions** helper. It does *not*
> implement the [GeoZarr](https://geozarr.org) conventions (`geo-proj`,
> `spatial`, `multiscales`). For spec-compliant GeoZarr metadata use
> [`zarr-cm`](https://github.com/zarr-conventions/zarr-cm) (primitives,
Expand All @@ -14,20 +14,20 @@ Generic and light-weight package to assist CF-compliant dataset creation.
# Installation

```bash
pip install git+https://github.com/eodcgmbh/eodc-cf.git
pip install cf-cm-tree
```

## Usage and examples

_eodc-cf_ contains all user-facing classes at its root and a `utils` module, which collects some useful helper functions.
_cf-cm-tree_ contains all user-facing classes at its root and a `utils` module, which collects some useful helper functions.

### Coordinates
In terms of multi-dimensional dataset hierarchy, the `CFCoordinate` class is at the lowest level. It defines some mandatory attributes like `name` and `standard_name`, and optional attributes like `long_name` or `units`. Certain attribute values are validated during class initialisation to ensure that they are CF compliant, e.g., `axis` always needs to have a single uppercase letter.


```python
from pprint import pprint
from eodc_cf import CFCoordinate
from cf_cm_tree import CFCoordinate

cf_coord = CFCoordinate(name="z", standard_name="z_coordinate", axis="Z", units="m")
```
Expand All @@ -46,7 +46,7 @@ There are already some pre-defined coordinate classes available, e.g., `CFXCoord


```python
from eodc_cf import CFXCoordinate
from cf_cm_tree import CFXCoordinate

cf_xcoord = CFXCoordinate(name="x")
pprint(cf_xcoord.attrs)
Expand All @@ -63,7 +63,7 @@ There are two types of data variables, `CFDataVariable` and `CFFlagVariable`. `C


```python
from eodc_cf import CFDataVariable
from cf_cm_tree import CFDataVariable

cf_dvar = CFDataVariable(
name="dem",
Expand All @@ -87,7 +87,7 @@ and here with `CFFlagVariable`:


```python
from eodc_cf import CFFlagVariable
from cf_cm_tree import CFFlagVariable

cf_fvar = CFFlagVariable(
name="qflag",
Expand All @@ -112,7 +112,7 @@ Each data variable can hold a set of coordinates with unique names. Coordinates


```python
from eodc_cf import CFXCoordinate, CFYCoordinate, CFTimeCoordinate
from cf_cm_tree import CFXCoordinate, CFYCoordinate, CFTimeCoordinate

cf_xcoord = CFXCoordinate(name="x")
cf_ycoord = CFYCoordinate(name="y")
Expand Down Expand Up @@ -154,7 +154,7 @@ The `CFDataset` is at the highest level of a multi-dimensional dataset hierarchy


```python
from eodc_cf import CFDataset
from cf_cm_tree import CFDataset

cf_ds = CFDataset(title="my dataset", source="my dataset source", cf_vars=[cf_dvar])
print(len(cf_ds))
Expand Down Expand Up @@ -201,7 +201,7 @@ The `utils` module provides `assign_cf_metadata`, which writes the CF attributes
```python
import numpy as np
import xarray as xr
from eodc_cf.utils import assign_cf_metadata
from cf_cm_tree.utils import assign_cf_metadata

da = xr.DataArray(
np.zeros((2, 2, 2)),
Expand Down Expand Up @@ -232,7 +232,7 @@ pprint(dict(ds["x"].attrs))
# Testing

```bash
cd eodc-cf
cd cf-cm-tree
pytest
```

Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ build-backend = "uv_build"
requires = [ "uv-build>=0.11.2,<0.12" ]

[project]
name = "eodc-cf"
version = "0.2.2"
name = "cf-cm-tree"
version = "1.0.0"
description = "Generic and light-weight package to assist CF-compliant dataset creation"
readme = "README.md"
authors = [ { name = "eodc", email = "claudio.schein-navacchi@eodc.eu" } ]
Expand All @@ -25,7 +25,7 @@ classifiers = [
]
dependencies = [ "pydantic", "xarray" ]
[project.urls]
Repository = "https://github.com/eodcgmbh/eodc-cf"
Repository = "https://github.com/eodcgmbh/cf-cm-tree"

[dependency-groups]
test = [ "pytest", "pytest-cov" ]
Expand Down Expand Up @@ -66,7 +66,7 @@ table_format = "long"
collapse_tables = [ "project.authors" ]

[tool.pytest.ini_options]
addopts = "--cov=eodc_cf --cov-report term-missing -rsx --verbose --color=yes"
addopts = "--cov=cf_cm_tree --cov-report term-missing -rsx --verbose --color=yes"
markers = [ "warp_installed" ]

[tool.coverage.run]
Expand Down
8 changes: 4 additions & 4 deletions src/eodc_cf/__init__.py → src/cf_cm_tree/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"""Entry point for eodc-cf."""
"""Entry point for cf-cm-tree."""

from eodc_cf._core import (
from cf_cm_tree._core import (
CFCoordinate,
CFDataset,
CFDataVariable,
CFFlagVariable,
)
from eodc_cf._lib import (
from cf_cm_tree._lib import (
CFLatCoordinate,
CFLonCoordinate,
CFTimeCoordinate,
Expand All @@ -26,4 +26,4 @@
"CFYCoordinate",
]

name = "eodc_cf"
name = "cf_cm_tree"
File renamed without changes.
2 changes: 1 addition & 1 deletion src/eodc_cf/_lib.py → src/cf_cm_tree/_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from typing import Any

from eodc_cf._core import CFCoordinate
from cf_cm_tree._core import CFCoordinate


class CFLonCoordinate(CFCoordinate):
Expand Down
2 changes: 1 addition & 1 deletion src/eodc_cf/utils.py → src/cf_cm_tree/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import xarray as xr

from eodc_cf._core import CFDataset
from cf_cm_tree._core import CFDataset


def assign_cf_metadata(ds: xr.Dataset, cf_ds: CFDataset) -> xr.Dataset:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_core.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest
from pydantic_core._pydantic_core import ValidationError

from eodc_cf._core import (
from cf_cm_tree._core import (
CFBase,
CFCoordinate,
CFDataset,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_lib.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest

from eodc_cf._lib import (
from cf_cm_tree._lib import (
CFLatCoordinate,
CFLonCoordinate,
CFTimeCoordinate,
Expand Down
6 changes: 3 additions & 3 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import numpy as np
import xarray as xr

from eodc_cf._core import CFDataset, CFDataVariable
from eodc_cf._lib import CFTimeCoordinate, CFXCoordinate, CFYCoordinate
from eodc_cf.utils import assign_cf_metadata
from cf_cm_tree._core import CFDataset, CFDataVariable
from cf_cm_tree._lib import CFTimeCoordinate, CFXCoordinate, CFYCoordinate
from cf_cm_tree.utils import assign_cf_metadata


def test_assign_cf_md():
Expand Down
Loading