From 6ad67ef48f1247547f82160363487c6a7cb9f2fe Mon Sep 17 00:00:00 2001 From: Norman Fomferra Date: Tue, 15 Apr 2025 14:14:47 +0200 Subject: [PATCH 1/9] Switch to 0.8.1.dev0 --- zappend/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zappend/__init__.py b/zappend/__init__.py index 45db428..465aaf5 100644 --- a/zappend/__init__.py +++ b/zappend/__init__.py @@ -2,4 +2,4 @@ # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. -__version__ = "0.8.0" +__version__ = "0.8.1.dev0" From 417464cc0cd6fdf6a4af7e57a6a33d357104058a Mon Sep 17 00:00:00 2001 From: Norman Fomferra Date: Tue, 15 Apr 2025 14:15:14 +0200 Subject: [PATCH 2/9] Replaced dev tools black and flake8 by isort and ruff --- .github/workflows/tests.yml | 7 ++----- CHANGES.md | 6 ++++++ pyproject.toml | 5 ++--- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2949de3..7f3f6c9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -28,12 +28,9 @@ jobs: run: | python -m pip install --upgrade pip pip install .[dev,doc] - - name: Lint with flake8 + - name: Lint with ruff run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + ruff check - name: Test with pytest run: | pytest --cov=zappend diff --git a/CHANGES.md b/CHANGES.md index 965713c..2ffcf9b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,9 @@ +## Version 0.8.1 (in development) + +* Replaced dev tools black and flake8 by isort and ruff. + +* Added `environment.yml` to setup a conda/mamba development environment. + ## Version 0.8.0 (from 2024-10-04) * Added module `zappend.contrib` that contributes functions to diff --git a/pyproject.toml b/pyproject.toml index 3389728..87ac6cf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,15 +47,14 @@ zappend = "zappend.cli:zappend" [project.optional-dependencies] dev = [ + "isort", "pytest", "pytest-cov", - "black", - "flake8", - "flake8-bugbear", "h5netcdf", "s3fs", "scipy", "pyproj" + "ruff", ] doc = [ "mkdocs", From f504d31c331c3e6adb6e3d29bf5154a0dd4fca25 Mon Sep 17 00:00:00 2001 From: Norman Fomferra Date: Tue, 15 Apr 2025 14:15:27 +0200 Subject: [PATCH 3/9] Added `environment.yml` --- environment.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 environment.yml diff --git a/environment.yml b/environment.yml new file mode 100644 index 0000000..19aa584 --- /dev/null +++ b/environment.yml @@ -0,0 +1,34 @@ +name: zappend +channels: + - conda-forge +dependencies: + - python >=3.10 + # Library Dependencies + - click + - dask + - fsspec + - jsonschema + - numcodecs + - numpy + - pyyaml + - xarray + - zarr >=2.18,!=3.0.0,!=3.0.1 + # Dev Dependencies + - isort + - pytest + - pytest-cov + - ruff + # Doc Dependencies + - mkdocs + - mkdocs-autorefs + - mkdocs-material + - mkdocstrings + - mkdocstrings-python + # Testing Datasets + - dask + - pandas + - pyproj + - netcdf4 + - h5netcdf + - s3fs + - scipy From 0294ac5c54d66c0b07c9419b8cf063f9fb20dc4e Mon Sep 17 00:00:00 2001 From: Norman Fomferra Date: Tue, 15 Apr 2025 14:22:46 +0200 Subject: [PATCH 4/9] Switched to ruff --- .flake8 | 7 ------- CONTRIBUTING.md | 11 ++++++----- README.md | 2 +- docs/about.md | 5 +++-- 4 files changed, 10 insertions(+), 15 deletions(-) delete mode 100644 .flake8 diff --git a/.flake8 b/.flake8 deleted file mode 100644 index 0609a7b..0000000 --- a/.flake8 +++ /dev/null @@ -1,7 +0,0 @@ -[flake8] -# Make line length conform to black's default -max-line-length = 88 -# Workaround for https://github.com/PyCQA/pycodestyle/issues/373 ; -# see also -# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#pycodestyle -extend-ignore = E203 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8f76ef1..b435dbc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -20,7 +20,9 @@ checklist are addressed in your PR. **PR checklist** -* Format code using [black](https://black.readthedocs.io/) with default settings. +* Format code using first [isort](https://pycqa.github.io/isort/) + then [ruff](https://black.readthedocs.io/) with default settings + (`ruff format .`). Check also section [code style](#code-style) below. * Your change shall not break existing unit tests. `pytest` must run without errors. @@ -38,10 +40,9 @@ checklist are addressed in your PR. ## Code style The `zappend` code compliant to [PEP-8](https://pep8.org/) except for a line -length of 88 characters as recommended by [black](https://black.readthedocs.io/). -Since black is un-opinionated regarding the order of imports, -we use the following three import blocks separated by an empty -line: +length of 88 characters as used by `ruff format`. +We structure imports using three blocks separated by an empty +line and sort them using `isort` _before_ applying `ruff`: 1. Python standard library imports, e.g., `os`, `typing`, etc 2. 3rd-party imports, e.g., `xarray`, `zarr`, etc diff --git a/README.md b/README.md index 1879c8f..a918380 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ [![codecov](https://codecov.io/gh/bcdev/zappend/graph/badge.svg?token=B3R6bNmAUp)](https://codecov.io/gh/bcdev/zappend) [![PyPI Version](https://img.shields.io/pypi/v/zappend)](https://pypi.org/project/zappend/) [![Conda Version](https://anaconda.org/conda-forge/zappend/badges/version.svg)](https://anaconda.org/conda-forge/zappend) -[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) +[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v0.json)](https://github.com/charliermarsh/ruff) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/bcdev/zappend/HEAD?labpath=examples%2Fzappend-demo.ipynb) [![GitHub License](https://img.shields.io/github/license/bcdev/zappend)](https://github.com/bcdev/zappend) diff --git a/docs/about.md b/docs/about.md index 460d863..07508e1 100644 --- a/docs/about.md +++ b/docs/about.md @@ -45,10 +45,11 @@ pytest --cov=zappend tests ### Code Style -`zappend` source code is formatted using the [black](https://black.readthedocs.io/) tool. +`zappend` source code is formatted using the +[ruff](https://github.com/charliermarsh/ruff) tool. ```bash -black zappend +ruff format . ``` ### Documentation From fd32b19f7beb048dc7f83b38d09e4306e4eb2734 Mon Sep 17 00:00:00 2001 From: Norman Fomferra Date: Tue, 15 Apr 2025 15:02:21 +0200 Subject: [PATCH 5/9] fixed syntax error --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 87ac6cf..6c3e8fa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ dev = [ "h5netcdf", "s3fs", "scipy", - "pyproj" + "pyproj", "ruff", ] doc = [ From 2174ae5cfc88056b24126e3f00bb02095b661540 Mon Sep 17 00:00:00 2001 From: Norman Fomferra Date: Tue, 15 Apr 2025 15:02:41 +0200 Subject: [PATCH 6/9] reformatting, fixes after linting --- examples/zappend-demo.ipynb | 9 ++--- tests/config/test_attrs.py | 15 ++++---- tests/config/test_config.py | 7 ++-- tests/config/test_normalize.py | 7 ++-- tests/config/test_validate.py | 2 +- tests/contrib/test_levels.py | 5 ++- tests/fsutil/test_fileobj.py | 4 +-- tests/fsutil/test_path.py | 3 +- tests/fsutil/test_transaction.py | 6 ++-- tests/slice/test_callable.py | 3 +- tests/slice/test_cm.py | 6 ++-- tests/slice/test_source.py | 5 ++- tests/test_api.py | 11 +++--- tests/test_cli.py | 5 +-- tests/test_context.py | 4 +-- tests/test_log.py | 4 +-- tests/test_metadata.py | 9 +++-- tests/test_processor.py | 10 +++--- tests/test_profiler.py | 1 - tests/test_rollbackstore.py | 6 ++-- tests/test_tailoring.py | 4 +-- tests/test_xrencoding.py | 3 +- zappend/api.py | 10 ++---- zappend/config/__init__.py | 53 +++++++++++++++++++++-------- zappend/config/attrs.py | 2 +- zappend/config/config.py | 18 +++++----- zappend/config/normalize.py | 4 +-- zappend/config/schema.py | 40 +++++++++++----------- zappend/config/validate.py | 5 ++- zappend/contrib/__init__.py | 2 +- zappend/contrib/levels.py | 10 +++--- zappend/fsutil/__init__.py | 2 +- zappend/fsutil/fileobj.py | 5 +-- zappend/fsutil/transaction.py | 13 ++++--- zappend/metadata.py | 3 +- zappend/processor.py | 38 ++++++++++----------- zappend/profiler.py | 5 ++- zappend/rollbackstore.py | 2 +- zappend/slice/__init__.py | 16 ++++++--- zappend/slice/callable.py | 3 +- zappend/slice/cm.py | 3 +- zappend/slice/source.py | 6 ++-- zappend/slice/sources/__init__.py | 6 ++++ zappend/slice/sources/memory.py | 1 + zappend/slice/sources/persistent.py | 1 + zappend/slice/sources/temporary.py | 4 +-- 46 files changed, 189 insertions(+), 192 deletions(-) diff --git a/examples/zappend-demo.ipynb b/examples/zappend-demo.ipynb index 1da2673..0b8918b 100644 --- a/examples/zappend-demo.ipynb +++ b/examples/zappend-demo.ipynb @@ -18,12 +18,10 @@ "outputs": [], "source": [ "import glob\n", - "import math\n", "import os\n", "import os.path\n", "import shutil\n", "\n", - "import numpy as np\n", "import xarray as xr" ] }, @@ -2951,10 +2949,7 @@ "id": "e3b5f156-88c7-4ce1-908e-88ddc7b7e18c", "metadata": {}, "outputs": [], - "source": [ - "from IPython.display import Markdown\n", - "from zappend.config import get_config_schema" - ] + "source": [] }, { "cell_type": "code", @@ -3023,7 +3018,7 @@ "metadata": {}, "outputs": [], "source": [ - "config_path = f\"zappend-config.yaml\"" + "config_path = \"zappend-config.yaml\"" ] }, { diff --git a/tests/config/test_attrs.py b/tests/config/test_attrs.py index 6ba6732..211535f 100644 --- a/tests/config/test_attrs.py +++ b/tests/config/test_attrs.py @@ -7,14 +7,17 @@ import unittest import numpy as np -import xarray as xr import pytest +import xarray as xr + +from zappend.config.attrs import ( + ConfigAttrsUserFunctions, + eval_dyn_config_attrs, + eval_expr, + get_dyn_config_attrs_env, + has_dyn_config_attrs, +) -from zappend.config.attrs import ConfigAttrsUserFunctions -from zappend.config.attrs import eval_dyn_config_attrs -from zappend.config.attrs import eval_expr -from zappend.config.attrs import get_dyn_config_attrs_env -from zappend.config.attrs import has_dyn_config_attrs from ..helpers import make_test_dataset diff --git a/tests/config/test_config.py b/tests/config/test_config.py index 4c4cede..c208125 100644 --- a/tests/config/test_config.py +++ b/tests/config/test_config.py @@ -11,8 +11,8 @@ from zappend.context import Context from zappend.fsutil.fileobj import FileObj from zappend.slice import SliceSource -from ..helpers import clear_memory_fs -from ..helpers import make_test_dataset + +from ..helpers import clear_memory_fs, make_test_dataset class ConfigTest(unittest.TestCase): @@ -151,8 +151,7 @@ def test_slice_source_as_type(self): with pytest.raises( TypeError, match=( - "slice_source must a callable" - " or the fully qualified name of a callable" + "slice_source must a callable or the fully qualified name of a callable" ), ): Config( diff --git a/tests/config/test_normalize.py b/tests/config/test_normalize.py index 9ad42a5..3c15a11 100644 --- a/tests/config/test_normalize.py +++ b/tests/config/test_normalize.py @@ -10,10 +10,9 @@ import pytest import yaml -from zappend.config import exclude_from_config -from zappend.config import merge_configs -from zappend.config import normalize_config +from zappend.config import exclude_from_config, merge_configs, normalize_config from zappend.fsutil import FileObj + from ..helpers import clear_memory_fs @@ -88,7 +87,7 @@ def test_it_raises_if_config_is_not_object(self): file_obj.write("what?") with pytest.raises( TypeError, - match="Invalid configuration:" " memory://config.yaml: object expected", + match="Invalid configuration: memory://config.yaml: object expected", ): normalize_config(file_obj) diff --git a/tests/config/test_validate.py b/tests/config/test_validate.py index 05f832e..6fcf246 100644 --- a/tests/config/test_validate.py +++ b/tests/config/test_validate.py @@ -23,7 +23,7 @@ def test_validate_versions_fail(self): config = {"zarr_version": 1} with pytest.raises( ValueError, - match="Invalid configuration:" " 2 was expected for zarr_version", + match="Invalid configuration: 2 was expected for zarr_version", ): validate_config(config) diff --git a/tests/contrib/test_levels.py b/tests/contrib/test_levels.py index 93eb9a4..dea8e57 100644 --- a/tests/contrib/test_levels.py +++ b/tests/contrib/test_levels.py @@ -8,11 +8,10 @@ import pytest import xarray as xr -from zappend.fsutil import FileObj +from tests.helpers import clear_memory_fs, make_test_dataset from zappend.contrib import write_levels from zappend.contrib.levels import get_variables_config -from tests.helpers import clear_memory_fs -from tests.helpers import make_test_dataset +from zappend.fsutil import FileObj try: # noinspection PyUnresolvedReferences diff --git a/tests/fsutil/test_fileobj.py b/tests/fsutil/test_fileobj.py index 91b9b95..c6456bd 100644 --- a/tests/fsutil/test_fileobj.py +++ b/tests/fsutil/test_fileobj.py @@ -2,8 +2,8 @@ # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. -import unittest import os.path +import unittest import uuid import fsspec @@ -27,7 +27,7 @@ def test_repr(self): "FileObj('memory://test.zarr')", repr(FileObj("memory://test.zarr")) ) self.assertEqual( - "FileObj('memory://test.zarr'," " storage_options={'asynchronous': False})", + "FileObj('memory://test.zarr', storage_options={'asynchronous': False})", repr( FileObj("memory://test.zarr", storage_options=dict(asynchronous=False)) ), diff --git a/tests/fsutil/test_path.py b/tests/fsutil/test_path.py index f5b87a3..82149d7 100644 --- a/tests/fsutil/test_path.py +++ b/tests/fsutil/test_path.py @@ -6,8 +6,7 @@ import pytest -from zappend.fsutil.path import split_components -from zappend.fsutil.path import split_parent +from zappend.fsutil.path import split_components, split_parent class SplitFilenameTest(unittest.TestCase): diff --git a/tests/fsutil/test_transaction.py b/tests/fsutil/test_transaction.py index 28e478c..59d0f49 100644 --- a/tests/fsutil/test_transaction.py +++ b/tests/fsutil/test_transaction.py @@ -8,8 +8,8 @@ import pytest from zappend.fsutil.fileobj import FileObj -from zappend.fsutil.transaction import Transaction -from zappend.fsutil.transaction import ROLLBACK_FILE +from zappend.fsutil.transaction import ROLLBACK_FILE, Transaction + from ..helpers import clear_memory_fs @@ -175,7 +175,7 @@ def test_it_raises_if_not_used_with_with(self): transaction = Transaction(test_root, rollback_dir) with pytest.raises( ValueError, - match="Transaction instance must be" " used with the 'with' statement", + match="Transaction instance must be used with the 'with' statement", ): transaction._add_rollback_action("delete_file", "path", None) diff --git a/tests/slice/test_callable.py b/tests/slice/test_callable.py index 0aac79e..c050fbd 100644 --- a/tests/slice/test_callable.py +++ b/tests/slice/test_callable.py @@ -7,8 +7,7 @@ import pytest from zappend.context import Context -from zappend.slice.callable import import_attribute -from zappend.slice.callable import to_slice_args +from zappend.slice.callable import import_attribute, to_slice_args class ToSliceArgsTest(unittest.TestCase): diff --git a/tests/slice/test_cm.py b/tests/slice/test_cm.py index c04c206..7800579 100644 --- a/tests/slice/test_cm.py +++ b/tests/slice/test_cm.py @@ -15,16 +15,14 @@ import pytest import xarray as xr +from tests.helpers import clear_memory_fs, make_test_dataset from zappend.context import Context from zappend.fsutil.fileobj import FileObj -from zappend.slice.cm import SliceSourceContextManager -from zappend.slice.cm import open_slice_dataset +from zappend.slice.cm import SliceSourceContextManager, open_slice_dataset from zappend.slice.source import SliceSource from zappend.slice.sources.memory import MemorySliceSource from zappend.slice.sources.persistent import PersistentSliceSource from zappend.slice.sources.temporary import TemporarySliceSource -from tests.helpers import clear_memory_fs -from tests.helpers import make_test_dataset # noinspection PyShadowingBuiltins,PyRedeclaration,PyMethodMayBeStatic diff --git a/tests/slice/test_source.py b/tests/slice/test_source.py index adf4fa5..2abae09 100644 --- a/tests/slice/test_source.py +++ b/tests/slice/test_source.py @@ -7,14 +7,13 @@ import pytest import xarray as xr +from tests.helpers import clear_memory_fs from zappend.context import Context from zappend.fsutil.fileobj import FileObj -from zappend.slice.source import SliceSource -from zappend.slice.source import to_slice_source +from zappend.slice.source import SliceSource, to_slice_source from zappend.slice.sources.memory import MemorySliceSource from zappend.slice.sources.persistent import PersistentSliceSource from zappend.slice.sources.temporary import TemporarySliceSource -from tests.helpers import clear_memory_fs # noinspection PyUnusedLocal diff --git a/tests/test_api.py b/tests/test_api.py index ffe1166..2c4c7a2 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -10,12 +10,10 @@ import pytest import xarray as xr -from zappend.api import FileObj -from zappend.api import SliceSource -from zappend.api import zappend +from zappend.api import FileObj, SliceSource, zappend from zappend.fsutil.transaction import Transaction -from .helpers import clear_memory_fs -from .helpers import make_test_dataset + +from .helpers import clear_memory_fs, make_test_dataset # noinspection PyMethodMayBeStatic @@ -363,8 +361,7 @@ def test_it_raises_for_wrong_append_step(self): with pytest.raises( ValueError, match=( - "Cannot append slice because this would result in" - " an invalid step size." + "Cannot append slice because this would result in an invalid step size." ), ): zappend(slices, target_dir=target_dir, append_step="2D") diff --git a/tests/test_cli.py b/tests/test_cli.py index c55069e..7428cf9 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -3,13 +3,14 @@ # https://opensource.org/licenses/MIT. import unittest + from click.testing import CliRunner from zappend import __version__ from zappend.cli import zappend from zappend.fsutil.fileobj import FileObj -from .helpers import clear_memory_fs -from .helpers import make_test_dataset + +from .helpers import clear_memory_fs, make_test_dataset class CliTest(unittest.TestCase): diff --git a/tests/test_context.py b/tests/test_context.py index f81e262..19d6ad7 100644 --- a/tests/test_context.py +++ b/tests/test_context.py @@ -9,8 +9,8 @@ from zappend.context import Context from zappend.fsutil.fileobj import FileObj from zappend.metadata import DatasetMetadata -from .helpers import clear_memory_fs -from .helpers import make_test_dataset + +from .helpers import clear_memory_fs, make_test_dataset class ContextTest(unittest.TestCase): diff --git a/tests/test_log.py b/tests/test_log.py index f547f4b..5946557 100644 --- a/tests/test_log.py +++ b/tests/test_log.py @@ -5,9 +5,7 @@ import logging import unittest -from zappend.log import configure_logging -from zappend.log import get_log_level -from zappend.log import logger +from zappend.log import configure_logging, get_log_level, logger class LogTest(unittest.TestCase): diff --git a/tests/test_metadata.py b/tests/test_metadata.py index aaccad8..3f00cf3 100644 --- a/tests/test_metadata.py +++ b/tests/test_metadata.py @@ -52,7 +52,7 @@ def test_it_raises_if_append_dim_is_fixed(self): {"a": xr.DataArray(np.zeros((2, 3, 4)), dims=("time", "y", "x"))} ) with pytest.raises( - ValueError, match="Size of append dimension 'time'" " must not be fixed" + ValueError, match="Size of append dimension 'time' must not be fixed" ): DatasetMetadata.from_dataset( ds, @@ -80,8 +80,7 @@ def test_it_raises_on_wrong_size_found_in_ds(self): ) with pytest.raises( ValueError, - match="Wrong size for fixed dimension 'x'" - " in dataset: expected 5, found 4", + match="Wrong size for fixed dimension 'x' in dataset: expected 5, found 4", ): DatasetMetadata.from_dataset( ds, make_config({"fixed_dims": {"y": 3, "x": 5}, "append_dim": "time"}) @@ -443,7 +442,7 @@ def test_it_raises_on_missing_variable_dims(self): # noinspection PyMethodMayBeStatic def test_it_raises_on_dim_not_found(self): with pytest.raises( - ValueError, match="Dimension 'Y' of" " variable 'b' not found in dataset" + ValueError, match="Dimension 'Y' of variable 'b' not found in dataset" ): DatasetMetadata.from_dataset( xr.Dataset( @@ -465,7 +464,7 @@ def test_it_raises_on_dim_not_found(self): def test_it_raises_on_missing_dtype_or_fill_value(self): with pytest.raises( ValueError, - match="Missing 'dtype' in encoding configuration" " of variable 'b'", + match="Missing 'dtype' in encoding configuration of variable 'b'", ): DatasetMetadata.from_dataset( xr.Dataset( diff --git a/tests/test_processor.py b/tests/test_processor.py index 1e54251..07addcc 100644 --- a/tests/test_processor.py +++ b/tests/test_processor.py @@ -8,13 +8,11 @@ import pytest import xarray as xr -from zappend.fsutil.fileobj import FileObj from zappend.context import Context -from zappend.processor import Processor -from zappend.processor import to_timedelta -from zappend.processor import verify_append_labels -from .helpers import clear_memory_fs -from .helpers import make_test_dataset +from zappend.fsutil.fileobj import FileObj +from zappend.processor import Processor, to_timedelta, verify_append_labels + +from .helpers import clear_memory_fs, make_test_dataset class ProcessorTest(unittest.TestCase): diff --git a/tests/test_profiler.py b/tests/test_profiler.py index cd2a74d..8f1e85f 100644 --- a/tests/test_profiler.py +++ b/tests/test_profiler.py @@ -2,7 +2,6 @@ # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. -import logging import os import unittest diff --git a/tests/test_rollbackstore.py b/tests/test_rollbackstore.py index 841268e..281529c 100644 --- a/tests/test_rollbackstore.py +++ b/tests/test_rollbackstore.py @@ -11,8 +11,8 @@ from zappend.fsutil.fileobj import FileObj from zappend.rollbackstore import RollbackStore -from .helpers import clear_memory_fs -from .helpers import make_test_dataset + +from .helpers import clear_memory_fs, make_test_dataset class RollbackStoreImplTest(unittest.TestCase): @@ -27,7 +27,7 @@ def add_rb_record(self, *args): def test_getitem(self): with pytest.raises(KeyError): # noinspection PyUnusedLocal - v1 = self.rb_store["k1"] + _v1 = self.rb_store["k1"] self.assertIsNone(self.rb_store.get("k1")) self.mem_store["k1"] = b"v1" self.assertEqual(b"v1", self.rb_store["k1"]) diff --git a/tests/test_tailoring.py b/tests/test_tailoring.py index 3ae9af1..62de941 100644 --- a/tests/test_tailoring.py +++ b/tests/test_tailoring.py @@ -9,8 +9,8 @@ import xarray as xr from zappend.context import Context -from zappend.tailoring import tailor_target_dataset -from zappend.tailoring import tailor_slice_dataset +from zappend.tailoring import tailor_slice_dataset, tailor_target_dataset + from .helpers import clear_memory_fs diff --git a/tests/test_xrencoding.py b/tests/test_xrencoding.py index 196bc97..68ce2f9 100644 --- a/tests/test_xrencoding.py +++ b/tests/test_xrencoding.py @@ -2,15 +2,16 @@ # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. -from io import StringIO import json import unittest +from io import StringIO import numpy as np import pytest import xarray as xr from zappend.fsutil.fileobj import FileObj + from .helpers import clear_memory_fs TEST_ZARR = "memory://test.zarr" diff --git a/zappend/api.py b/zappend/api.py index b5cae0f..3b15716 100644 --- a/zappend/api.py +++ b/zappend/api.py @@ -4,17 +4,11 @@ from typing import Any, Iterable -from .config import Config -from .config import ConfigItem -from .config import ConfigLike -from .config import ConfigList +from .config import Config, ConfigItem, ConfigLike, ConfigList from .context import Context from .fsutil import FileObj from .processor import Processor -from .slice import SliceCallable -from .slice import SliceItem -from .slice import SliceSource - +from .slice import SliceCallable, SliceItem, SliceSource __all__ = [ "Config", diff --git a/zappend/config/__init__.py b/zappend/config/__init__.py index f86c7f1..8aa8fcf 100644 --- a/zappend/config/__init__.py +++ b/zappend/config/__init__.py @@ -2,21 +2,44 @@ # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. -from .attrs import eval_dyn_config_attrs -from .attrs import has_dyn_config_attrs -from .attrs import get_dyn_config_attrs_env +from .attrs import eval_dyn_config_attrs, get_dyn_config_attrs_env, has_dyn_config_attrs from .config import Config -from .defaults import DEFAULT_APPEND_DIM -from .defaults import DEFAULT_APPEND_STEP -from .defaults import DEFAULT_ATTRS_UPDATE_MODE -from .defaults import DEFAULT_SLICE_POLLING_INTERVAL -from .defaults import DEFAULT_SLICE_POLLING_TIMEOUT -from .defaults import DEFAULT_ZARR_VERSION -from .normalize import ConfigItem -from .normalize import ConfigLike -from .normalize import ConfigList -from .normalize import exclude_from_config -from .normalize import merge_configs -from .normalize import normalize_config +from .defaults import ( + DEFAULT_APPEND_DIM, + DEFAULT_APPEND_STEP, + DEFAULT_ATTRS_UPDATE_MODE, + DEFAULT_SLICE_POLLING_INTERVAL, + DEFAULT_SLICE_POLLING_TIMEOUT, + DEFAULT_ZARR_VERSION, +) +from .normalize import ( + ConfigItem, + ConfigLike, + ConfigList, + exclude_from_config, + merge_configs, + normalize_config, +) from .schema import get_config_schema from .validate import validate_config + +__all__ = [ + "eval_dyn_config_attrs", + "get_dyn_config_attrs_env", + "has_dyn_config_attrs", + "Config", + "DEFAULT_APPEND_DIM", + "DEFAULT_APPEND_STEP", + "DEFAULT_ATTRS_UPDATE_MODE", + "DEFAULT_SLICE_POLLING_INTERVAL", + "DEFAULT_SLICE_POLLING_TIMEOUT", + "DEFAULT_ZARR_VERSION", + "ConfigItem", + "ConfigLike", + "ConfigList", + "exclude_from_config", + "merge_configs", + "normalize_config", + "get_config_schema", + "validate_config", +] diff --git a/zappend/config/attrs.py b/zappend/config/attrs.py index 6981982..4d9a1f1 100644 --- a/zappend/config/attrs.py +++ b/zappend/config/attrs.py @@ -172,7 +172,7 @@ def _bounds(array: xr.DataArray | np.ndarray, ref: _CellRef): if len(array.shape) != 1: raise ValueError(f"array must be 1-dimensional, got shape {array.shape}") if array.shape[0] == 0: - raise ValueError(f"array must not be empty") + raise ValueError("array must not be empty") v1, v2 = array[0], array[-1] delta = array[1] - v1 if array.size > 1 else 0 if v1 > v2: diff --git a/zappend/config/config.py b/zappend/config/config.py index 805facc..5722b79 100644 --- a/zappend/config/config.py +++ b/zappend/config/config.py @@ -3,15 +3,17 @@ # https://opensource.org/licenses/MIT. import tempfile -from typing import Any, Dict, Literal, Callable - -from .defaults import DEFAULT_APPEND_DIM -from .defaults import DEFAULT_APPEND_STEP -from .defaults import DEFAULT_ATTRS_UPDATE_MODE -from .defaults import DEFAULT_SLICE_POLLING_INTERVAL -from .defaults import DEFAULT_SLICE_POLLING_TIMEOUT -from .defaults import DEFAULT_ZARR_VERSION +from typing import Any, Callable, Dict, Literal + from ..fsutil.fileobj import FileObj +from .defaults import ( + DEFAULT_APPEND_DIM, + DEFAULT_APPEND_STEP, + DEFAULT_ATTRS_UPDATE_MODE, + DEFAULT_SLICE_POLLING_INTERVAL, + DEFAULT_SLICE_POLLING_TIMEOUT, + DEFAULT_ZARR_VERSION, +) class Config: diff --git a/zappend/config/normalize.py b/zappend/config/normalize.py index 0573350..587980b 100644 --- a/zappend/config/normalize.py +++ b/zappend/config/normalize.py @@ -73,9 +73,7 @@ def load_config(config_file: FileObj) -> dict[str, Any]: else: config = json.load(stream) if not isinstance(config, dict): - raise TypeError( - f"Invalid configuration:" f" {config_file.uri}: object expected" - ) + raise TypeError(f"Invalid configuration: {config_file.uri}: object expected") return config diff --git a/zappend/config/schema.py b/zappend/config/schema.py index 767e961..6f5a439 100644 --- a/zappend/config/schema.py +++ b/zappend/config/schema.py @@ -5,22 +5,23 @@ import json from typing import Any, Literal -from .defaults import DEFAULT_APPEND_DIM -from .defaults import DEFAULT_APPEND_STEP -from .defaults import DEFAULT_ATTRS_UPDATE_MODE -from .defaults import DEFAULT_SLICE_POLLING_INTERVAL -from .defaults import DEFAULT_SLICE_POLLING_TIMEOUT -from .defaults import DEFAULT_ZARR_VERSION +from .defaults import ( + DEFAULT_APPEND_DIM, + DEFAULT_APPEND_STEP, + DEFAULT_ATTRS_UPDATE_MODE, + DEFAULT_SLICE_POLLING_INTERVAL, + DEFAULT_SLICE_POLLING_TIMEOUT, + DEFAULT_ZARR_VERSION, +) from .markdown import schema_to_markdown - SLICE_POLLING_SCHEMA = { "category": "Data I/O - Slices", "description": "Defines how to poll for contributing datasets.", "oneOf": [ { "description": ( - "No polling, fail immediately if dataset" " is not available." + "No polling, fail immediately if dataset is not available." ), "const": False, }, @@ -98,7 +99,7 @@ "oneOf": [ { "description": ( - "A number of type and unit of the" " given storage `dtype`." + "A number of type and unit of the given storage `dtype`." ), "type": "number", }, @@ -157,8 +158,7 @@ "type": ["array", "null"], "items": { "description": ( - "Filter definition." - " Allowed parameters depend on the value of `id`." + "Filter definition. Allowed parameters depend on the value of `id`." ), "type": "object", "properties": { @@ -207,7 +207,7 @@ } LOG_REF_URL = ( - "https://docs.python.org/3/library/logging.config.html" "#logging-config-dictschema" + "https://docs.python.org/3/library/logging.config.html#logging-config-dictschema" ) LOG_HDL_CLS_URL = "https://docs.python.org/3/library/logging.handlers.html" @@ -302,8 +302,7 @@ }, { "description": ( - "Pattern-match the standard name" - " that is printed." + "Pattern-match the standard name that is printed." ), "type": "string", }, @@ -403,12 +402,11 @@ "enum": LOG_LEVELS, }, "formatter ": { - "description": "The id of the formatter" " for this handler.", + "description": "The id of the formatter for this handler.", "type": "string", }, "filters": { - "description": "A list of ids of the filters" - " for this logger.", + "description": "A list of ids of the filters for this logger.", "type": "array", "items": {"type": "string"}, }, @@ -440,14 +438,14 @@ }, "filters": { "description": ( - "A list of ids of the filters" " for this logger." + "A list of ids of the filters for this logger." ), "type": "array", "items": {"type": "string"}, }, "handlers": { "description": ( - "A list of ids of the handlers" " for this logger." + "A list of ids of the handlers for this logger." ), "type": "array", "items": {"type": "string"}, @@ -620,7 +618,7 @@ target_storage_options={ "category": "Data I/O - Target", "description": ( - "Options for the filesystem given by" " the URI of `target_dir`." + "Options for the filesystem given by the URI of `target_dir`." ), "type": "object", "additionalProperties": True, @@ -707,7 +705,7 @@ temp_storage_options={ "category": "Data I/O - Transactions", "description": ( - "Options for the filesystem given by" " the protocol of `temp_dir`." + "Options for the filesystem given by the protocol of `temp_dir`." ), "type": "object", "additionalProperties": True, diff --git a/zappend/config/validate.py b/zappend/config/validate.py index cb34254..1c5c060 100644 --- a/zappend/config/validate.py +++ b/zappend/config/validate.py @@ -7,8 +7,7 @@ import jsonschema import jsonschema.exceptions -from .normalize import ConfigLike -from .normalize import normalize_config +from .normalize import ConfigLike, normalize_config from .schema import CONFIG_SCHEMA_V1 @@ -30,6 +29,6 @@ def validate_config(config_like: ConfigLike) -> dict[str, Any]: jsonschema.validate(config, CONFIG_SCHEMA_V1) except jsonschema.exceptions.ValidationError as e: raise ValueError( - f"Invalid configuration: {e.message}" f" for {'.'.join(map(str, e.path))}" + f"Invalid configuration: {e.message} for {'.'.join(map(str, e.path))}" ) return config diff --git a/zappend/contrib/__init__.py b/zappend/contrib/__init__.py index 03ab527..d2d9002 100644 --- a/zappend/contrib/__init__.py +++ b/zappend/contrib/__init__.py @@ -12,4 +12,4 @@ coverage analysis. """ -from .levels import write_levels +from .levels import write_levels as write_levels diff --git a/zappend/contrib/levels.py b/zappend/contrib/levels.py index 2231fdd..072f99a 100644 --- a/zappend/contrib/levels.py +++ b/zappend/contrib/levels.py @@ -7,8 +7,8 @@ import warnings from typing import Any, Hashable -import xarray as xr import fsspec +import xarray as xr from zappend.api import zappend @@ -120,8 +120,7 @@ def write_levels( parameter is not supported. """ from xcube.core.gridmapping import GridMapping - from xcube.core.subsampling import get_dataset_agg_methods - from xcube.core.subsampling import subsample_dataset + from xcube.core.subsampling import get_dataset_agg_methods, subsample_dataset from xcube.core.tilingscheme import get_num_levels from xcube.util.fspath import get_fs_path_class @@ -132,7 +131,7 @@ def write_levels( dry_run = zappend_config.pop("dry_run", False) if dry_run and use_saved_levels: - warnings.warn(f"'use_saved_levels' argument is not applicable if dry_run=True") + warnings.warn("'use_saved_levels' argument is not applicable if dry_run=True") use_saved_levels = False target_dir = zappend_config.pop("target_dir", None) @@ -171,8 +170,7 @@ def write_levels( ) if link_level_zero: raise ValueError( - f"'source_path' argument must be provided" - f" if 'link_level_zero' is used" + "'source_path' argument must be provided if 'link_level_zero' is used" ) append_dim = zappend_config.pop("append_dim", "time") diff --git a/zappend/fsutil/__init__.py b/zappend/fsutil/__init__.py index ce55eb5..a054a1a 100644 --- a/zappend/fsutil/__init__.py +++ b/zappend/fsutil/__init__.py @@ -2,4 +2,4 @@ # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. -from .fileobj import FileObj +from .fileobj import FileObj as FileObj diff --git a/zappend/fsutil/fileobj.py b/zappend/fsutil/fileobj.py index 3767112..7c0ade3 100644 --- a/zappend/fsutil/fileobj.py +++ b/zappend/fsutil/fileobj.py @@ -9,7 +9,6 @@ from .path import split_parent - # Note, we could make FileObj an ABC and then introduce concrete # File and Directory classes which would make code more comprehensible. # But then, we cannot know the concrete type of the resulting type if we @@ -53,9 +52,7 @@ def __repr__(self): if self._storage_options is None: return f"FileObj({self.uri!r})" else: - return ( - f"FileObj({self.uri!r}," f" storage_options={self._storage_options!r})" - ) + return f"FileObj({self.uri!r}, storage_options={self._storage_options!r})" def __eq__(self, other) -> bool: return self is other or ( diff --git a/zappend/fsutil/transaction.py b/zappend/fsutil/transaction.py index 9aaa46f..5fd5fc1 100644 --- a/zappend/fsutil/transaction.py +++ b/zappend/fsutil/transaction.py @@ -121,8 +121,7 @@ def __enter__(self): if not self.target_dir.parent.exists(): raise FileNotFoundError( - f"Target parent directory does not exist:" - f" {self.target_dir.parent.path}" + f"Target parent directory does not exist: {self.target_dir.parent.path}" ) lock_file = self._lock_file @@ -166,7 +165,7 @@ def __exit__(self, exc_type, exc_val, exc_tb): lock_file = self._lock_file try: lock_file.delete() - logger.info(f"Transaction completed.") + logger.info("Transaction completed.") except OSError: logger.warning(f"Failed to remove transaction lock: {lock_file.uri}") logger.warning("Note, it should be save to delete it manually.") @@ -190,7 +189,7 @@ def _add_rollback_action( self._assert_entered_ctx() if not isinstance(action, str): raise TypeError( - f"Type of 'action' argument must be {str}," f" but was {type(action)}" + f"Type of 'action' argument must be {str}, but was {type(action)}" ) if action not in ROLLBACK_ACTIONS: actions = ", ".join(map(repr, ROLLBACK_ACTIONS)) @@ -200,16 +199,16 @@ def _add_rollback_action( ) if not isinstance(path, str): raise TypeError( - f"Type of 'path' argument must be {str}," f" but was {type(path)}" + f"Type of 'path' argument must be {str}, but was {type(path)}" ) if action == "replace_file": if not isinstance(data, bytes): raise TypeError( - f"Type of 'data' argument must be {bytes}," f" but was {type(data)}" + f"Type of 'data' argument must be {bytes}, but was {type(data)}" ) else: if data is not None: - raise ValueError(f"Value of 'data' argument must be None") + raise ValueError("Value of 'data' argument must be None") if self._disable_rollback: return diff --git a/zappend/metadata.py b/zappend/metadata.py index e090b37..66712d3 100644 --- a/zappend/metadata.py +++ b/zappend/metadata.py @@ -9,8 +9,7 @@ import numpy as np import xarray as xr -from .config import Config -from .config import merge_configs +from .config import Config, merge_configs from .log import logger diff --git a/zappend/processor.py b/zappend/processor.py index fec94ed..d26570d 100644 --- a/zappend/processor.py +++ b/zappend/processor.py @@ -3,31 +3,30 @@ # https://opensource.org/licenses/MIT. import collections.abc -from typing import Iterable, Any +from typing import Any, Iterable import numpy as np import xarray as xr import zarr.attrs import zarr.convenience -from .config import ConfigLike, Config -from .config import eval_dyn_config_attrs -from .config import exclude_from_config -from .config import get_dyn_config_attrs_env -from .config import has_dyn_config_attrs -from .config import normalize_config -from .config import validate_config +from .config import ( + Config, + ConfigLike, + eval_dyn_config_attrs, + exclude_from_config, + get_dyn_config_attrs_env, + has_dyn_config_attrs, + normalize_config, + validate_config, +) from .context import Context -from .fsutil.transaction import RollbackCallback -from .fsutil.transaction import Transaction -from .log import configure_logging -from .log import logger +from .fsutil.transaction import RollbackCallback, Transaction +from .log import configure_logging, logger from .profiler import Profiler from .rollbackstore import RollbackStore -from .slice import SliceItem -from .slice import open_slice_dataset -from .tailoring import tailor_slice_dataset -from .tailoring import tailor_target_dataset +from .slice import SliceItem, open_slice_dataset +from .tailoring import tailor_slice_dataset, tailor_target_dataset class Processor: @@ -51,8 +50,8 @@ def __init__(self, config: ConfigLike = None, **kwargs): configure_logging(_config.logging) if _config.force_new: logger.warning( - f"Setting 'force_new' is enabled. This will" - f" permanently delete existing targets (no rollback)." + "Setting 'force_new' is enabled. This will" + " permanently delete existing targets (no rollback)." ) delete_target_permanently(_config) self._config = _config @@ -278,8 +277,7 @@ def verify_append_labels(ctx: Context, slice_ds: xr.Dataset): deltas = step_sizes - append_step if not np.all(deltas == zero): raise ValueError( - f"Cannot append slice because this would" - f" result in an invalid step size." + "Cannot append slice because this would result in an invalid step size." ) diff --git a/zappend/profiler.py b/zappend/profiler.py index b943fb5..414bb49 100644 --- a/zappend/profiler.py +++ b/zappend/profiler.py @@ -7,8 +7,7 @@ import pstats from typing import Any -from .log import get_log_level -from .log import logger +from .log import get_log_level, logger class Profiler: @@ -52,7 +51,7 @@ def __init__(self, profiling_config: dict[str, Any] | str | bool | None): def __enter__(self): if not self.enabled: return - logger.info(f"Profiling...") + logger.info("Profiling...") self._profile = cProfile.Profile() self._profile.enable() diff --git a/zappend/rollbackstore.py b/zappend/rollbackstore.py index 760f160..ac41f48 100644 --- a/zappend/rollbackstore.py +++ b/zappend/rollbackstore.py @@ -3,7 +3,7 @@ # https://opensource.org/licenses/MIT. from collections.abc import MutableMapping -from typing import Any, Sequence, Mapping +from typing import Any, Mapping, Sequence import zarr.context import zarr.storage diff --git a/zappend/slice/__init__.py b/zappend/slice/__init__.py index cca5957..c89bd0e 100644 --- a/zappend/slice/__init__.py +++ b/zappend/slice/__init__.py @@ -2,9 +2,15 @@ # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. -from .callable import SliceCallable -from .callable import invoke_slice_callable -from .callable import to_slice_callable +from .callable import SliceCallable, invoke_slice_callable, to_slice_callable from .cm import open_slice_dataset -from .source import SliceItem -from .source import SliceSource +from .source import SliceItem, SliceSource + +__all__ = [ + "SliceCallable", + "invoke_slice_callable", + "to_slice_callable", + "open_slice_dataset", + "SliceItem", + "SliceSource", +] diff --git a/zappend/slice/callable.py b/zappend/slice/callable.py index d1323ae..d97d89d 100644 --- a/zappend/slice/callable.py +++ b/zappend/slice/callable.py @@ -7,8 +7,7 @@ from typing import Any, Type from ..context import Context -from .source import SliceCallable -from .source import SliceItem +from .source import SliceCallable, SliceItem def invoke_slice_callable( diff --git a/zappend/slice/cm.py b/zappend/slice/cm.py index c81b96e..1d94ba7 100644 --- a/zappend/slice/cm.py +++ b/zappend/slice/cm.py @@ -8,8 +8,7 @@ import xarray as xr from ..context import Context -from .source import SliceSource -from .source import to_slice_source +from .source import SliceSource, to_slice_source class SliceSourceContextManager(contextlib.AbstractContextManager): diff --git a/zappend/slice/source.py b/zappend/slice/source.py index a1fa0f5..3b0ddd4 100644 --- a/zappend/slice/source.py +++ b/zappend/slice/source.py @@ -4,7 +4,7 @@ import contextlib import warnings -from abc import abstractmethod, ABC +from abc import ABC, abstractmethod from typing import Callable, ContextManager, Type import xarray as xr @@ -86,10 +86,8 @@ def to_slice_source( slice_index: int, ) -> SliceSource | ContextManager[xr.Dataset]: # prevent cyclic import - from .sources import MemorySliceSource - from .sources import PersistentSliceSource - from .sources import TemporarySliceSource from .callable import invoke_slice_callable + from .sources import MemorySliceSource, PersistentSliceSource, TemporarySliceSource slice_callable = ctx.config.slice_source if slice_callable is not None: diff --git a/zappend/slice/sources/__init__.py b/zappend/slice/sources/__init__.py index dbf79c1..5905134 100644 --- a/zappend/slice/sources/__init__.py +++ b/zappend/slice/sources/__init__.py @@ -5,3 +5,9 @@ from .memory import MemorySliceSource from .persistent import PersistentSliceSource from .temporary import TemporarySliceSource + +__all__ = [ + "MemorySliceSource", + "PersistentSliceSource", + "TemporarySliceSource", +] diff --git a/zappend/slice/sources/memory.py b/zappend/slice/sources/memory.py index 14887f1..748b9d9 100644 --- a/zappend/slice/sources/memory.py +++ b/zappend/slice/sources/memory.py @@ -5,6 +5,7 @@ import xarray as xr from zappend.log import logger + from ..source import SliceSource diff --git a/zappend/slice/sources/persistent.py b/zappend/slice/sources/persistent.py index a0934ef..c63917c 100644 --- a/zappend/slice/sources/persistent.py +++ b/zappend/slice/sources/persistent.py @@ -10,6 +10,7 @@ from zappend.context import Context from zappend.fsutil.fileobj import FileObj from zappend.log import logger + from ..source import SliceSource diff --git a/zappend/slice/sources/temporary.py b/zappend/slice/sources/temporary.py index d469667..2f8d43a 100644 --- a/zappend/slice/sources/temporary.py +++ b/zappend/slice/sources/temporary.py @@ -7,6 +7,7 @@ from zappend.context import Context from zappend.fsutil.fileobj import FileObj from zappend.log import logger + from .memory import MemorySliceSource @@ -34,8 +35,7 @@ def get_dataset(self) -> xr.Dataset: temp_slice_dir.path, create=True ) logger.info( - f"Persisting in-memory slice dataset #{slice_index}" - f" to {temp_slice_dir.uri}" + f"Persisting in-memory slice dataset #{slice_index} to {temp_slice_dir.uri}" ) self._slice_ds.to_zarr(temp_slice_store) self._slice_ds = None From 8a6ace839394890fc8134a6d1ff5192815ef6c29 Mon Sep 17 00:00:00 2001 From: Norman Fomferra Date: Tue, 15 Apr 2025 15:07:39 +0200 Subject: [PATCH 7/9] updated copyright --- .editorconfig | 2 +- CHANGES.md | 4 +++- mkdocs.yml | 2 +- tests/__init__.py | 2 +- tests/config/test_attrs.py | 2 +- tests/config/test_config.py | 2 +- tests/config/test_normalize.py | 2 +- tests/config/test_schema.py | 2 +- tests/config/test_validate.py | 2 +- tests/contrib/__init__.py | 2 +- tests/contrib/test_levels.py | 2 +- tests/fsutil/__init__.py | 2 +- tests/fsutil/test_fileobj.py | 2 +- tests/fsutil/test_path.py | 2 +- tests/fsutil/test_transaction.py | 2 +- tests/helpers.py | 2 +- tests/slice/test_callable.py | 2 +- tests/slice/test_cm.py | 2 +- tests/slice/test_source.py | 2 +- tests/test_api.py | 2 +- tests/test_cli.py | 2 +- tests/test_context.py | 2 +- tests/test_log.py | 2 +- tests/test_metadata.py | 2 +- tests/test_processor.py | 2 +- tests/test_profiler.py | 2 +- tests/test_rollbackstore.py | 2 +- tests/test_tailoring.py | 2 +- tests/test_xrencoding.py | 2 +- zappend/__init__.py | 2 +- zappend/api.py | 2 +- zappend/cli.py | 2 +- zappend/config/__init__.py | 2 +- zappend/config/attrs.py | 2 +- zappend/config/config.py | 2 +- zappend/config/defaults.py | 2 +- zappend/config/markdown.py | 2 +- zappend/config/normalize.py | 2 +- zappend/config/schema.py | 2 +- zappend/config/validate.py | 2 +- zappend/context.py | 2 +- zappend/contrib/__init__.py | 2 +- zappend/contrib/levels.py | 2 +- zappend/fsutil/__init__.py | 2 +- zappend/fsutil/fileobj.py | 2 +- zappend/fsutil/path.py | 2 +- zappend/fsutil/transaction.py | 2 +- zappend/log.py | 2 +- zappend/metadata.py | 2 +- zappend/processor.py | 2 +- zappend/profiler.py | 2 +- zappend/rollbackstore.py | 2 +- zappend/slice/__init__.py | 2 +- zappend/slice/callable.py | 2 +- zappend/slice/cm.py | 2 +- zappend/slice/source.py | 2 +- zappend/slice/sources/__init__.py | 2 +- zappend/slice/sources/memory.py | 2 +- zappend/slice/sources/persistent.py | 2 +- zappend/slice/sources/temporary.py | 2 +- zappend/tailoring.py | 2 +- 61 files changed, 63 insertions(+), 61 deletions(-) diff --git a/.editorconfig b/.editorconfig index 0190dcd..99c380a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,4 +1,4 @@ -# Copyright © 2023 Norman Fomferra +# Copyright © 2024, 2025 Brockmann Consult # Permission granted under conditions of the MIT license, # see https://mit-license.org/ diff --git a/CHANGES.md b/CHANGES.md index 2ffcf9b..438b28a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,8 +1,10 @@ ## Version 0.8.1 (in development) * Replaced dev tools black and flake8 by isort and ruff. - +* Reformatted code and fixed linter issues. * Added `environment.yml` to setup a conda/mamba development environment. +* Updated copyright notice. + ## Version 0.8.0 (from 2024-10-04) diff --git a/mkdocs.yml b/mkdocs.yml index 5237e9d..1977b63 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -2,7 +2,7 @@ site_name: zappend repo_url: https://github.com/bcdev/zappend repo_name: bcdev/zappend -copyright: Copyright © 2024 Brockmann Consult +copyright: Copyright © 2024, 2025 Brockmann Consult and contributors nav: - Overview: index.md diff --git a/tests/__init__.py b/tests/__init__.py index cd88eca..34898ad 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,3 +1,3 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/tests/config/test_attrs.py b/tests/config/test_attrs.py index 211535f..9198091 100644 --- a/tests/config/test_attrs.py +++ b/tests/config/test_attrs.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/tests/config/test_config.py b/tests/config/test_config.py index c208125..ae807b7 100644 --- a/tests/config/test_config.py +++ b/tests/config/test_config.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/tests/config/test_normalize.py b/tests/config/test_normalize.py index 3c15a11..e45b811 100644 --- a/tests/config/test_normalize.py +++ b/tests/config/test_normalize.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/tests/config/test_schema.py b/tests/config/test_schema.py index 8db1c14..e7f966f 100644 --- a/tests/config/test_schema.py +++ b/tests/config/test_schema.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/tests/config/test_validate.py b/tests/config/test_validate.py index 6fcf246..fa81750 100644 --- a/tests/config/test_validate.py +++ b/tests/config/test_validate.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/tests/contrib/__init__.py b/tests/contrib/__init__.py index cd88eca..34898ad 100644 --- a/tests/contrib/__init__.py +++ b/tests/contrib/__init__.py @@ -1,3 +1,3 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/tests/contrib/test_levels.py b/tests/contrib/test_levels.py index dea8e57..f75dd05 100644 --- a/tests/contrib/test_levels.py +++ b/tests/contrib/test_levels.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/tests/fsutil/__init__.py b/tests/fsutil/__init__.py index cd88eca..34898ad 100644 --- a/tests/fsutil/__init__.py +++ b/tests/fsutil/__init__.py @@ -1,3 +1,3 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/tests/fsutil/test_fileobj.py b/tests/fsutil/test_fileobj.py index c6456bd..9f82115 100644 --- a/tests/fsutil/test_fileobj.py +++ b/tests/fsutil/test_fileobj.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/tests/fsutil/test_path.py b/tests/fsutil/test_path.py index 82149d7..9ab3dc9 100644 --- a/tests/fsutil/test_path.py +++ b/tests/fsutil/test_path.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/tests/fsutil/test_transaction.py b/tests/fsutil/test_transaction.py index 59d0f49..4bf8d15 100644 --- a/tests/fsutil/test_transaction.py +++ b/tests/fsutil/test_transaction.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/tests/helpers.py b/tests/helpers.py index eeae823..786a762 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/tests/slice/test_callable.py b/tests/slice/test_callable.py index c050fbd..2f7424e 100644 --- a/tests/slice/test_callable.py +++ b/tests/slice/test_callable.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/tests/slice/test_cm.py b/tests/slice/test_cm.py index 7800579..788f508 100644 --- a/tests/slice/test_cm.py +++ b/tests/slice/test_cm.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/tests/slice/test_source.py b/tests/slice/test_source.py index 2abae09..1b05de4 100644 --- a/tests/slice/test_source.py +++ b/tests/slice/test_source.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/tests/test_api.py b/tests/test_api.py index 2c4c7a2..a154e17 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/tests/test_cli.py b/tests/test_cli.py index 7428cf9..de7ecce 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/tests/test_context.py b/tests/test_context.py index 19d6ad7..654c9d6 100644 --- a/tests/test_context.py +++ b/tests/test_context.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/tests/test_log.py b/tests/test_log.py index 5946557..f522e95 100644 --- a/tests/test_log.py +++ b/tests/test_log.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/tests/test_metadata.py b/tests/test_metadata.py index 3f00cf3..72e5c85 100644 --- a/tests/test_metadata.py +++ b/tests/test_metadata.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/tests/test_processor.py b/tests/test_processor.py index 07addcc..a5c6473 100644 --- a/tests/test_processor.py +++ b/tests/test_processor.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/tests/test_profiler.py b/tests/test_profiler.py index 8f1e85f..7d1a5af 100644 --- a/tests/test_profiler.py +++ b/tests/test_profiler.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/tests/test_rollbackstore.py b/tests/test_rollbackstore.py index 281529c..da22a4a 100644 --- a/tests/test_rollbackstore.py +++ b/tests/test_rollbackstore.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/tests/test_tailoring.py b/tests/test_tailoring.py index 62de941..3c62719 100644 --- a/tests/test_tailoring.py +++ b/tests/test_tailoring.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/tests/test_xrencoding.py b/tests/test_xrencoding.py index 68ce2f9..688c250 100644 --- a/tests/test_xrencoding.py +++ b/tests/test_xrencoding.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/__init__.py b/zappend/__init__.py index 465aaf5..2429edd 100644 --- a/zappend/__init__.py +++ b/zappend/__init__.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/api.py b/zappend/api.py index 3b15716..85941e5 100644 --- a/zappend/api.py +++ b/zappend/api.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/cli.py b/zappend/cli.py index d65f05b..5e8ded4 100644 --- a/zappend/cli.py +++ b/zappend/cli.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. import sys diff --git a/zappend/config/__init__.py b/zappend/config/__init__.py index 8aa8fcf..0fb4d47 100644 --- a/zappend/config/__init__.py +++ b/zappend/config/__init__.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/config/attrs.py b/zappend/config/attrs.py index 4d9a1f1..d58c60f 100644 --- a/zappend/config/attrs.py +++ b/zappend/config/attrs.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/config/config.py b/zappend/config/config.py index 5722b79..fb0ce0a 100644 --- a/zappend/config/config.py +++ b/zappend/config/config.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/config/defaults.py b/zappend/config/defaults.py index 50aca27..00196e5 100644 --- a/zappend/config/defaults.py +++ b/zappend/config/defaults.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/config/markdown.py b/zappend/config/markdown.py index 397e759..b29239b 100644 --- a/zappend/config/markdown.py +++ b/zappend/config/markdown.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/config/normalize.py b/zappend/config/normalize.py index 587980b..2883bb9 100644 --- a/zappend/config/normalize.py +++ b/zappend/config/normalize.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/config/schema.py b/zappend/config/schema.py index 6f5a439..601fb77 100644 --- a/zappend/config/schema.py +++ b/zappend/config/schema.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/config/validate.py b/zappend/config/validate.py index 1c5c060..1887d2f 100644 --- a/zappend/config/validate.py +++ b/zappend/config/validate.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/context.py b/zappend/context.py index bc5c7de..69f6916 100644 --- a/zappend/context.py +++ b/zappend/context.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/contrib/__init__.py b/zappend/contrib/__init__.py index d2d9002..b8a10f9 100644 --- a/zappend/contrib/__init__.py +++ b/zappend/contrib/__init__.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/contrib/levels.py b/zappend/contrib/levels.py index 072f99a..e4341ec 100644 --- a/zappend/contrib/levels.py +++ b/zappend/contrib/levels.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/fsutil/__init__.py b/zappend/fsutil/__init__.py index a054a1a..3396aa2 100644 --- a/zappend/fsutil/__init__.py +++ b/zappend/fsutil/__init__.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/fsutil/fileobj.py b/zappend/fsutil/fileobj.py index 7c0ade3..9d80b7a 100644 --- a/zappend/fsutil/fileobj.py +++ b/zappend/fsutil/fileobj.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/fsutil/path.py b/zappend/fsutil/path.py index 768e917..a841c15 100644 --- a/zappend/fsutil/path.py +++ b/zappend/fsutil/path.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/fsutil/transaction.py b/zappend/fsutil/transaction.py index 5fd5fc1..e427a40 100644 --- a/zappend/fsutil/transaction.py +++ b/zappend/fsutil/transaction.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/log.py b/zappend/log.py index 92bbfde..2ee0db8 100644 --- a/zappend/log.py +++ b/zappend/log.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/metadata.py b/zappend/metadata.py index 66712d3..5cd5f19 100644 --- a/zappend/metadata.py +++ b/zappend/metadata.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/processor.py b/zappend/processor.py index d26570d..0e6764d 100644 --- a/zappend/processor.py +++ b/zappend/processor.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/profiler.py b/zappend/profiler.py index 414bb49..1f787c4 100644 --- a/zappend/profiler.py +++ b/zappend/profiler.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/rollbackstore.py b/zappend/rollbackstore.py index ac41f48..d64adad 100644 --- a/zappend/rollbackstore.py +++ b/zappend/rollbackstore.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/slice/__init__.py b/zappend/slice/__init__.py index c89bd0e..037844e 100644 --- a/zappend/slice/__init__.py +++ b/zappend/slice/__init__.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/slice/callable.py b/zappend/slice/callable.py index d97d89d..95abf88 100644 --- a/zappend/slice/callable.py +++ b/zappend/slice/callable.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/slice/cm.py b/zappend/slice/cm.py index 1d94ba7..62b5ed5 100644 --- a/zappend/slice/cm.py +++ b/zappend/slice/cm.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/slice/source.py b/zappend/slice/source.py index 3b0ddd4..2f724db 100644 --- a/zappend/slice/source.py +++ b/zappend/slice/source.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/slice/sources/__init__.py b/zappend/slice/sources/__init__.py index 5905134..c995056 100644 --- a/zappend/slice/sources/__init__.py +++ b/zappend/slice/sources/__init__.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/slice/sources/memory.py b/zappend/slice/sources/memory.py index 748b9d9..f30c9d5 100644 --- a/zappend/slice/sources/memory.py +++ b/zappend/slice/sources/memory.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/slice/sources/persistent.py b/zappend/slice/sources/persistent.py index c63917c..e0387ad 100644 --- a/zappend/slice/sources/persistent.py +++ b/zappend/slice/sources/persistent.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/slice/sources/temporary.py b/zappend/slice/sources/temporary.py index 2f8d43a..d4e5d3b 100644 --- a/zappend/slice/sources/temporary.py +++ b/zappend/slice/sources/temporary.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. diff --git a/zappend/tailoring.py b/zappend/tailoring.py index f103b2f..cde38ec 100644 --- a/zappend/tailoring.py +++ b/zappend/tailoring.py @@ -1,4 +1,4 @@ -# Copyright © 2024 Norman Fomferra and contributors +# Copyright © 2024, 2025 Brockmann Consult and contributors # Permissions are hereby granted under the terms of the MIT License: # https://opensource.org/licenses/MIT. From c1a3b2e94fb7df5aab7b87b1c29978b3a49e1d3a Mon Sep 17 00:00:00 2001 From: Norman Fomferra Date: Tue, 15 Apr 2025 15:25:39 +0200 Subject: [PATCH 8/9] back to zarr 2 --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 19aa584..cd67684 100644 --- a/environment.yml +++ b/environment.yml @@ -12,7 +12,7 @@ dependencies: - numpy - pyyaml - xarray - - zarr >=2.18,!=3.0.0,!=3.0.1 + - zarr >=2.18,<3 # Dev Dependencies - isort - pytest From 8777eca8ad6c3d2a51212a50b85fc476f84a4e6e Mon Sep 17 00:00:00 2001 From: Norman Fomferra Date: Tue, 15 Apr 2025 15:26:49 +0200 Subject: [PATCH 9/9] back to zarr 2 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6c3e8fa..5b69b4e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ dependencies = [ "numpy", "pyyaml", "xarray", - "zarr" + "zarr >=2,<3" ] [tool.setuptools.dynamic]