anemoi-utils 0.4.14__tar.gz → 0.4.16__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of anemoi-utils might be problematic. Click here for more details.
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/.github/workflows/downstream-ci-hpc.yml +3 -3
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/.pre-commit-config.yaml +6 -6
- anemoi_utils-0.4.16/.release-please-manifest.json +3 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/CHANGELOG.md +14 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/PKG-INFO +1 -1
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/_version.py +2 -2
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/devtools.py +4 -6
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/humanize.py +4 -10
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/registry.py +17 -2
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi_utils.egg-info/PKG-INFO +1 -1
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/tests/test_remote.py +6 -0
- anemoi_utils-0.4.14/.release-please-manifest.json +0 -3
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/.gitattributes +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/.github/CODEOWNERS +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/.github/ci-hpc-config.yml +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/.github/dependabot.yml +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/.github/labeler.yml +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/.github/pull_request_template.md +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/.github/release.yml +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/.github/workflows/pr-conventional-commit.yml +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/.github/workflows/pr-label-conventional-commits.yml +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/.github/workflows/pr-label-file-based.yml +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/.github/workflows/pr-label-public.yml +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/.github/workflows/python-publish.yml +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/.github/workflows/python-pull-request.yml +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/.github/workflows/readthedocs-pr-update.yml +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/.github/workflows/release-please.yml +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/.gitignore +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/.readthedocs.yaml +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/.release-please-config.json +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/CONTRIBUTORS.md +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/LICENSE +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/README.md +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/docs/Makefile +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/docs/_static/logo.png +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/docs/_static/style.css +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/docs/_templates/.gitkeep +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/docs/conf.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/docs/index.rst +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/docs/installing.rst +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/docs/modules/checkpoints.rst +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/docs/modules/config.rst +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/docs/modules/dates.rst +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/docs/modules/grib.rst +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/docs/modules/humanize.rst +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/docs/modules/provenance.rst +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/docs/modules/s3.rst +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/docs/modules/text.rst +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/pyproject.toml +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/setup.cfg +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/__init__.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/__main__.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/caching.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/checkpoints.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/cli.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/commands/__init__.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/commands/config.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/commands/requests.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/compatibility.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/config.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/dates.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/grib.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/grids.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/hindcasts.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/logs.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/mars/__init__.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/mars/mars.yaml +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/mars/requests.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/provenance.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/remote/__init__.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/remote/s3.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/remote/ssh.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/s3.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/sanitise.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/sanitize.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/testing.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/text.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi/utils/timer.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi_utils.egg-info/SOURCES.txt +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi_utils.egg-info/dependency_links.txt +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi_utils.egg-info/entry_points.txt +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi_utils.egg-info/requires.txt +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/src/anemoi_utils.egg-info/top_level.txt +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/tests/test-transfer-data/directory/b/c/x +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/tests/test-transfer-data/directory/b/y +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/tests/test-transfer-data/directory/exotic filename ;^/"'[=.,#]()/303/252/303/274/303/247/303/262/342/234/205.txt" +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/tests/test-transfer-data/directory/z +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/tests/test-transfer-data/file +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/tests/test_caching.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/tests/test_compatibility.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/tests/test_dates.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/tests/test_frequency.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/tests/test_grids.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/tests/test_provenance.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/tests/test_sanetise.py +0 -0
- {anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/tests/test_utils.py +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# This workflow triggers tests on dependent packages.
|
|
2
|
-
# The dependency tree itself is defined in ecmwf
|
|
2
|
+
# The dependency tree itself is defined in ecmwf/downstream-ci/
|
|
3
3
|
name: Test downstream dependent packages on HPC
|
|
4
4
|
|
|
5
5
|
on:
|
|
@@ -38,7 +38,7 @@ jobs:
|
|
|
38
38
|
downstream-ci:
|
|
39
39
|
name: downstream-ci
|
|
40
40
|
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
|
|
41
|
-
uses: ecmwf
|
|
41
|
+
uses: ecmwf/downstream-ci/.github/workflows/downstream-ci.yml@main
|
|
42
42
|
with:
|
|
43
43
|
anemoi-utils: ecmwf/anemoi-utils@${{ github.event.pull_request.head.sha || github.sha }}
|
|
44
44
|
codecov_upload: true
|
|
@@ -54,7 +54,7 @@ jobs:
|
|
|
54
54
|
# downstream-ci-hpc:
|
|
55
55
|
# name: downstream-ci-hpc
|
|
56
56
|
# if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
|
|
57
|
-
# uses: ecmwf
|
|
57
|
+
# uses: ecmwf/downstream-ci/.github/workflows/downstream-ci-hpc.yml@main
|
|
58
58
|
# with:
|
|
59
59
|
# anemoi-utils: ecmwf/anemoi-utils@${{ github.event.pull_request.head.sha || github.sha }}
|
|
60
60
|
# secrets: inherit
|
|
@@ -27,12 +27,12 @@ repos:
|
|
|
27
27
|
- id: python-check-blanket-noqa # Check for # noqa: all
|
|
28
28
|
- id: python-no-log-warn # Check for log.warn
|
|
29
29
|
- repo: https://github.com/psf/black-pre-commit-mirror
|
|
30
|
-
rev:
|
|
30
|
+
rev: 24.10.0
|
|
31
31
|
hooks:
|
|
32
32
|
- id: black
|
|
33
33
|
args: [--line-length=120]
|
|
34
34
|
- repo: https://github.com/pycqa/isort
|
|
35
|
-
rev:
|
|
35
|
+
rev: 5.13.2
|
|
36
36
|
hooks:
|
|
37
37
|
- id: isort
|
|
38
38
|
args:
|
|
@@ -40,7 +40,7 @@ repos:
|
|
|
40
40
|
- --force-single-line-imports
|
|
41
41
|
- --profile black
|
|
42
42
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
43
|
-
rev: v0.
|
|
43
|
+
rev: v0.8.6
|
|
44
44
|
hooks:
|
|
45
45
|
- id: ruff
|
|
46
46
|
args:
|
|
@@ -60,16 +60,16 @@ repos:
|
|
|
60
60
|
- id: rstfmt
|
|
61
61
|
exclude: '(cli|schemas)/.*' # Because we use argparse and pydantic sphinx directives
|
|
62
62
|
- repo: https://github.com/b8raoult/pre-commit-docconvert
|
|
63
|
-
rev: "0.1.
|
|
63
|
+
rev: "0.1.4"
|
|
64
64
|
hooks:
|
|
65
65
|
- id: docconvert
|
|
66
66
|
args: ["numpy"]
|
|
67
67
|
- repo: https://github.com/tox-dev/pyproject-fmt
|
|
68
|
-
rev: "v2.5.
|
|
68
|
+
rev: "v2.5.0"
|
|
69
69
|
hooks:
|
|
70
70
|
- id: pyproject-fmt
|
|
71
71
|
- repo: https://github.com/jshwi/docsig # Check docstrings against function sig
|
|
72
|
-
rev: v0.
|
|
72
|
+
rev: v0.66.1
|
|
73
73
|
hooks:
|
|
74
74
|
- id: docsig
|
|
75
75
|
args:
|
|
@@ -8,6 +8,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
8
8
|
Please add your functional changes to the appropriate section in the PR.
|
|
9
9
|
Keep it human-readable, your future self will thank you!
|
|
10
10
|
|
|
11
|
+
## [0.4.16](https://github.com/ecmwf/anemoi-utils/compare/0.4.15...0.4.16) (2025-03-22)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* support plugin errors ([#118](https://github.com/ecmwf/anemoi-utils/issues/118)) ([1f0bb30](https://github.com/ecmwf/anemoi-utils/commit/1f0bb30d4d9441e6883c060e35fe4410f0c91833))
|
|
17
|
+
|
|
18
|
+
## [0.4.15](https://github.com/ecmwf/anemoi-utils/compare/0.4.14...0.4.15) (2025-03-21)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
* accept hyphens in factory names ([#116](https://github.com/ecmwf/anemoi-utils/issues/116)) ([ada96e9](https://github.com/ecmwf/anemoi-utils/commit/ada96e911b592ff9d95d3a93fff5a6aa21cdebbe))
|
|
24
|
+
|
|
11
25
|
## [0.4.14](https://github.com/ecmwf/anemoi-utils/compare/0.4.13...0.4.14) (2025-03-21)
|
|
12
26
|
|
|
13
27
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: anemoi-utils
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.16
|
|
4
4
|
Summary: A package to hold various functions to support training of ML models on ECMWF data.
|
|
5
5
|
Author-email: "European Centre for Medium-Range Weather Forecasts (ECMWF)" <software.support@ecmwf.int>
|
|
6
6
|
License: Apache License
|
|
@@ -81,13 +81,11 @@ def plot_values(
|
|
|
81
81
|
ax.add_feature(cfeature.BORDERS, linestyle=":")
|
|
82
82
|
|
|
83
83
|
missing_values = np.isnan(values)
|
|
84
|
-
|
|
85
84
|
if missing_value is None:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
values = np.where(missing_values, missing_value, values)
|
|
85
|
+
min = np.nanmin(values)
|
|
86
|
+
missing_value = min - np.abs(min) * 0.001
|
|
87
|
+
|
|
88
|
+
values = np.where(missing_values, missing_value, values)
|
|
91
89
|
|
|
92
90
|
if max_value is not None:
|
|
93
91
|
values = np.where(values > max_value, max_value, values)
|
|
@@ -48,7 +48,7 @@ def bytes_to_human(n: float) -> str:
|
|
|
48
48
|
"""
|
|
49
49
|
if n < 0:
|
|
50
50
|
sign = "-"
|
|
51
|
-
n
|
|
51
|
+
n = -n
|
|
52
52
|
else:
|
|
53
53
|
sign = ""
|
|
54
54
|
|
|
@@ -411,15 +411,9 @@ def when(
|
|
|
411
411
|
if years > 1:
|
|
412
412
|
return _("%d years" % (years,))
|
|
413
413
|
|
|
414
|
-
|
|
415
|
-
if
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
d = abs(now.month - month)
|
|
419
|
-
if d >= 12:
|
|
420
|
-
return _("a year")
|
|
421
|
-
else:
|
|
422
|
-
return _("%d month%s" % (d, _plural(d)))
|
|
414
|
+
delta = abs(now - then)
|
|
415
|
+
if delta.days > 1 and delta.days < 30:
|
|
416
|
+
return _("%d days" % (delta.days,))
|
|
423
417
|
|
|
424
418
|
return "on %s %d %s %d" % (
|
|
425
419
|
DOW[then.weekday()],
|
|
@@ -88,14 +88,17 @@ class Registry:
|
|
|
88
88
|
The package name.
|
|
89
89
|
key : str, optional
|
|
90
90
|
The key to use for the registry, by default "_type".
|
|
91
|
+
api_version : str, optional
|
|
92
|
+
The API version, by default '1.0.0'.
|
|
91
93
|
"""
|
|
92
94
|
|
|
93
|
-
def __init__(self, package: str, key: str = "_type"):
|
|
95
|
+
def __init__(self, package: str, key: str = "_type", api_version: str = "1.0.0"):
|
|
94
96
|
self.package = package
|
|
95
97
|
self.__registered = {}
|
|
96
98
|
self._sources = {}
|
|
97
99
|
self.kind = package.split(".")[-1]
|
|
98
100
|
self.key = key
|
|
101
|
+
self.api_version = api_version
|
|
99
102
|
_BY_KIND[self.kind] = self
|
|
100
103
|
|
|
101
104
|
@classmethod
|
|
@@ -133,6 +136,9 @@ class Registry:
|
|
|
133
136
|
Wrapper, optional
|
|
134
137
|
A wrapper if the factory is None, otherwise None.
|
|
135
138
|
"""
|
|
139
|
+
|
|
140
|
+
name = name.replace("_", "-")
|
|
141
|
+
|
|
136
142
|
if factory is None:
|
|
137
143
|
# This happens when the @register decorator is used
|
|
138
144
|
return Wrapper(name, self)
|
|
@@ -162,7 +168,7 @@ class Registry:
|
|
|
162
168
|
except Exception as e:
|
|
163
169
|
if DEBUG_ANEMOI_REGISTRY:
|
|
164
170
|
raise
|
|
165
|
-
self.
|
|
171
|
+
self.__registered[name] = Error(e)
|
|
166
172
|
|
|
167
173
|
def is_registered(self, name: str) -> bool:
|
|
168
174
|
"""Check if a factory is registered.
|
|
@@ -177,6 +183,9 @@ class Registry:
|
|
|
177
183
|
bool
|
|
178
184
|
Whether the factory is registered.
|
|
179
185
|
"""
|
|
186
|
+
|
|
187
|
+
name = name.replace("_", "-")
|
|
188
|
+
|
|
180
189
|
ok = name in self.factories
|
|
181
190
|
if not ok:
|
|
182
191
|
LOG.error(f"Cannot find '{name}' in {self.package}")
|
|
@@ -199,6 +208,9 @@ class Registry:
|
|
|
199
208
|
Callable, optional
|
|
200
209
|
The factory if found, otherwise None.
|
|
201
210
|
"""
|
|
211
|
+
|
|
212
|
+
name = name.replace("_", "-")
|
|
213
|
+
|
|
202
214
|
if return_none:
|
|
203
215
|
return self.factories.get(name)
|
|
204
216
|
|
|
@@ -288,6 +300,9 @@ class Registry:
|
|
|
288
300
|
Any
|
|
289
301
|
The created instance.
|
|
290
302
|
"""
|
|
303
|
+
|
|
304
|
+
name = name.replace("_", "-")
|
|
305
|
+
|
|
291
306
|
factory = self.lookup(name)
|
|
292
307
|
return factory(*args, **kwargs)
|
|
293
308
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: anemoi-utils
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.16
|
|
4
4
|
Summary: A package to hold various functions to support training of ML models on ECMWF data.
|
|
5
5
|
Author-email: "European Centre for Medium-Range Weather Forecasts (ECMWF)" <software.support@ecmwf.int>
|
|
6
6
|
License: Apache License
|
|
@@ -7,12 +7,14 @@
|
|
|
7
7
|
|
|
8
8
|
import os
|
|
9
9
|
import shutil
|
|
10
|
+
import sys
|
|
10
11
|
|
|
11
12
|
import pytest
|
|
12
13
|
|
|
13
14
|
from anemoi.utils.remote import TransferMethodNotImplementedError
|
|
14
15
|
from anemoi.utils.remote import _find_transfer_class
|
|
15
16
|
from anemoi.utils.remote import transfer
|
|
17
|
+
from anemoi.utils.testing import packages_installed
|
|
16
18
|
|
|
17
19
|
IN_CI = (os.environ.get("GITHUB_WORKFLOW") is not None) or (os.environ.get("IN_CI_HPC") is not None)
|
|
18
20
|
|
|
@@ -112,6 +114,7 @@ def test_transfer_find_none(source: str, target: str) -> None:
|
|
|
112
114
|
|
|
113
115
|
|
|
114
116
|
@pytest.mark.skipif(IN_CI, reason="Test requires access to S3")
|
|
117
|
+
@pytest.mark.skipif(not packages_installed("boto3"), reason="boto3 is not installed")
|
|
115
118
|
def test_transfer_zarr_s3_to_local(tmpdir: pytest.TempPathFactory) -> None:
|
|
116
119
|
"""Test transferring a Zarr file from S3 to local.
|
|
117
120
|
|
|
@@ -132,6 +135,7 @@ def test_transfer_zarr_s3_to_local(tmpdir: pytest.TempPathFactory) -> None:
|
|
|
132
135
|
|
|
133
136
|
|
|
134
137
|
@pytest.mark.skipif(IN_CI, reason="Test requires access to S3")
|
|
138
|
+
@pytest.mark.skipif(not packages_installed("boto3"), reason="boto3 is not installed")
|
|
135
139
|
def test_transfer_zarr_local_to_s3(tmpdir: pytest.TempPathFactory) -> None:
|
|
136
140
|
"""Test transferring a Zarr file from local to S3.
|
|
137
141
|
|
|
@@ -193,6 +197,7 @@ def compare(local1: str, local2: str) -> None:
|
|
|
193
197
|
|
|
194
198
|
|
|
195
199
|
@pytest.mark.skipif(IN_CI, reason="Test requires access to S3")
|
|
200
|
+
@pytest.mark.skipif(not packages_installed("boto3"), reason="boto3 is not installed")
|
|
196
201
|
@pytest.mark.parametrize("path", ["directory/", "file"])
|
|
197
202
|
def test_transfer_local_to_s3_to_local(path: str) -> None:
|
|
198
203
|
"""Test transferring a file or directory from local to S3 and back to local.
|
|
@@ -224,6 +229,7 @@ def test_transfer_local_to_s3_to_local(path: str) -> None:
|
|
|
224
229
|
|
|
225
230
|
|
|
226
231
|
@pytest.mark.skipif(IN_CI, reason="Test requires ssh access to localhost")
|
|
232
|
+
@pytest.mark.skipif(sys.platform == "darwin", reason="Does not work on MacOS")
|
|
227
233
|
@pytest.mark.parametrize("path", ["directory", "file"])
|
|
228
234
|
@pytest.mark.parametrize("temporary_target", [True, False])
|
|
229
235
|
def test_transfer_local_to_ssh(path: str, temporary_target: bool) -> None:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{anemoi_utils-0.4.14 → anemoi_utils-0.4.16}/.github/workflows/pr-label-conventional-commits.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|