anemoi-utils 0.4.29__py3-none-any.whl → 0.4.30__py3-none-any.whl

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/text.py CHANGED
@@ -13,10 +13,7 @@
13
13
  import re
14
14
  from collections import defaultdict
15
15
  from typing import Any
16
- from typing import List
17
16
  from typing import Optional
18
- from typing import Tuple
19
- from typing import Union
20
17
 
21
18
  # https://en.wikipedia.org/wiki/Box-drawing_character
22
19
 
@@ -61,7 +58,7 @@ def _has_ansi_escape(s: str) -> bool:
61
58
  return _ansi_escape.search(s) is not None
62
59
 
63
60
 
64
- def _split_tokens(s: str) -> List[Tuple[str, int]]:
61
+ def _split_tokens(s: str) -> list[tuple[str, int]]:
65
62
  """Split a string into a list of visual characters with their lengths.
66
63
 
67
64
  Parameters
@@ -104,7 +101,7 @@ def _split_tokens(s: str) -> List[Tuple[str, int]]:
104
101
  return out
105
102
 
106
103
 
107
- def visual_len(s: Union[str, List[Tuple[str, int]]]) -> int:
104
+ def visual_len(s: str | list[tuple[str, int]]) -> int:
108
105
  """Compute the length of a string as it appears on the terminal.
109
106
 
110
107
  Parameters
@@ -308,7 +305,7 @@ class Tree:
308
305
  return len(self._kids) == 0
309
306
 
310
307
  @property
311
- def key(self) -> Tuple:
308
+ def key(self) -> tuple:
312
309
  """Tuple: The key of the tree node."""
313
310
  return tuple(sorted(self._actor.as_dict().items()))
314
311
 
@@ -363,7 +360,7 @@ class Tree:
363
360
 
364
361
  self._print(padding)
365
362
 
366
- def _leaves(self, result: List["Tree"]) -> None:
363
+ def _leaves(self, result: list["Tree"]) -> None:
367
364
  """Collect all leaf nodes.
368
365
 
369
366
  Parameters
@@ -432,7 +429,7 @@ class Tree:
432
429
 
433
430
  return result
434
431
 
435
- def _print(self, padding: List[str]) -> None:
432
+ def _print(self, padding: list[str]) -> None:
436
433
  """Print the tree with padding.
437
434
 
438
435
  Parameters
@@ -480,7 +477,7 @@ class Tree:
480
477
  }
481
478
 
482
479
 
