anemoi-utils 0.3.9__tar.gz → 0.3.10__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.3.9/src/anemoi_utils.egg-info → anemoi_utils-0.3.10}/PKG-INFO +1 -1
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/src/anemoi/utils/_version.py +2 -2
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/src/anemoi/utils/commands/config.py +2 -2
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/src/anemoi/utils/config.py +6 -6
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10/src/anemoi_utils.egg-info}/PKG-INFO +1 -1
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/.github/workflows/python-publish.yml +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/.gitignore +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/.pre-commit-config.yaml +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/.readthedocs.yaml +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/LICENSE +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/README.md +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/docs/Makefile +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/docs/_static/logo.png +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/docs/_static/style.css +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/docs/_templates/.gitkeep +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/docs/conf.py +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/docs/index.rst +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/docs/installing.rst +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/docs/modules/checkpoints.rst +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/docs/modules/config.rst +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/docs/modules/dates.rst +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/docs/modules/grib.rst +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/docs/modules/humanize.rst +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/docs/modules/provenance.rst +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/docs/modules/s3.rst +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/docs/modules/text.rst +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/docs/requirements.txt +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/pyproject.toml +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/setup.cfg +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/src/anemoi/utils/__init__.py +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/src/anemoi/utils/__main__.py +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/src/anemoi/utils/caching.py +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/src/anemoi/utils/checkpoints.py +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/src/anemoi/utils/cli.py +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/src/anemoi/utils/commands/__init__.py +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/src/anemoi/utils/dates.py +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/src/anemoi/utils/grib.py +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/src/anemoi/utils/hindcasts.py +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/src/anemoi/utils/humanize.py +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/src/anemoi/utils/mars/__init__.py +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/src/anemoi/utils/mars/mars.yaml +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/src/anemoi/utils/provenance.py +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/src/anemoi/utils/s3.py +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/src/anemoi/utils/text.py +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/src/anemoi/utils/timer.py +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/src/anemoi_utils.egg-info/SOURCES.txt +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/src/anemoi_utils.egg-info/dependency_links.txt +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/src/anemoi_utils.egg-info/entry_points.txt +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/src/anemoi_utils.egg-info/requires.txt +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/src/anemoi_utils.egg-info/top_level.txt +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/tests/test_dates.py +0 -0
- {anemoi_utils-0.3.9 → anemoi_utils-0.3.10}/tests/test_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: anemoi-utils
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.10
|
|
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
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
import json
|
|
13
13
|
|
|
14
|
-
from ..config import
|
|
14
|
+
from ..config import config_path
|
|
15
15
|
from ..config import load_config
|
|
16
16
|
from . import Command
|
|
17
17
|
|
|
@@ -23,7 +23,7 @@ class Config(Command):
|
|
|
23
23
|
|
|
24
24
|
def run(self, args):
|
|
25
25
|
if args.path:
|
|
26
|
-
print(
|
|
26
|
+
print(config_path())
|
|
27
27
|
else:
|
|
28
28
|
print(json.dumps(load_config(), indent=4))
|
|
29
29
|
|
|
@@ -143,7 +143,7 @@ def _set_defaults(a, b):
|
|
|
143
143
|
a.setdefault(k, v)
|
|
144
144
|
|
|
145
145
|
|
|
146
|
-
def
|
|
146
|
+
def config_path(name="settings.toml"):
|
|
147
147
|
global QUIET
|
|
148
148
|
|
|
149
149
|
if name.startswith("/") or name.startswith("."):
|
|
@@ -208,7 +208,7 @@ def _load_config(name="settings.toml", secrets=None, defaults=None):
|
|
|
208
208
|
if name in CONFIG:
|
|
209
209
|
return CONFIG[name]
|
|
210
210
|
|
|
211
|
-
path =
|
|
211
|
+
path = config_path(name)
|
|
212
212
|
if os.path.exists(path):
|
|
213
213
|
config = load_any_dict_format(path)
|
|
214
214
|
else:
|
|
@@ -245,7 +245,7 @@ def _load_config(name="settings.toml", secrets=None, defaults=None):
|
|
|
245
245
|
def _save_config(name, data):
|
|
246
246
|
CONFIG.pop(name, None)
|
|
247
247
|
|
|
248
|
-
conf =
|
|
248
|
+
conf = config_path(name)
|
|
249
249
|
|
|
250
250
|
if conf.endswith(".json"):
|
|
251
251
|
with open(conf, "w") as f:
|
|
@@ -300,7 +300,7 @@ def load_config(name="settings.toml", secrets=None, defaults=None):
|
|
|
300
300
|
|
|
301
301
|
def load_raw_config(name, default=None):
|
|
302
302
|
|
|
303
|
-
path =
|
|
303
|
+
path = config_path(name)
|
|
304
304
|
if os.path.exists(path):
|
|
305
305
|
return load_any_dict_format(path)
|
|
306
306
|
|
|
@@ -324,13 +324,13 @@ def check_config_mode(name="settings.toml", secrets_name=None, secrets=None):
|
|
|
324
324
|
if name in CHECKED:
|
|
325
325
|
return
|
|
326
326
|
|
|
327
|
-
conf =
|
|
327
|
+
conf = config_path(name)
|
|
328
328
|
if not os.path.exists(conf):
|
|
329
329
|
return
|
|
330
330
|
mode = os.stat(conf).st_mode
|
|
331
331
|
if mode & 0o777 != 0o600:
|
|
332
332
|
if secrets_name:
|
|
333
|
-
secret_path =
|
|
333
|
+
secret_path = config_path(secrets_name)
|
|
334
334
|
raise SystemError(
|
|
335
335
|
f"Configuration file {conf} should not hold entries {secrets}.\n"
|
|
336
336
|
f"Please move them to {secret_path}."
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: anemoi-utils
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.10
|
|
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
|
|
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
|