FourCIPP 1.14.0__tar.gz → 1.15.0__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.
Files changed (67) hide show
  1. {fourcipp-1.14.0/src/FourCIPP.egg-info → fourcipp-1.15.0}/PKG-INFO +1 -1
  2. {fourcipp-1.14.0 → fourcipp-1.15.0/src/FourCIPP.egg-info}/PKG-INFO +1 -1
  3. {fourcipp-1.14.0 → fourcipp-1.15.0}/src/FourCIPP.egg-info/SOURCES.txt +2 -1
  4. {fourcipp-1.14.0 → fourcipp-1.15.0}/src/fourcipp/fourc_input.py +3 -3
  5. {fourcipp-1.14.0 → fourcipp-1.15.0}/src/fourcipp/legacy_io/__init__.py +1 -1
  6. {fourcipp-1.14.0 → fourcipp-1.15.0}/src/fourcipp/legacy_io/element.py +1 -1
  7. {fourcipp-1.14.0 → fourcipp-1.15.0}/src/fourcipp/legacy_io/inline_dat.py +8 -6
  8. {fourcipp-1.14.0 → fourcipp-1.15.0}/src/fourcipp/legacy_io/particle.py +1 -1
  9. {fourcipp-1.14.0 → fourcipp-1.15.0}/src/fourcipp/utils/cli.py +1 -1
  10. {fourcipp-1.14.0 → fourcipp-1.15.0}/src/fourcipp/utils/configuration.py +1 -1
  11. fourcipp-1.15.0/src/fourcipp/utils/metadata.py +1017 -0
  12. {fourcipp-1.14.0 → fourcipp-1.15.0}/src/fourcipp/utils/not_set.py +21 -8
  13. fourcipp-1.14.0/src/fourcipp/utils/typing.py → fourcipp-1.15.0/src/fourcipp/utils/type_hinting.py +5 -0
  14. {fourcipp-1.14.0 → fourcipp-1.15.0}/src/fourcipp/utils/yaml_io.py +1 -1
  15. {fourcipp-1.14.0 → fourcipp-1.15.0}/src/fourcipp/version.py +3 -3
  16. fourcipp-1.15.0/tests/fourcipp/utils/test_metadata.py +653 -0
  17. {fourcipp-1.14.0 → fourcipp-1.15.0}/tests/fourcipp/utils/test_not_set.py +8 -2
  18. fourcipp-1.14.0/src/fourcipp/utils/metadata.py +0 -32
  19. {fourcipp-1.14.0 → fourcipp-1.15.0}/.coveragerc +0 -0
  20. {fourcipp-1.14.0 → fourcipp-1.15.0}/.github/workflows/check_code.yaml +0 -0
  21. {fourcipp-1.14.0 → fourcipp-1.15.0}/.github/workflows/publish_pypi.yaml +0 -0
  22. {fourcipp-1.14.0 → fourcipp-1.15.0}/.github/workflows/run_testsuite.yaml +0 -0
  23. {fourcipp-1.14.0 → fourcipp-1.15.0}/.github/workflows/tag_version.yaml +0 -0
  24. {fourcipp-1.14.0 → fourcipp-1.15.0}/.github/workflows/update_4C_metadata_schema_file.yaml +0 -0
  25. {fourcipp-1.14.0 → fourcipp-1.15.0}/.gitignore +0 -0
  26. {fourcipp-1.14.0 → fourcipp-1.15.0}/.pre-commit-config.yaml +0 -0
  27. {fourcipp-1.14.0 → fourcipp-1.15.0}/LICENSE +0 -0
  28. {fourcipp-1.14.0 → fourcipp-1.15.0}/README.md +0 -0
  29. {fourcipp-1.14.0 → fourcipp-1.15.0}/docs/assets/fourcipp_logo_black.svg +0 -0
  30. {fourcipp-1.14.0 → fourcipp-1.15.0}/docs/assets/fourcipp_logo_white.svg +0 -0
  31. {fourcipp-1.14.0 → fourcipp-1.15.0}/pyproject.toml +0 -0
  32. {fourcipp-1.14.0 → fourcipp-1.15.0}/requirements.in +0 -0
  33. {fourcipp-1.14.0 → fourcipp-1.15.0}/requirements.txt +0 -0
  34. {fourcipp-1.14.0 → fourcipp-1.15.0}/setup.cfg +0 -0
  35. {fourcipp-1.14.0 → fourcipp-1.15.0}/src/FourCIPP.egg-info/dependency_links.txt +0 -0
  36. {fourcipp-1.14.0 → fourcipp-1.15.0}/src/FourCIPP.egg-info/entry_points.txt +0 -0
  37. {fourcipp-1.14.0 → fourcipp-1.15.0}/src/FourCIPP.egg-info/requires.txt +0 -0
  38. {fourcipp-1.14.0 → fourcipp-1.15.0}/src/FourCIPP.egg-info/top_level.txt +0 -0
  39. {fourcipp-1.14.0 → fourcipp-1.15.0}/src/fourcipp/__init__.py +0 -0
  40. {fourcipp-1.14.0 → fourcipp-1.15.0}/src/fourcipp/config/4C_metadata.yaml +0 -0
  41. {fourcipp-1.14.0 → fourcipp-1.15.0}/src/fourcipp/config/4C_schema.json +0 -0
  42. {fourcipp-1.14.0 → fourcipp-1.15.0}/src/fourcipp/config/config.yaml +0 -0
  43. {fourcipp-1.14.0 → fourcipp-1.15.0}/src/fourcipp/legacy_io/node.py +0 -0
  44. {fourcipp-1.14.0 → fourcipp-1.15.0}/src/fourcipp/legacy_io/node_topology.py +0 -0
  45. {fourcipp-1.14.0 → fourcipp-1.15.0}/src/fourcipp/utils/__init__.py +0 -0
  46. {fourcipp-1.14.0 → fourcipp-1.15.0}/src/fourcipp/utils/converter.py +0 -0
  47. {fourcipp-1.14.0 → fourcipp-1.15.0}/src/fourcipp/utils/dict_utils.py +0 -0
  48. {fourcipp-1.14.0 → fourcipp-1.15.0}/src/fourcipp/utils/validation.py +0 -0
  49. {fourcipp-1.14.0 → fourcipp-1.15.0}/tests/__init__.py +0 -0
  50. {fourcipp-1.14.0 → fourcipp-1.15.0}/tests/conftest.py +0 -0
  51. {fourcipp-1.14.0 → fourcipp-1.15.0}/tests/fourcipp/__init__.py +0 -0
  52. {fourcipp-1.14.0 → fourcipp-1.15.0}/tests/fourcipp/legacy_io/__init__.py +0 -0
  53. {fourcipp-1.14.0 → fourcipp-1.15.0}/tests/fourcipp/legacy_io/test_element.py +0 -0
  54. {fourcipp-1.14.0 → fourcipp-1.15.0}/tests/fourcipp/legacy_io/test_inline_dat.py +0 -0
  55. {fourcipp-1.14.0 → fourcipp-1.15.0}/tests/fourcipp/legacy_io/test_legacy_io.py +0 -0
  56. {fourcipp-1.14.0 → fourcipp-1.15.0}/tests/fourcipp/legacy_io/test_node.py +0 -0
  57. {fourcipp-1.14.0 → fourcipp-1.15.0}/tests/fourcipp/legacy_io/test_node_topology.py +0 -0
  58. {fourcipp-1.14.0 → fourcipp-1.15.0}/tests/fourcipp/legacy_io/test_particle.py +0 -0
  59. {fourcipp-1.14.0 → fourcipp-1.15.0}/tests/fourcipp/legacy_io/utils.py +0 -0
  60. {fourcipp-1.14.0 → fourcipp-1.15.0}/tests/fourcipp/test_fourc_input.py +0 -0
  61. {fourcipp-1.14.0 → fourcipp-1.15.0}/tests/fourcipp/test_readme_quickstart_example.py +0 -0
  62. {fourcipp-1.14.0 → fourcipp-1.15.0}/tests/fourcipp/utils/__init__.py +0 -0
  63. {fourcipp-1.14.0 → fourcipp-1.15.0}/tests/fourcipp/utils/test_configuration.py +0 -0
  64. {fourcipp-1.14.0 → fourcipp-1.15.0}/tests/fourcipp/utils/test_converter.py +0 -0
  65. {fourcipp-1.14.0 → fourcipp-1.15.0}/tests/fourcipp/utils/test_dict_utils.py +0 -0
  66. {fourcipp-1.14.0 → fourcipp-1.15.0}/tests/fourcipp/utils/test_validation.py +0 -0
  67. {fourcipp-1.14.0 → fourcipp-1.15.0}/tests/fourcipp/utils/test_yaml_io.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: FourCIPP