483
- def table(rows: List[List[Any]], header: List[str], align: List[str], margin: int = 0) -> str:
480
+ def table(rows: list[list[Any]], header: list[str], align: list[str], margin: int = 0) -> str:
484
481
  """Format a table.
485
482
 
486
483
  >>> table([['Aa', 12, 5],
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: anemoi-utils
3
- Version: 0.4.29
3
+ Version: 0.4.30
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
@@ -215,14 +215,13 @@ Classifier: Intended Audience :: Developers
215
215
  Classifier: License :: OSI Approved :: Apache Software License
216
216
  Classifier: Operating System :: OS Independent
217
217
  Classifier: Programming Language :: Python :: 3 :: Only
218
- Classifier: Programming Language :: Python :: 3.9
219
218
  Classifier: Programming Language :: Python :: 3.10
220
219
  Classifier: Programming Language :: Python :: 3.11
221
220
  Classifier: Programming Language :: Python :: 3.12
222
221
  Classifier: Programming Language :: Python :: 3.13
223
222
  Classifier: Programming Language :: Python :: Implementation :: CPython
224
223
  Classifier: Programming Language :: Python :: Implementation :: PyPy
225
- Requires-Python: >=3.9
224
+ Requires-Python: >=3.10
226
225
  License-File: LICENSE
227
226
  Requires-Dist: aniso8601
228
227
  Requires-Dist: deprecation
@@ -0,0 +1,47 @@
1
+ anemoi/utils/__init__.py,sha256=uVhpF-VjIl_4mMywOVtgTutgsdIsqz-xdkwxeMhzuag,730
2
+ anemoi/utils/__main__.py,sha256=6LlE4MYrPvqqrykxXh7XMi50UZteUY59NeM8P9Zs2dU,910
3
+ anemoi/utils/_version.py,sha256=48EOYakuSM69Aw_44I37F3bLAF_L6h50Dt8aIet8_CE,513
4
+ anemoi/utils/caching.py,sha256=wKkpsACniNCFK1nc5Tw18EAv9FJGYdhs5p8qsr8i_FI,6153
5
+ anemoi/utils/checkpoints.py,sha256=U197rvPUD1_XBA-VphgA0staFkgx2TzDoBdbnch-I7Y,9550
6
+ anemoi/utils/cli.py,sha256=p4sup42X7JW47AKM3IQn4_0-KUAlc5ceBMj8FYmSdlc,6500
7
+ anemoi/utils/compatibility.py,sha256=Yx4Yj3xL5q0PxYccM3N5qGeQxTtEPfaCz4EqjrS7CUc,2175
8
+ anemoi/utils/config.py,sha256=dK-0KeE6WyiTprtSO54tYgQSr0lIf4iVZmGcMF04eZs,17983
9
+ anemoi/utils/dates.py,sha256=35KyiyFW8SeWLIm7VeMKBJvNvl2nVu-edRWLX-04uT4,17307
10
+ anemoi/utils/devtools.py,sha256=W3OBu96MkXRIl7Qh1SE5Zd6aB1R0QlnmlrlpBYM0fVY,3527
11
+ anemoi/utils/grib.py,sha256=eHz3BVoSB4O-3RARxXFcKRSWtYVbt6lqoLBcssHOp70,3543
12
+ anemoi/utils/grids.py,sha256=l09Hkvq8pZoh5XE8Cy29584-b1GouQSh_WqZks8uuEs,5963
13
+ anemoi/utils/hindcasts.py,sha256=WhYXqA6kw-vY9RUoQtsJZy0-Bb7mpPnHbGdfu0XmLWM,2104
14
+ anemoi/utils/humanize.py,sha256=OM2LIXYl9I-voBCKoENWxW6JY-9NlUOo183n8dzcICs,24892
15
+ anemoi/utils/logs.py,sha256=naTgrmPwWHD4eekFttXftS4gtcAGYHpCqG4iwYprNDA,1804
16
+ anemoi/utils/provenance.py,sha256=eKGXS0Ddd4G4vokAIr5m7d-fytno8omgFJdmxg8hAFk,14552
17
+ anemoi/utils/registry.py,sha256=DmBr9mMhe1ltRPsbnmhQ1TluMZshYEF3frBbVpFAQiI,9621
18
+ anemoi/utils/rules.py,sha256=YtJcwkyBJwPjHlM4ZM6icGJXLCRZmcuHCXc-SSR8wgw,6856
19
+ anemoi/utils/s3.py,sha256=bBVlfg3R4sJYOfgrSkhX7MxSVUQEur4LjE86ug8vkNw,4052
20
+ anemoi/utils/sanitise.py,sha256=XkQzibDbu-VFJkJC4WcB9ovkcTkVAynXtkn1Tlc2CC4,4019
21
+ anemoi/utils/sanitize.py,sha256=43ZKDcfVpeXSsJ9TFEc9aZnD6oe2cUh151XnDspM98M,462
22
+ anemoi/utils/testing.py,sha256=DeTAkmg-RCMPXBBRUy_Gti5UJriUPRKT6ruE3JL2GVc,10372
23
+ anemoi/utils/text.py,sha256=9M7VepzZLL-jGfFGXDqNxjwpNl7tiU8arkkOqhT9iSE,14361
24
+ anemoi/utils/timer.py,sha256=_leKMYza2faM7JKlGE7LCNy13rbdPnwaCF7PSrI_NmI,3895
25
+ anemoi/utils/commands/__init__.py,sha256=5u_6EwdqYczIAgJfCwRSyQAYFEqh2ZuHHT57g9g7sdI,808
26
+ anemoi/utils/commands/config.py,sha256=nYvYbjcum9uumRa3gzPfmQCjNZKURXMA2XOUwz9b7ls,1369
27
+ anemoi/utils/commands/metadata.py,sha256=wxHm0Hm4ss7QEtlqbXUOwQ5F_P9-uQ6iNaoDxPjSxII,11949
28
+ anemoi/utils/commands/requests.py,sha256=AEbssF1OlpbmSwrV5Lj6amCCn0w_-nbajBWTwYV15vA,2059
29
+ anemoi/utils/commands/transfer.py,sha256=29o1RQ46dCJ6kTD1sbxp8XFgB-Qx3RceMccypBMRxeQ,2627
30
+ anemoi/utils/mars/__init__.py,sha256=7T9fHpVcTZss14zdFSIzm8wzX-thrAnbWcHaEqLaMTY,2638
31
+ anemoi/utils/mars/mars.yaml,sha256=R0dujp75lLA4wCWhPeOQnzJ45WZAYLT8gpx509cBFlc,66
32
+ anemoi/utils/mars/requests.py,sha256=dxJy6su9xVLWRhTFeFmdhHROQRG4PiTTVFKUuEN6O9M,1118
33
+ anemoi/utils/mlflow/__init__.py,sha256=hCW0QcLHJmE-C1r38P27_ZOvCLNewex5iQEtZqx2ckI,393
34
+ anemoi/utils/mlflow/auth.py,sha256=Zgn2Ru7GE99_ZTBeskl5M1WnrlEGNU9XxsRVgVoUwmM,8376
35
+ anemoi/utils/mlflow/client.py,sha256=Y34ceLcp1-H0XTt8h8-IhHKX9bApc_QJcgVrzZKtabY,2752
36
+ anemoi/utils/mlflow/utils.py,sha256=0d-dp7YmDLJ59ikJWUcZooqBIdrNDxPShDQubcX-a3k,1310
37
+ anemoi/utils/remote/__init__.py,sha256=24t7cqhdxTLUbmYUgEFmY1rnbAeS_5ST3W6Z9ifimvg,20973
38
+ anemoi/utils/remote/s3.py,sha256=BWI4bUmZHBvvqU6idewyg4ApxTlhCtX3cpwjeheCSo4,21388
39
+ anemoi/utils/remote/ssh.py,sha256=xNtsawh8okytCKRehkRCVExbHZj-CRUQNormEHglfuw,8088
40
+ anemoi/utils/schemas/__init__.py,sha256=nkinKlsPLPXEjfTYQT1mpKC4cvs-14w_zBkDRxakwxw,698
41
+ anemoi/utils/schemas/errors.py,sha256=lgOXzVTYzAE0qWQf3OZ42vCWixv8lilSqLLhzARBmvI,1831
42
+ anemoi_utils-0.4.30.dist-info/licenses/LICENSE,sha256=8HznKF1Vi2IvfLsKNE5A2iVyiri3pRjRPvPC9kxs6qk,11354
43
+ anemoi_utils-0.4.30.dist-info/METADATA,sha256=TRjHcsvEyIrMtKjaCo-pWrPVomcneIy0yexXXKzsj70,15668
44
+ anemoi_utils-0.4.30.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
45
+ anemoi_utils-0.4.30.dist-info/entry_points.txt,sha256=LENOkn88xzFQo-V59AKoA_F_cfYQTJYtrNTtf37YgHY,60
46
+ anemoi_utils-0.4.30.dist-info/top_level.txt,sha256=DYn8VPs-fNwr7fNH9XIBqeXIwiYYd2E2k5-dUFFqUz0,7
47
+ anemoi_utils-0.4.30.dist-info/RECORD,,
@@ -1,47 +0,0 @@
1
- anemoi/utils/__init__.py,sha256=uVhpF-VjIl_4mMywOVtgTutgsdIsqz-xdkwxeMhzuag,730
2
- anemoi/utils/__main__.py,sha256=6LlE4MYrPvqqrykxXh7XMi50UZteUY59NeM8P9Zs2dU,910
3
- anemoi/utils/_version.py,sha256=M33mpOYpqw35qLoEcg5GxMG4YQ25eohx8wEQkM6FTT0,513
4
- anemoi/utils/caching.py,sha256=rXbeAmpBcMbbfN4EVblaHWKicsrtx1otER84FEBtz98,6183
5
- anemoi/utils/checkpoints.py,sha256=PydBqA-wI8_05zU-3yT-ZP53GnvuqB7vPXl-w6-9XX8,9541
6
- anemoi/utils/cli.py,sha256=Cd3ESQkNWecbGnJjkR_SKHdFPETJWFrHqg5ovtANDKs,6522
7
- anemoi/utils/compatibility.py,sha256=wRBRMmxQP88rNcWiP5gqXliwYQbBv1iCAsDjcCRi5UY,2234
8
- anemoi/utils/config.py,sha256=EEfcSxW2CD6fFOzDtqz_uYlMKuYq4X5QinJW_8GBYj4,17325
9
- anemoi/utils/dates.py,sha256=Ew11G-Upl0VM9R9Sgg3Be6KIkXfpMCD69kgiao7Xv48,17534
10
- anemoi/utils/devtools.py,sha256=W3OBu96MkXRIl7Qh1SE5Zd6aB1R0QlnmlrlpBYM0fVY,3527
11
- anemoi/utils/grib.py,sha256=201WcxjjAl92Y2HX2kZ2S8Qr5dN-oG7nV-vQLaybzP4,3610
12
- anemoi/utils/grids.py,sha256=VlhuN8MZDBu-G50QFI1XHV9IXLway2LpvI9X8sDjb5s,6047
13
- anemoi/utils/hindcasts.py,sha256=iYVIxSNFL2HJcc_k1abCFLkpJFGHT8WKRIR4wcAwA3s,2144
14
- anemoi/utils/humanize.py,sha256=pjnFJAKHbEAOfcvn8c48kt-8eFy6FGW_U2ruJvfamrA,25189
15
- anemoi/utils/logs.py,sha256=naTgrmPwWHD4eekFttXftS4gtcAGYHpCqG4iwYprNDA,1804
16
- anemoi/utils/provenance.py,sha256=iTsn4r-VPq2D8tSHPSuAIqG077_opkqMT42G03DRWJg,14690
17
- anemoi/utils/registry.py,sha256=e3nOIRyMYQ-mpEvaHAv5tuvMYNbkJ5yz94ns7BnvkjM,9717
18
- anemoi/utils/rules.py,sha256=VspUoPmw7tijrs6l_wl4vDjr_zVQsFjx9ITiBSvxgc8,6972
19
- anemoi/utils/s3.py,sha256=xMT48kbcelcjjqsaU567WI3oZ5eqo88Rlgyx5ECszAU,4074
20
- anemoi/utils/sanitise.py,sha256=XkQzibDbu-VFJkJC4WcB9ovkcTkVAynXtkn1Tlc2CC4,4019
21
- anemoi/utils/sanitize.py,sha256=43ZKDcfVpeXSsJ9TFEc9aZnD6oe2cUh151XnDspM98M,462
22
- anemoi/utils/testing.py,sha256=DeTAkmg-RCMPXBBRUy_Gti5UJriUPRKT6ruE3JL2GVc,10372
23
- anemoi/utils/text.py,sha256=HkzIvi24obDceFLpJEwBJ9PmPrJUkQN2TrElJ-A87gU,14441
24
- anemoi/utils/timer.py,sha256=_leKMYza2faM7JKlGE7LCNy13rbdPnwaCF7PSrI_NmI,3895
25
- anemoi/utils/commands/__init__.py,sha256=5u_6EwdqYczIAgJfCwRSyQAYFEqh2ZuHHT57g9g7sdI,808
26
- anemoi/utils/commands/config.py,sha256=nYvYbjcum9uumRa3gzPfmQCjNZKURXMA2XOUwz9b7ls,1369
27
- anemoi/utils/commands/metadata.py,sha256=_j1ohUy9tty9KhD0N2zqc7vaOJ3pJFRZUGMGRE0z7Mw,11973
28
- anemoi/utils/commands/requests.py,sha256=AEbssF1OlpbmSwrV5Lj6amCCn0w_-nbajBWTwYV15vA,2059
29
- anemoi/utils/commands/transfer.py,sha256=29o1RQ46dCJ6kTD1sbxp8XFgB-Qx3RceMccypBMRxeQ,2627
30
- anemoi/utils/mars/__init__.py,sha256=b-Lc3L1TAQd9ODs0Z1YSJzgZCO1K_M3DSgx_yd2qXvM,2724
31
- anemoi/utils/mars/mars.yaml,sha256=R0dujp75lLA4wCWhPeOQnzJ45WZAYLT8gpx509cBFlc,66
32
- anemoi/utils/mars/requests.py,sha256=VFMHBVAAl0_2lOcMBa1lvaKHctN0lDJsI6_U4BucGew,1142
33
- anemoi/utils/mlflow/__init__.py,sha256=hCW0QcLHJmE-C1r38P27_ZOvCLNewex5iQEtZqx2ckI,393
34
- anemoi/utils/mlflow/auth.py,sha256=Zgn2Ru7GE99_ZTBeskl5M1WnrlEGNU9XxsRVgVoUwmM,8376
35
- anemoi/utils/mlflow/client.py,sha256=Y34ceLcp1-H0XTt8h8-IhHKX9bApc_QJcgVrzZKtabY,2752
36
- anemoi/utils/mlflow/utils.py,sha256=0d-dp7YmDLJ59ikJWUcZooqBIdrNDxPShDQubcX-a3k,1310
37
- anemoi/utils/remote/__init__.py,sha256=7nHu-LRspYW2Fx9GNLjsxpytAUIvhIbOjb0Xmxb-33s,20988
38
- anemoi/utils/remote/s3.py,sha256=DxO_TjmetX_r3ZvGaHjpz40oqvcQYP3Vd_A4ojMGlSA,21379
39
- anemoi/utils/remote/ssh.py,sha256=xNtsawh8okytCKRehkRCVExbHZj-CRUQNormEHglfuw,8088
40
- anemoi/utils/schemas/__init__.py,sha256=nkinKlsPLPXEjfTYQT1mpKC4cvs-14w_zBkDRxakwxw,698
41
- anemoi/utils/schemas/errors.py,sha256=lgOXzVTYzAE0qWQf3OZ42vCWixv8lilSqLLhzARBmvI,1831
42
- anemoi_utils-0.4.29.dist-info/licenses/LICENSE,sha256=8HznKF1Vi2IvfLsKNE5A2iVyiri3pRjRPvPC9kxs6qk,11354
43
- anemoi_utils-0.4.29.dist-info/METADATA,sha256=v5sHgt4rZA9mZ2YW1pMO0S76mlvZ09hoB3Q-G7xp6-Y,15717
44
- anemoi_utils-0.4.29.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
45
- anemoi_utils-0.4.29.dist-info/entry_points.txt,sha256=LENOkn88xzFQo-V59AKoA_F_cfYQTJYtrNTtf37YgHY,60
46
- anemoi_utils-0.4.29.dist-info/top_level.txt,sha256=DYn8VPs-fNwr7fNH9XIBqeXIwiYYd2E2k5-dUFFqUz0,7
47
- anemoi_utils-0.4.29.dist-info/RECORD,,