FourCIPP 1.5.0__tar.gz → 1.6.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 (65) hide show
  1. {fourcipp-1.5.0/src/FourCIPP.egg-info → fourcipp-1.6.0}/PKG-INFO +1 -1
  2. {fourcipp-1.5.0 → fourcipp-1.6.0/src/FourCIPP.egg-info}/PKG-INFO +1 -1
  3. {fourcipp-1.5.0 → fourcipp-1.6.0}/src/fourcipp/fourc_input.py +2 -2
  4. {fourcipp-1.5.0 → fourcipp-1.6.0}/src/fourcipp/utils/yaml_io.py +7 -1
  5. {fourcipp-1.5.0 → fourcipp-1.6.0}/src/fourcipp/version.py +3 -3
  6. {fourcipp-1.5.0 → fourcipp-1.6.0}/tests/fourcipp/test_fourc_input.py +2 -2
  7. {fourcipp-1.5.0 → fourcipp-1.6.0}/tests/fourcipp/utils/test_yaml_io.py +3 -3
  8. {fourcipp-1.5.0 → fourcipp-1.6.0}/.coveragerc +0 -0
  9. {fourcipp-1.5.0 → fourcipp-1.6.0}/.github/workflows/check_code.yaml +0 -0
  10. {fourcipp-1.5.0 → fourcipp-1.6.0}/.github/workflows/publish_pypi.yaml +0 -0
  11. {fourcipp-1.5.0 → fourcipp-1.6.0}/.github/workflows/run_testsuite.yaml +0 -0
  12. {fourcipp-1.5.0 → fourcipp-1.6.0}/.github/workflows/tag_version.yaml +0 -0
  13. {fourcipp-1.5.0 → fourcipp-1.6.0}/.github/workflows/update_4C_metadata_schema_file.yaml +0 -0
  14. {fourcipp-1.5.0 → fourcipp-1.6.0}/.gitignore +0 -0
  15. {fourcipp-1.5.0 → fourcipp-1.6.0}/.pre-commit-config.yaml +0 -0
  16. {fourcipp-1.5.0 → fourcipp-1.6.0}/LICENSE +0 -0
  17. {fourcipp-1.5.0 → fourcipp-1.6.0}/README.md +0 -0
  18. {fourcipp-1.5.0 → fourcipp-1.6.0}/docs/assets/fourcipp_logo_black.svg +0 -0
  19. {fourcipp-1.5.0 → fourcipp-1.6.0}/docs/assets/fourcipp_logo_white.svg +0 -0
  20. {fourcipp-1.5.0 → fourcipp-1.6.0}/pyproject.toml +0 -0
  21. {fourcipp-1.5.0 → fourcipp-1.6.0}/requirements.in +0 -0
  22. {fourcipp-1.5.0 → fourcipp-1.6.0}/requirements.txt +0 -0
  23. {fourcipp-1.5.0 → fourcipp-1.6.0}/setup.cfg +0 -0
  24. {fourcipp-1.5.0 → fourcipp-1.6.0}/src/FourCIPP.egg-info/SOURCES.txt +0 -0
  25. {fourcipp-1.5.0 → fourcipp-1.6.0}/src/FourCIPP.egg-info/dependency_links.txt +0 -0
  26. {fourcipp-1.5.0 → fourcipp-1.6.0}/src/FourCIPP.egg-info/entry_points.txt +0 -0
  27. {fourcipp-1.5.0 → fourcipp-1.6.0}/src/FourCIPP.egg-info/requires.txt +0 -0
  28. {fourcipp-1.5.0 → fourcipp-1.6.0}/src/FourCIPP.egg-info/top_level.txt +0 -0
  29. {fourcipp-1.5.0 → fourcipp-1.6.0}/src/fourcipp/__init__.py +0 -0
  30. {fourcipp-1.5.0 → fourcipp-1.6.0}/src/fourcipp/config/4C_metadata.yaml +0 -0
  31. {fourcipp-1.5.0 → fourcipp-1.6.0}/src/fourcipp/config/4C_schema.json +0 -0
  32. {fourcipp-1.5.0 → fourcipp-1.6.0}/src/fourcipp/config/config.yaml +0 -0
  33. {fourcipp-1.5.0 → fourcipp-1.6.0}/src/fourcipp/legacy_io/__init__.py +0 -0
  34. {fourcipp-1.5.0 → fourcipp-1.6.0}/src/fourcipp/legacy_io/element.py +0 -0
  35. {fourcipp-1.5.0 → fourcipp-1.6.0}/src/fourcipp/legacy_io/inline_dat.py +0 -0
  36. {fourcipp-1.5.0 → fourcipp-1.6.0}/src/fourcipp/legacy_io/node.py +0 -0
  37. {fourcipp-1.5.0 → fourcipp-1.6.0}/src/fourcipp/legacy_io/node_topology.py +0 -0
  38. {fourcipp-1.5.0 → fourcipp-1.6.0}/src/fourcipp/legacy_io/particle.py +0 -0
  39. {fourcipp-1.5.0 → fourcipp-1.6.0}/src/fourcipp/utils/__init__.py +0 -0
  40. {fourcipp-1.5.0 → fourcipp-1.6.0}/src/fourcipp/utils/cli.py +0 -0
  41. {fourcipp-1.5.0 → fourcipp-1.6.0}/src/fourcipp/utils/configuration.py +0 -0
  42. {fourcipp-1.5.0 → fourcipp-1.6.0}/src/fourcipp/utils/converter.py +0 -0
  43. {fourcipp-1.5.0 → fourcipp-1.6.0}/src/fourcipp/utils/dict_utils.py +0 -0
  44. {fourcipp-1.5.0 → fourcipp-1.6.0}/src/fourcipp/utils/metadata.py +0 -0
  45. {fourcipp-1.5.0 → fourcipp-1.6.0}/src/fourcipp/utils/not_set.py +0 -0
  46. {fourcipp-1.5.0 → fourcipp-1.6.0}/src/fourcipp/utils/typing.py +0 -0
  47. {fourcipp-1.5.0 → fourcipp-1.6.0}/src/fourcipp/utils/validation.py +0 -0
  48. {fourcipp-1.5.0 → fourcipp-1.6.0}/tests/__init__.py +0 -0
  49. {fourcipp-1.5.0 → fourcipp-1.6.0}/tests/conftest.py +0 -0
  50. {fourcipp-1.5.0 → fourcipp-1.6.0}/tests/fourcipp/__init__.py +0 -0
  51. {fourcipp-1.5.0 → fourcipp-1.6.0}/tests/fourcipp/legacy_io/__init__.py +0 -0
  52. {fourcipp-1.5.0 → fourcipp-1.6.0}/tests/fourcipp/legacy_io/test_element.py +0 -0
  53. {fourcipp-1.5.0 → fourcipp-1.6.0}/tests/fourcipp/legacy_io/test_inline_dat.py +0 -0
  54. {fourcipp-1.5.0 → fourcipp-1.6.0}/tests/fourcipp/legacy_io/test_legacy_io.py +0 -0
  55. {fourcipp-1.5.0 → fourcipp-1.6.0}/tests/fourcipp/legacy_io/test_node.py +0 -0
  56. {fourcipp-1.5.0 → fourcipp-1.6.0}/tests/fourcipp/legacy_io/test_node_topology.py +0 -0
  57. {fourcipp-1.5.0 → fourcipp-1.6.0}/tests/fourcipp/legacy_io/test_particle.py +0 -0
  58. {fourcipp-1.5.0 → fourcipp-1.6.0}/tests/fourcipp/legacy_io/utils.py +0 -0
  59. {fourcipp-1.5.0 → fourcipp-1.6.0}/tests/fourcipp/test_readme_quickstart_example.py +0 -0
  60. {fourcipp-1.5.0 → fourcipp-1.6.0}/tests/fourcipp/utils/__init__.py +0 -0
  61. {fourcipp-1.5.0 → fourcipp-1.6.0}/tests/fourcipp/utils/test_configuration.py +0 -0
  62. {fourcipp-1.5.0 → fourcipp-1.6.0}/tests/fourcipp/utils/test_converter.py +0 -0
  63. {fourcipp-1.5.0 → fourcipp-1.6.0}/tests/fourcipp/utils/test_dict_utils.py +0 -0
  64. {fourcipp-1.5.0 → fourcipp-1.6.0}/tests/fourcipp/utils/test_not_set.py +0 -0
  65. {fourcipp-1.5.0 → fourcipp-1.6.0}/tests/fourcipp/utils/test_validation.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: FourCIPP
