FourCIPP 1.24.0__py3-none-any.whl → 1.25.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.
@@ -121,12 +121,15 @@ def _entry_casting_factory(spec: dict) -> LineListExtractor:
121
121
  Returns:
122
122
  Casting function for the spec
123
123
  """
124
- if spec["type"] in Primitive.PRIMITIVE_TYPES_TO_PYTHON:
125
- return partial(
126
- _extract_entry, extractor=Primitive.PRIMITIVE_TYPES_TO_PYTHON[spec["type"]]
127
- )
124
+
125
+ primitive_extractors = Primitive.PRIMITIVE_TYPES_TO_PYTHON.copy()
126
+ primitive_extractors["bool"] = lambda v: {"true": True, "false": False}[v]
127
+
128
+ if spec["type"] in primitive_extractors:
129
+ extractor = primitive_extractors[spec["type"]]
130
+ return partial(_extract_entry, extractor=extractor)
128
131
  elif spec["type"] == "vector":
129
- value_type = Primitive.PRIMITIVE_TYPES_TO_PYTHON[spec["value_type"]["type"]]
132
+ value_type = primitive_extractors[spec["value_type"]["type"]]
130
133
  return partial(_extract_vector, extractor=value_type, size=spec["size"])
131
134
  elif spec["type"] == "enum":
132
135
  choices = [s["name"] for s in spec["choices"]]
@@ -295,7 +295,7 @@ class One_Of:
295
295
 
296
296
  class Primitive(InputSpec):
297
297
  PRIMITIVE_TYPES: list[str] = ["double", "bool", "int", "string", "path"]
298
- PRIMITIVE_TYPES_TO_PYTHON: dict[str, type] = {
298
+ PRIMITIVE_TYPES_TO_PYTHON: dict[str, type | Callable] = {
299
299
  "double": float,
300
300
  "bool": bool,
301
301
  "int": int,
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.24.0'
32
- __version_tuple__ = version_tuple = (1, 24, 0)
31
+ __version__ = version = '1.25.0'
32
+ __version_tuple__ = version_tuple = (1, 25, 0)
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: FourCIPP
3
- Version: 1.24.0
3
+ Version: 1.25.0
4
4
  Summary: A streamlined Python Parser for 4C input files
5
5
  Author: FourCIPP Authors
6
6
  License: The MIT License (MIT)
@@ -1,12 +1,12 @@
1
1
  fourcipp/__init__.py,sha256=4pz7DVXErSbUcLqPTaHnQfdJzKkpfZDivBqbHbTgpRE,1388
2
2
  fourcipp/fourc_input.py,sha256=1-EMbwc5tWbWtbZqzRF4_ytrvkcQVgtC5ZX1uz6NFuQ,23954
3
- fourcipp/version.py,sha256=xItYDDcZmoRAA87GcWdIUSZltFo-iqunCfyLtADnQ-o,706
3
+ fourcipp/version.py,sha256=R81gORYF1NfYL6QjkEQ0pDs6XD7HgxQcT2joD2_hfcw,706
4
4
  fourcipp/config/4C_metadata.yaml,sha256=Ibxgfxv0GzWW9xV-8n_po7Om_FoOKH5gbYHY9ugPl9E,11887255
5
5
  fourcipp/config/4C_schema.json,sha256=RVWI9cL8BjyFtGEBiEd49M0HKxkcXLgFGPe4VBz-A4A,16493324
6
6
  fourcipp/config/config.yaml,sha256=n2c2a6E4HKfAdNWOQz1kLUuf5p4NLxIddaAi2t5eM38,460
7
7
  fourcipp/legacy_io/__init__.py,sha256=L3MWW-WjPbPAJVX8Z0Uheftn0dRPnqNnSBic3uloFhI,5750
8
8
  fourcipp/legacy_io/element.py,sha256=rP8F-m-8ZCwCxtV_OASvvLeNYr01zsmgZsDZSJ_G1gY,3977
9
- fourcipp/legacy_io/inline_dat.py,sha256=t8eMmJ_mAK7kKYAhNNlsES9JbZ760DHR0101Mj9vkSQ,6723
9
+ fourcipp/legacy_io/inline_dat.py,sha256=wqXM8dNEcTrx6Ek_6mrAE9dWk53NC0T4kOTD_auw2vQ,6837
10
10
  fourcipp/legacy_io/node.py,sha256=e7m0W7dai_b1XgaqD37k3QS44ySCas3HetmyTLS9_78,3522
11
11
  fourcipp/legacy_io/node_topology.py,sha256=hqGGzhyNhFX-BMW8SzztfzM8zoZLLltVScMv-p4hDH0,5394
12
12
  fourcipp/legacy_io/particle.py,sha256=8LoRsyKVfhl5Qf_EoO8vLmbH0QSpB_Nho464ifkHAZc,2172
@@ -15,14 +15,14 @@ fourcipp/utils/cli.py,sha256=Tn9jx0KhC421zv-DMpqNU2hpb6fyi4-r4qV17f-ts4Y,5807
15
15
  fourcipp/utils/configuration.py,sha256=_9Yo_2Rxw1QDhib9OV_MjLXBhVPfIBA2qmdOG3EuIKU,6467
16
16
  fourcipp/utils/converter.py,sha256=D40YQ96WqPEEpB7fwAB5XC2v-jRki4v1sIJ-ngO08nU,5194
17
17
  fourcipp/utils/dict_utils.py,sha256=uC0uaBNP3Wh2v3kFy9JHnAYARMukAN4cl40pmiBT13Y,12891
18
- fourcipp/utils/metadata.py,sha256=wYu07eCrOTNHSnhDxHyQzF6OU8D_2ZuJfytiIpn3sxY,30895
18
+ fourcipp/utils/metadata.py,sha256=TxKmpx-Mb3VeR6okUUtHDo0TwGcKxpyCtCExzphFEPU,30906
19
19
  fourcipp/utils/not_set.py,sha256=NHf0UXDmTuZfvfnIIgkkx4EohxRsN4MVUHUpt7VOnaQ,2433
20
20
  fourcipp/utils/type_hinting.py,sha256=izPEhbMdmhrIBamCLqqF_6iDZW-w7a8kplUugbQILyw,1714
21
21
  fourcipp/utils/validation.py,sha256=FejHOj1MddaU7gEpMN-f8Mz3rYjflakd1qcsKnctHqA,5292
22
22
  fourcipp/utils/yaml_io.py,sha256=jPgVnxE858XTpDC6BVhfbbljQegL58zc3u2VPYCTvGE,5771
23
- fourcipp-1.24.0.dist-info/licenses/LICENSE,sha256=lkSOHdH9IZ8c3Vnz0fFjqls1cRlmLADBP8QEIwUlH3o,1082
24
- fourcipp-1.24.0.dist-info/METADATA,sha256=oYbkZgSdrx_QxKnX5rdJHTcyOwPG6Pkk1zHue10pNno,7916
25
- fourcipp-1.24.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
26
- fourcipp-1.24.0.dist-info/entry_points.txt,sha256=44XBG4bwhuq1EwOZ0U055HYP8_qN6_d30ecVsa5Igng,53
27
- fourcipp-1.24.0.dist-info/top_level.txt,sha256=oZ6jgFFmvi157VwGUEFuKT3D8oS5mOkpOVx8zZURZrQ,9
28
- fourcipp-1.24.0.dist-info/RECORD,,
23
+ fourcipp-1.25.0.dist-info/licenses/LICENSE,sha256=lkSOHdH9IZ8c3Vnz0fFjqls1cRlmLADBP8QEIwUlH3o,1082
24
+ fourcipp-1.25.0.dist-info/METADATA,sha256=L76lYeCupl3aGYXkldHxokbMVqLgCBsyuq0-E1EYRL4,7916
25
+ fourcipp-1.25.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
26
+ fourcipp-1.25.0.dist-info/entry_points.txt,sha256=44XBG4bwhuq1EwOZ0U055HYP8_qN6_d30ecVsa5Igng,53
27
+ fourcipp-1.25.0.dist-info/top_level.txt,sha256=oZ6jgFFmvi157VwGUEFuKT3D8oS5mOkpOVx8zZURZrQ,9
28
+ fourcipp-1.25.0.dist-info/RECORD,,