Skip to content

Commit 976faf5

Browse files
committed
Enhanced documentation including docstrings
1 parent bc77cac commit 976faf5

File tree

6 files changed

+31
-6
lines changed

6 files changed

+31
-6
lines changed

CHANGES.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
## Version 0.2.0 (2024-18-01)
1+
## Version 0.2.1 (in development)
2+
3+
* Enhanced documentation including docstrings of several Python API objects.
4+
5+
6+
## Version 0.2.0 (from 2024-18-01)
27

38
### Enhancements
49

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ packages [xarray](https://docs.xarray.dev/) and [zarr](https://zarr.readthedocs.
1616

1717
The objective of `zappend` is to address recurring memory issues when generating large
1818
geospatial datacubes using the [Zarr format](https://zarr.readthedocs.io/)
19-
by subsequently concatenating data slices along an append dimension, usually `time`.
19+
by subsequently concatenating data slices along an append dimension, e.g., `time`
20+
(the default) for geospatial satellite observations.
2021
Each append step is atomic, that is, the append operation is a transaction that can be
2122
rolled back, in case the append operation fails. This ensures integrity of the target
2223
data cube.

docs/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ packages [xarray](https://docs.xarray.dev/) and [zarr](https://zarr.readthedocs.
1010

1111
The objective of `zappend` is to address recurring memory issues when generating large
1212
geospatial datacubes using the [Zarr format](https://zarr.readthedocs.io/)
13-
by subsequently concatenating data slices along an append dimension, usually `time`.
13+
by subsequently concatenating data slices along an append dimension, e.g., `time`
14+
(the default) for geospatial satellite observations.
1415
Each append step is atomic, that is, the append operation is a transaction that can be
1516
rolled back, in case the append operation fails. This ensures integrity of the target
1617
data cube.

zappend/api.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ def zappend(
3838
"""
3939
Robustly create or update a Zarr dataset from dataset slices.
4040
41+
It concatenates the dataset slices from given `slices` along a given append
42+
dimension, e.g., `"time"` (the default) for geospatial satellite observations.
43+
Each append step is atomic, that is, the append operation is a transaction
44+
that can be rolled back, in case the append operation fails.
45+
This ensures integrity of the target data cube `target_dir` given in `config`
46+
or `kwargs`.
47+
4148
Args:
4249
slices: An iterable that yields slice objects. A slice object is
4350
either a ``str``, ``xarray.Dataset``, ``SliceSource`` or a factory

zappend/cli.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,14 @@ def zappend(
4141
dry_run: bool,
4242
help_config: str | None,
4343
):
44-
"""Create or update a Zarr datacube TARGET from slice datasets SLICES."""
44+
"""Create or update a Zarr datacube TARGET from slice datasets SLICES.
45+
46+
It concatenates the dataset SLICES along a given append dimension, e.g., `"time"`
47+
(the default) for geospatial satellite observations. Each append step is atomic,
48+
that is, the append operation is a transaction that can be rolled back, in case
49+
the append operation fails. This ensures integrity of the target data cube given
50+
by TARGET or in CONFIG.
51+
"""
4552

4653
if help_config:
4754
return _show_config_help(help_config)

zappend/context.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ def zarr_version(self) -> int:
6767

6868
@property
6969
def append_dim_name(self) -> str:
70-
"""The configured append dimension."""
70+
"""The name of the append dimension along which slice datasets will be
71+
concatenated.
72+
If not configured, it defaults to `"time"`.
73+
"""
7174
return self._config.get("append_dim") or DEFAULT_APPEND_DIM
7275

7376
@property
@@ -83,7 +86,8 @@ def target_metadata(self, value: DatasetMetadata):
8386

8487
@property
8588
def target_dir(self) -> FileObj:
86-
"""The configured target directory."""
89+
"""The configured directory that represents the target datacube
90+
in Zarr format."""
8791
return self._target_dir
8892

8993
@property

0 commit comments

Comments
 (0)