3
- Version: 1.5.0
3
+ Version: 1.6.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.5.0
3
+ Version: 1.6.0
4
4
  Summary: A streamlined Python Parser for 4C input files
5
5
  Author: FourCIPP Authors
6
6
  License: The MIT License (MIT)
@@ -69,7 +69,7 @@ def is_section_known(section_name: str, known_section_names: list[str]) -> bool:
69
69
  return section_name in known_section_names or section_name.startswith("FUNCT")
70
70
 
71
71
 
72
- def _sort_by_section_names(data: dict) -> dict:
72
+ def sort_by_section_names(data: dict) -> dict:
73
73
  """Sort a dictionary by its 4C sections.
74
74
 
75
75
  This sorts the dictionary in the following style:
@@ -495,7 +495,7 @@ class FourCInput:
495
495
  validate: bool = False,
496
496
  validate_sections_only: bool = False,
497
497
  convert_to_native_types: bool = True,
498
- sort_function: Callable[[dict], dict] | None = _sort_by_section_names,
498
+ sort_function: Callable[[dict], dict] | None = sort_by_section_names,
499
499
  use_fourcipp_yaml_style: bool = True,
500
500
  ) -> None:
501
501
  """Dump object to yaml.
@@ -143,7 +143,13 @@ def dict_to_yaml_string(
143
143
  if tree.has_key(node_id):
144
144
  tree.set_key_style(node_id, ryml.NOTYPE)
145
145
 
146
- return ryml.emit_yaml(tree)
146
+ yaml_string = ryml.emit_yaml(tree)
147
+
148
+ if use_fourcipp_yaml_style:
149
+ # add spaces after commas in vectors
150
+ yaml_string = re.sub(r"(?<=\d),(?=\d)|(?<=\]),(?=\[)", ", ", yaml_string)
151
+
152
+ return yaml_string
147
153
 
148
154
 
149
155
  def dump_yaml(
@@ -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.5.0'
32
- __version_tuple__ = version_tuple = (1, 5, 0)
31
+ __version__ = version = '1.6.0'
32
+ __version_tuple__ = version_tuple = (1, 6, 0)
33
33
 
34
- __commit_id__ = commit_id = 'gcce73ded9'
34
+ __commit_id__ = commit_id = 'g789740a0d'
@@ -34,7 +34,7 @@ from fourcipp import CONFIG
34
34
  from fourcipp.fourc_input import (
35
35
  FourCInput,
36
36
  UnknownSectionException,
37
- _sort_by_section_names,
37
+ sort_by_section_names,
38
38
  )
39
39
  from fourcipp.utils.cli import modify_input_with_defaults
40
40
  from fourcipp.utils.validation import ValidationError
@@ -593,7 +593,7 @@ def test_sort_by_section_names():
593
593
 
594
594
  shuffled_data = {k: 1 for k in shuffled_section_order}
595
595
 
596
- sorted_data = _sort_by_section_names(shuffled_data)
596
+ sorted_data = sort_by_section_names(shuffled_data)
597
597
 
598
598
  assert list(sorted_data.keys()) == correct_section_order
599
599
 
@@ -86,8 +86,8 @@ def test_dump_sorted_alphabetically(tmp_path):
86
86
  (
87
87
  True,
88
88
  """SECTION:
89
- - vector: [1.23,2,3]
90
- nested_vector: [[1,2.0,3],[4.5,5,2.333]]
89
+ - vector: [1.23, 2, 3]
90
+ nested_vector: [[1, 2.0, 3], [4.5, 5, 2.333]]
91
91
  - list_with_bool:
92
92
  - 1
93
93
  - true
@@ -101,7 +101,7 @@ def test_dump_sorted_alphabetically(tmp_path):
101
101
  - "abc"
102
102
  - 5
103
103
  nested_list_with_string:
104
- - [1,2.1]
104
+ - [1, 2.1]
105
105
  - - 2
106
106
  - "def"
107
107
  """,
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