3
- Version: 1.14.0
3
+ Version: 1.15.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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: FourCIPP
3
- Version: 1.14.0
3
+ Version: 1.15.0
4
4
  Summary: A streamlined Python Parser for 4C input files
5
5
  Author: FourCIPP Authors
6
6
  License: The MIT License (MIT)
@@ -38,7 +38,7 @@ src/fourcipp/utils/converter.py
38
38
  src/fourcipp/utils/dict_utils.py
39
39
  src/fourcipp/utils/metadata.py
40
40
  src/fourcipp/utils/not_set.py
41
- src/fourcipp/utils/typing.py
41
+ src/fourcipp/utils/type_hinting.py
42
42
  src/fourcipp/utils/validation.py
43
43
  src/fourcipp/utils/yaml_io.py
44
44
  tests/__init__.py
@@ -58,6 +58,7 @@ tests/fourcipp/utils/__init__.py
58
58
  tests/fourcipp/utils/test_configuration.py
59
59
  tests/fourcipp/utils/test_converter.py
60
60
  tests/fourcipp/utils/test_dict_utils.py
61
+ tests/fourcipp/utils/test_metadata.py
61
62
  tests/fourcipp/utils/test_not_set.py
62
63
  tests/fourcipp/utils/test_validation.py
63
64
  tests/fourcipp/utils/test_yaml_io.py
