FourCIPP 1.14.0__py3-none-any.whl → 1.16.0__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.
- fourcipp/config/4C_metadata.yaml +1662 -1690
- fourcipp/config/4C_schema.json +8189 -8224
- fourcipp/fourc_input.py +3 -3
- fourcipp/legacy_io/__init__.py +1 -1
- fourcipp/legacy_io/element.py +1 -1
- fourcipp/legacy_io/inline_dat.py +8 -6
- fourcipp/legacy_io/particle.py +1 -1
- fourcipp/utils/cli.py +1 -1
- fourcipp/utils/configuration.py +1 -1
- fourcipp/utils/metadata.py +994 -9
- fourcipp/utils/not_set.py +21 -8
- fourcipp/utils/{typing.py → type_hinting.py} +5 -0
- fourcipp/utils/yaml_io.py +1 -1
- fourcipp/version.py +2 -2
- {fourcipp-1.14.0.dist-info → fourcipp-1.16.0.dist-info}/METADATA +1 -1
- fourcipp-1.16.0.dist-info/RECORD +28 -0
- fourcipp-1.14.0.dist-info/RECORD +0 -28
- {fourcipp-1.14.0.dist-info → fourcipp-1.16.0.dist-info}/WHEEL +0 -0
- {fourcipp-1.14.0.dist-info → fourcipp-1.16.0.dist-info}/entry_points.txt +0 -0
- {fourcipp-1.14.0.dist-info → fourcipp-1.16.0.dist-info}/licenses/LICENSE +0 -0
- {fourcipp-1.14.0.dist-info → fourcipp-1.16.0.dist-info}/top_level.txt +0 -0
fourcipp/utils/not_set.py
CHANGED
|
@@ -21,18 +21,31 @@
|
|
|
21
21
|
# THE SOFTWARE.
|
|
22
22
|
"""Not set utils."""
|
|
23
23
|
|
|
24
|
-
from typing import Any
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
class _NotSet:
|
|
25
|
+
class NotSet:
|
|
28
26
|
"""Not set object."""
|
|
29
27
|
|
|
28
|
+
def __init__(self, expected: object = object) -> None:
|
|
29
|
+
"""Not set object.
|
|
30
|
+
|
|
31
|
+
Args:
|
|
32
|
+
expected: Expected object to to display
|
|
33
|
+
"""
|
|
34
|
+
self.expected = expected
|
|
35
|
+
|
|
36
|
+
def __str__(self) -> str: # pragma: no cover
|
|
37
|
+
"""String method."""
|
|
38
|
+
return f"NotSet({self.expected})"
|
|
39
|
+
|
|
40
|
+
def __repr__(self) -> str: # pragma: no cover
|
|
41
|
+
"""Representation method."""
|
|
42
|
+
return f"NotSet({self.expected})"
|
|
43
|
+
|
|
30
44
|
|
|
31
|
-
|
|
32
|
-
NotSet = _NotSet()
|
|
45
|
+
NOT_SET = NotSet()
|
|
33
46
|
|
|
34
47
|
|
|
35
|
-
def check_if_set(obj:
|
|
48
|
+
def check_if_set(obj: object) -> bool:
|
|
36
49
|
"""Check if object or is NotSet.
|
|
37
50
|
|
|
38
51
|
Args:
|
|
@@ -42,10 +55,10 @@ def check_if_set(obj: Any) -> bool:
|
|
|
42
55
|
True if object is set
|
|
43
56
|
"""
|
|
44
57
|
# Check if object is not of type _NotSet, i.e. it has a value
|
|
45
|
-
return not isinstance(obj,
|
|
58
|
+
return not isinstance(obj, NotSet)
|
|
46
59
|
|
|
47
60
|
|
|
48
|
-
def pop_arguments(key: str, default:
|
|
61
|
+
def pop_arguments(key: str, default: object = NOT_SET) -> tuple:
|
|
49
62
|
"""Create arguments for the pop method.
|
|
50
63
|
|
|
51
64
|
We need this utility since pop is not implemented using kwargs, instead the default is checked
|
|
@@ -25,6 +25,8 @@ import pathlib
|
|
|
25
25
|
from collections.abc import Callable
|
|
26
26
|
from typing import TypeAlias, TypeVar
|
|
27
27
|
|
|
28
|
+
from fourcipp.utils.not_set import NotSet
|
|
29
|
+
|
|
28
30
|
# Generic type variable
|
|
29
31
|
T = TypeVar("T")
|
|
30
32
|
|
|
@@ -37,3 +39,6 @@ Extractor: TypeAlias = Callable[[str], T]
|
|
|
37
39
|
LineListExtractor: TypeAlias = Callable[[list[str]], T]
|
|
38
40
|
LineCastingDict: TypeAlias = dict[str, LineListExtractor]
|
|
39
41
|
NestedCastingDict: TypeAlias = dict[str, LineCastingDict | LineListExtractor]
|
|
42
|
+
|
|
43
|
+
# NotSet
|
|
44
|
+
NotSetAlias: TypeAlias = NotSet | T
|
fourcipp/utils/yaml_io.py
CHANGED
fourcipp/version.py
CHANGED
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '1.
|
|
32
|
-
__version_tuple__ = version_tuple = (1,
|
|
31
|
+
__version__ = version = '1.16.0'
|
|
32
|
+
__version_tuple__ = version_tuple = (1, 16, 0)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
fourcipp/__init__.py,sha256=4pz7DVXErSbUcLqPTaHnQfdJzKkpfZDivBqbHbTgpRE,1388
|
|
2
|
+
fourcipp/fourc_input.py,sha256=1-EMbwc5tWbWtbZqzRF4_ytrvkcQVgtC5ZX1uz6NFuQ,23954
|
|
3
|
+
fourcipp/version.py,sha256=zmLDnl-HgLXQQxF2Cg2gB2V4TkzsB1YaOFDyXg9xtoY,706
|
|
4
|
+
fourcipp/config/4C_metadata.yaml,sha256=FFffv__3w90fnmfpCDBMP_XEeIYc9HpxjxruA9GvJZM,11871601
|
|
5
|
+
fourcipp/config/4C_schema.json,sha256=mKGQdpMPIsbeXNd5gN2V8wJ6SHWbFhzQ1ljz_t10xg0,16402819
|
|
6
|
+
fourcipp/config/config.yaml,sha256=n2c2a6E4HKfAdNWOQz1kLUuf5p4NLxIddaAi2t5eM38,460
|
|
7
|
+
fourcipp/legacy_io/__init__.py,sha256=L3MWW-WjPbPAJVX8Z0Uheftn0dRPnqNnSBic3uloFhI,5750
|
|
8
|
+
fourcipp/legacy_io/element.py,sha256=rP8F-m-8ZCwCxtV_OASvvLeNYr01zsmgZsDZSJ_G1gY,3977
|
|
9
|
+
fourcipp/legacy_io/inline_dat.py,sha256=t8eMmJ_mAK7kKYAhNNlsES9JbZ760DHR0101Mj9vkSQ,6723
|
|
10
|
+
fourcipp/legacy_io/node.py,sha256=e7m0W7dai_b1XgaqD37k3QS44ySCas3HetmyTLS9_78,3522
|
|
11
|
+
fourcipp/legacy_io/node_topology.py,sha256=hqGGzhyNhFX-BMW8SzztfzM8zoZLLltVScMv-p4hDH0,5394
|
|
12
|
+
fourcipp/legacy_io/particle.py,sha256=8LoRsyKVfhl5Qf_EoO8vLmbH0QSpB_Nho464ifkHAZc,2172
|
|
13
|
+
fourcipp/utils/__init__.py,sha256=ccdlf4taJ0mKLg_ru8ilXEa72PoO9N2UIxHNHDEtQmY,1151
|
|
14
|
+
fourcipp/utils/cli.py,sha256=Tn9jx0KhC421zv-DMpqNU2hpb6fyi4-r4qV17f-ts4Y,5807
|
|
15
|
+
fourcipp/utils/configuration.py,sha256=_9Yo_2Rxw1QDhib9OV_MjLXBhVPfIBA2qmdOG3EuIKU,6467
|
|
16
|
+
fourcipp/utils/converter.py,sha256=D40YQ96WqPEEpB7fwAB5XC2v-jRki4v1sIJ-ngO08nU,5194
|
|
17
|
+
fourcipp/utils/dict_utils.py,sha256=uC0uaBNP3Wh2v3kFy9JHnAYARMukAN4cl40pmiBT13Y,12891
|
|
18
|
+
fourcipp/utils/metadata.py,sha256=wYu07eCrOTNHSnhDxHyQzF6OU8D_2ZuJfytiIpn3sxY,30895
|
|
19
|
+
fourcipp/utils/not_set.py,sha256=NHf0UXDmTuZfvfnIIgkkx4EohxRsN4MVUHUpt7VOnaQ,2433
|
|
20
|
+
fourcipp/utils/type_hinting.py,sha256=izPEhbMdmhrIBamCLqqF_6iDZW-w7a8kplUugbQILyw,1714
|
|
21
|
+
fourcipp/utils/validation.py,sha256=FejHOj1MddaU7gEpMN-f8Mz3rYjflakd1qcsKnctHqA,5292
|
|
22
|
+
fourcipp/utils/yaml_io.py,sha256=jPgVnxE858XTpDC6BVhfbbljQegL58zc3u2VPYCTvGE,5771
|
|
23
|
+
fourcipp-1.16.0.dist-info/licenses/LICENSE,sha256=lkSOHdH9IZ8c3Vnz0fFjqls1cRlmLADBP8QEIwUlH3o,1082
|
|
24
|
+
fourcipp-1.16.0.dist-info/METADATA,sha256=nNKwiSL3_xPdbyizL_6v8oQtWjMgmAi3KafRBMo0O6U,7916
|
|
25
|
+
fourcipp-1.16.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
26
|
+
fourcipp-1.16.0.dist-info/entry_points.txt,sha256=44XBG4bwhuq1EwOZ0U055HYP8_qN6_d30ecVsa5Igng,53
|
|
27
|
+
fourcipp-1.16.0.dist-info/top_level.txt,sha256=oZ6jgFFmvi157VwGUEFuKT3D8oS5mOkpOVx8zZURZrQ,9
|
|
28
|
+
fourcipp-1.16.0.dist-info/RECORD,,
|
fourcipp-1.14.0.dist-info/RECORD
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
fourcipp/__init__.py,sha256=4pz7DVXErSbUcLqPTaHnQfdJzKkpfZDivBqbHbTgpRE,1388
|
|
2
|
-
fourcipp/fourc_input.py,sha256=ocyxXdu8NFIRM94dc4EG_r8XsBkJajvw1YWHmZh-G6Y,23946
|
|
3
|
-
fourcipp/version.py,sha256=B_zXbaY_VjR5QzFDQUWID71ivmfxjMpJLAttgWbEkMU,706
|
|
4
|
-
fourcipp/config/4C_metadata.yaml,sha256=j3DmYTTuKewugGAG6joSzdcuEpefF4B32Ipkk_9TigY,11887345
|
|
5
|
-
fourcipp/config/4C_schema.json,sha256=Ndrzh5G5tdpIpbq4ExSyh4clBQwELEaQt5Ze77ElKsk,16417772
|
|
6
|
-
fourcipp/config/config.yaml,sha256=n2c2a6E4HKfAdNWOQz1kLUuf5p4NLxIddaAi2t5eM38,460
|
|
7
|
-
fourcipp/legacy_io/__init__.py,sha256=y6aTjgUe61OQSl1NMiZ-fQAGTab_xNT1eJTnaTnsIkc,5744
|
|
8
|
-
fourcipp/legacy_io/element.py,sha256=b8--f3IR9nB68R25mk4DHHOBdDLqASewtAdPZAkA2t4,3971
|
|
9
|
-
fourcipp/legacy_io/inline_dat.py,sha256=n9qWrIX33Atv0JruuLWAxy6lrCaeuCZRIvtl3Jr1a1U,6659
|
|
10
|
-
fourcipp/legacy_io/node.py,sha256=e7m0W7dai_b1XgaqD37k3QS44ySCas3HetmyTLS9_78,3522
|
|
11
|
-
fourcipp/legacy_io/node_topology.py,sha256=hqGGzhyNhFX-BMW8SzztfzM8zoZLLltVScMv-p4hDH0,5394
|
|
12
|
-
fourcipp/legacy_io/particle.py,sha256=0rxwdiMnHI1QUGZPqWgsxqyslrxB7aq7qxgNMb_y_rk,2166
|
|
13
|
-
fourcipp/utils/__init__.py,sha256=ccdlf4taJ0mKLg_ru8ilXEa72PoO9N2UIxHNHDEtQmY,1151
|
|
14
|
-
fourcipp/utils/cli.py,sha256=I0N6mcJQGX7seLtXpfrPJA5EWrmhgOph_gHrrxEs6JE,5801
|
|
15
|
-
fourcipp/utils/configuration.py,sha256=HDrvHrH4K5mdienzVsAt_sh9j2Pv81bxWBqqbeNb1KE,6461
|
|
16
|
-
fourcipp/utils/converter.py,sha256=D40YQ96WqPEEpB7fwAB5XC2v-jRki4v1sIJ-ngO08nU,5194
|
|
17
|
-
fourcipp/utils/dict_utils.py,sha256=uC0uaBNP3Wh2v3kFy9JHnAYARMukAN4cl40pmiBT13Y,12891
|
|
18
|
-
fourcipp/utils/metadata.py,sha256=98jz9Gm8qdvZ-b1jwYObNJTaiMQWwbknvS70Nv6Gwhk,1291
|
|
19
|
-
fourcipp/utils/not_set.py,sha256=04C_3axe2cupBYgfpgDAcGs1zHVzG3I58UGO58TH05A,2017
|
|
20
|
-
fourcipp/utils/typing.py,sha256=8iX9PuKe8B1WJ3vEjiM5ZfefvgYnaZDiSdB7Nx9SrVw,1625
|
|
21
|
-
fourcipp/utils/validation.py,sha256=FejHOj1MddaU7gEpMN-f8Mz3rYjflakd1qcsKnctHqA,5292
|
|
22
|
-
fourcipp/utils/yaml_io.py,sha256=GZtgBn-5OB7xAJmgjo66eG3JwkHnfQFp4VIA2-rVVSg,5765
|
|
23
|
-
fourcipp-1.14.0.dist-info/licenses/LICENSE,sha256=lkSOHdH9IZ8c3Vnz0fFjqls1cRlmLADBP8QEIwUlH3o,1082
|
|
24
|
-
fourcipp-1.14.0.dist-info/METADATA,sha256=ABNia81ZL2ubbhDiRoNsm7_Aj_qTgFFDfDlso_XNxLU,7916
|
|
25
|
-
fourcipp-1.14.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
26
|
-
fourcipp-1.14.0.dist-info/entry_points.txt,sha256=44XBG4bwhuq1EwOZ0U055HYP8_qN6_d30ecVsa5Igng,53
|
|
27
|
-
fourcipp-1.14.0.dist-info/top_level.txt,sha256=oZ6jgFFmvi157VwGUEFuKT3D8oS5mOkpOVx8zZURZrQ,9
|
|
28
|
-
fourcipp-1.14.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|