FourCIPP 1.4.0__py3-none-any.whl → 1.6.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/fourc_input.py CHANGED
@@ -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.
fourcipp/utils/yaml_io.py CHANGED
@@ -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(
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.4.0'
32
- __version_tuple__ = version_tuple = (1, 4, 0)
31
+ __version__ = version = '1.6.0'
32
+ __version_tuple__ = version_tuple = (1, 6, 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.4.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,8 +1,8 @@
1
1
  fourcipp/__init__.py,sha256=4pz7DVXErSbUcLqPTaHnQfdJzKkpfZDivBqbHbTgpRE,1388
2
- fourcipp/fourc_input.py,sha256=TXVP-N_FTadt4L8MPH3VZXeT7i5uy7Btz3H-N0pxMr0,23948
3
- fourcipp/version.py,sha256=qX8_mGjWClM0QeMyVAByaVXEA4Pk87fxkFSMEQx9-KM,704
4
- fourcipp/config/4C_metadata.yaml,sha256=3n3Uj24iblvsfqUI-8H2LYMHOROjeHl68Nok0F22Unc,11868927
5
- fourcipp/config/4C_schema.json,sha256=67giZGZSKXkjO_NCbZzx-blVdGB6BFXRbHrXkmqB_T4,16412275
2
+ fourcipp/fourc_input.py,sha256=ocyxXdu8NFIRM94dc4EG_r8XsBkJajvw1YWHmZh-G6Y,23946
3
+ fourcipp/version.py,sha256=QuifT9FwIKV3Bt8At2-CvH3sl5xacVDBQsWlFAqVjbg,704
4
+ fourcipp/config/4C_metadata.yaml,sha256=A2cJVUA_PMZ3Y_mGP-M3VhpQhLbSn1a1oh3gfGpJ9GQ,11868923
5
+ fourcipp/config/4C_schema.json,sha256=wDRSORrXQpg8cIhIOxeD2GTqfewUE4ygbPSeluSH7b0,16412271
6
6
  fourcipp/config/config.yaml,sha256=n2c2a6E4HKfAdNWOQz1kLUuf5p4NLxIddaAi2t5eM38,460
7
7
  fourcipp/legacy_io/__init__.py,sha256=y6aTjgUe61OQSl1NMiZ-fQAGTab_xNT1eJTnaTnsIkc,5744
8
8
  fourcipp/legacy_io/element.py,sha256=b8--f3IR9nB68R25mk4DHHOBdDLqASewtAdPZAkA2t4,3971
@@ -19,10 +19,10 @@ fourcipp/utils/metadata.py,sha256=98jz9Gm8qdvZ-b1jwYObNJTaiMQWwbknvS70Nv6Gwhk,12
19
19
  fourcipp/utils/not_set.py,sha256=04C_3axe2cupBYgfpgDAcGs1zHVzG3I58UGO58TH05A,2017
20
20
  fourcipp/utils/typing.py,sha256=8iX9PuKe8B1WJ3vEjiM5ZfefvgYnaZDiSdB7Nx9SrVw,1625
21
21
  fourcipp/utils/validation.py,sha256=FejHOj1MddaU7gEpMN-f8Mz3rYjflakd1qcsKnctHqA,5292
22
- fourcipp/utils/yaml_io.py,sha256=bs78Mc3fIz0kK5wgwwu89OhaDpLzECTRBQtIpnifTqk,5559
23
- fourcipp-1.4.0.dist-info/licenses/LICENSE,sha256=lkSOHdH9IZ8c3Vnz0fFjqls1cRlmLADBP8QEIwUlH3o,1082
24
- fourcipp-1.4.0.dist-info/METADATA,sha256=ldyK7yc2khoquz4mNXn5ibAG8EATRDaUlYiPxNnsGW4,7947
25
- fourcipp-1.4.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
26
- fourcipp-1.4.0.dist-info/entry_points.txt,sha256=44XBG4bwhuq1EwOZ0U055HYP8_qN6_d30ecVsa5Igng,53
27
- fourcipp-1.4.0.dist-info/top_level.txt,sha256=oZ6jgFFmvi157VwGUEFuKT3D8oS5mOkpOVx8zZURZrQ,9
28
- fourcipp-1.4.0.dist-info/RECORD,,
22
+ fourcipp/utils/yaml_io.py,sha256=dE-TxqS0JFoHfmYkKAbl6sBa3Y80zIvgIJ6C1qhoy6o,5750
23
+ fourcipp-1.6.0.dist-info/licenses/LICENSE,sha256=lkSOHdH9IZ8c3Vnz0fFjqls1cRlmLADBP8QEIwUlH3o,1082
24
+ fourcipp-1.6.0.dist-info/METADATA,sha256=8JflGv2PGnMAtwoGv4jrCw1un04tDe6XJlZbIIEx7dk,7947
25
+ fourcipp-1.6.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
26
+ fourcipp-1.6.0.dist-info/entry_points.txt,sha256=44XBG4bwhuq1EwOZ0U055HYP8_qN6_d30ecVsa5Igng,53
27
+ fourcipp-1.6.0.dist-info/top_level.txt,sha256=oZ6jgFFmvi157VwGUEFuKT3D8oS5mOkpOVx8zZURZrQ,9
28
+ fourcipp-1.6.0.dist-info/RECORD,,