@@ -41,8 +41,8 @@ from fourcipp.utils.dict_utils import (
41
41
  compare_nested_dicts_or_lists,
42
42
  sort_by_key_order,
43
43
  )
44
- from fourcipp.utils.not_set import NotSet, check_if_set
45
- from fourcipp.utils.typing import Path
44
+ from fourcipp.utils.not_set import NOT_SET, check_if_set
45
+ from fourcipp.utils.type_hinting import Path
46
46
  from fourcipp.utils.validation import ValidationError, validate_using_json_schema
47
47
  from fourcipp.utils.yaml_io import dump_yaml, load_yaml
48
48
 
@@ -289,7 +289,7 @@ class FourCInput:
289
289
  f"Section '{key}' not set. Did out mean '{difflib.get_close_matches(key.upper(), self.all_sections_names, n=1, cutoff=0.3)[0]}'? The set sections are:\n - {sections}"
290
290
  )
291
291
 
292
- def pop(self, key: str, default_value: Any = NotSet) -> Any:
292
+ def pop(self, key: str, default_value: Any = NOT_SET) -> Any:
293
293
  """Pop entry.
294
294
 
295
295
  Args:
@@ -27,7 +27,7 @@ from fourcipp.legacy_io.element import read_element, write_element
27
27
  from fourcipp.legacy_io.node import read_node, write_node
28
28
  from fourcipp.legacy_io.node_topology import read_node_topology, write_node_topology
29
29
  from fourcipp.legacy_io.particle import read_particle, write_particle
30
- from fourcipp.utils.typing import T
30
+ from fourcipp.utils.type_hinting import T
31
31
 
32
32
 
33
33
  def _iterate_and_evaluate(function: Callable[..., T], iterable: Sequence) -> list[T]:
@@ -30,7 +30,7 @@ from fourcipp.legacy_io.inline_dat import (
30
30
  nested_casting_factory,
31
31
  to_dat_string,
32
32
  )
33
- from fourcipp.utils.typing import LineCastingDict
33
+ from fourcipp.utils.type_hinting import LineCastingDict
34
34
 
35
35
  ElementCastingDict: TypeAlias = dict[str, dict[str, LineCastingDict]]
36
36
 
@@ -24,8 +24,8 @@
24
24
  from functools import partial
25
25
  from typing import Any
26
26
 
27
- from fourcipp.utils.metadata import METADATA_TO_PYTHON
28
- from fourcipp.utils.typing import (
27
+ from fourcipp.utils.metadata import Primitive
28
+ from fourcipp.utils.type_hinting import (
29
29
  Extractor,
30
30
  LineCastingDict,
31
31
  LineListExtractor,
@@ -34,7 +34,7 @@ from fourcipp.utils.typing import (
34
34
  )
35
35
 
36
36
  # Metadata types currently supported
37
- SUPPORTED_METADATA_TYPES = list(METADATA_TO_PYTHON.keys()) + ["vector", "enum"]
37
+ SUPPORTED_METADATA_TYPES = Primitive.PRIMITIVE_TYPES + ["enum", "vector"]
38
38
 
39
39
 
40
40
  def to_dat_string(object: Any) -> str:
@@ -121,10 +121,12 @@ def _entry_casting_factory(spec: dict) -> LineListExtractor:
121
121
  Returns:
122
122
  Casting function for the spec
123
123
  """
124
- if spec["type"] in METADATA_TO_PYTHON:
125
- return partial(_extract_entry, extractor=METADATA_TO_PYTHON[spec["type"]])
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
+ )
126
128
  elif spec["type"] == "vector":
127
- value_type = METADATA_TO_PYTHON[spec["value_type"]["type"]]
129
+ value_type = Primitive.PRIMITIVE_TYPES_TO_PYTHON[spec["value_type"]["type"]]
128
130
  return partial(_extract_vector, extractor=value_type, size=spec["size"])
129
131
  elif spec["type"] == "enum":
130
132
  choices = [s["name"] for s in spec["choices"]]
@@ -31,7 +31,7 @@ from fourcipp.legacy_io.inline_dat import (
31
31
  inline_dat_read,
32
32
  to_dat_string,
33
33
  )
34
- from fourcipp.utils.typing import LineCastingDict
34
+ from fourcipp.utils.type_hinting import LineCastingDict
35
35
 
36
36
  _particle_casting = casting_factory(CONFIG.fourc_metadata["legacy_particle_specs"])
37
37
 
@@ -33,7 +33,7 @@ from fourcipp.utils.configuration import (
33
33
  change_profile,
34
34
  show_config,
35
35
  )
36
- from fourcipp.utils.typing import Path
36
+ from fourcipp.utils.type_hinting import Path
37
37
  from fourcipp.utils.yaml_io import dump_yaml, load_yaml
38
38
 
39
39
 
@@ -28,7 +28,7 @@ from dataclasses import dataclass, field
28
28
 
29
29
  from loguru import logger
30
30
 
31
- from fourcipp.utils.typing import Path
31
+ from fourcipp.utils.type_hinting import Path
32
32
  from fourcipp.utils.yaml_io import dump_yaml, load_yaml
33
33
 
34
34
  CONFIG_PACKAGE: pathlib.Path = pathlib.Path(__file__).parents[1] / "config"