FourCIPP 1.26.0__py3-none-any.whl → 1.28.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 +883 -253
- fourcipp/config/4C_schema.json +1202 -722
- fourcipp/fourc_input.py +30 -10
- fourcipp/version.py +2 -2
- {fourcipp-1.26.0.dist-info → fourcipp-1.28.0.dist-info}/METADATA +1 -1
- {fourcipp-1.26.0.dist-info → fourcipp-1.28.0.dist-info}/RECORD +10 -10
- {fourcipp-1.26.0.dist-info → fourcipp-1.28.0.dist-info}/WHEEL +0 -0
- {fourcipp-1.26.0.dist-info → fourcipp-1.28.0.dist-info}/entry_points.txt +0 -0
- {fourcipp-1.26.0.dist-info → fourcipp-1.28.0.dist-info}/licenses/LICENSE +0 -0
- {fourcipp-1.26.0.dist-info → fourcipp-1.28.0.dist-info}/top_level.txt +0 -0
fourcipp/fourc_input.py
CHANGED
|
@@ -75,8 +75,12 @@ def sort_by_section_names(data: dict) -> dict:
|
|
|
75
75
|
This sorts the dictionary in the following style:
|
|
76
76
|
|
|
77
77
|
1. "TITLE" section
|
|
78
|
-
2.
|
|
79
|
-
3.
|
|
78
|
+
2. Required sections (in schema order)
|
|
79
|
+
3. Typed sections (alphabetically, case-insensitive)
|
|
80
|
+
3.1 MATERIALS section
|
|
81
|
+
3.2 'DESIGN *' sections (alphabetically, case-insensitive)
|
|
82
|
+
4. FUNCT sections (numeric order)
|
|
83
|
+
5. Legacy sections (alphabetically)
|
|
80
84
|
|
|
81
85
|
Args:
|
|
82
86
|
data: Dictionary to sort.
|
|
@@ -89,10 +93,23 @@ def sort_by_section_names(data: dict) -> dict:
|
|
|
89
93
|
required_sections = CONFIG.fourc_json_schema["required"]
|
|
90
94
|
n_sections_splitter = len(CONFIG.sections.all_sections) * 1000
|
|
91
95
|
|
|
92
|
-
#
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
+
# typed sections (sorted alphabetically + case insensitive, 'DESIGN *' + 'MATERIALS' at the end)
|
|
97
|
+
design_sections = [
|
|
98
|
+
s for s in CONFIG.sections.typed_sections if s.startswith("DESIGN")
|
|
99
|
+
]
|
|
100
|
+
remaining_typed_sections = list(
|
|
101
|
+
set(CONFIG.sections.typed_sections) - set(design_sections) - set(["MATERIALS"])
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
typed_sections = (
|
|
105
|
+
sorted(remaining_typed_sections, key=str.lower)
|
|
106
|
+
+ ["MATERIALS"]
|
|
107
|
+
+ sorted(design_sections, key=str.lower)
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
# function sections (sorted numerically)
|
|
111
|
+
functions = sorted(
|
|
112
|
+
[s for s in data.keys() if s.startswith("FUNCT") and s[5:].isdigit()],
|
|
96
113
|
key=lambda s: (
|
|
97
114
|
s.lower() if not s.startswith("FUNCT") else f"funct{s[5:].zfill(10)}"
|
|
98
115
|
),
|
|
@@ -115,12 +132,15 @@ def sort_by_section_names(data: dict) -> dict:
|
|
|
115
132
|
# Required sections
|
|
116
133
|
elif section in required_sections:
|
|
117
134
|
return 1 * n_sections_splitter + required_sections.index(section)
|
|
118
|
-
# Typed
|
|
119
|
-
elif section in
|
|
120
|
-
return 2 * n_sections_splitter +
|
|
135
|
+
# Typed sections (alphabetical + case insensitive)
|
|
136
|
+
elif section in typed_sections:
|
|
137
|
+
return 2 * n_sections_splitter + typed_sections.index(section)
|
|
138
|
+
# Function sections (numeric order)
|
|
139
|
+
elif section in functions:
|
|
140
|
+
return 3 * n_sections_splitter + functions.index(section)
|
|
121
141
|
# Legacy sections
|
|
122
142
|
elif section in CONFIG.sections.legacy_sections:
|
|
123
|
-
return
|
|
143
|
+
return 4 * n_sections_splitter + CONFIG.sections.legacy_sections.index(
|
|
124
144
|
section
|
|
125
145
|
)
|
|
126
146
|
# Unknown section
|
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.28.0'
|
|
32
|
+
__version_tuple__ = version_tuple = (1, 28, 0)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
fourcipp/__init__.py,sha256=4pz7DVXErSbUcLqPTaHnQfdJzKkpfZDivBqbHbTgpRE,1388
|
|
2
|
-
fourcipp/fourc_input.py,sha256=
|
|
3
|
-
fourcipp/version.py,sha256=
|
|
4
|
-
fourcipp/config/4C_metadata.yaml,sha256=
|
|
5
|
-
fourcipp/config/4C_schema.json,sha256=
|
|
2
|
+
fourcipp/fourc_input.py,sha256=U_1b3XtZpXZfRV3ZAWiZzpAKtLWWrdBXow2r3wNPWao,24720
|
|
3
|
+
fourcipp/version.py,sha256=h64Lu1BxlbxLmxb95uQFjkjl8oExEu5L2BxblyJaHmA,706
|
|
4
|
+
fourcipp/config/4C_metadata.yaml,sha256=Fax9tKgIEU_SHaH4_xA3C-y8G7irVGFzRxFwQll2Zp0,11946545
|
|
5
|
+
fourcipp/config/4C_schema.json,sha256=GXWu0DbVnTQmRXIaD_l95MJYmfZNWCTC4H7NEF4HH-U,16527639
|
|
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
|
|
@@ -20,9 +20,9 @@ fourcipp/utils/not_set.py,sha256=NHf0UXDmTuZfvfnIIgkkx4EohxRsN4MVUHUpt7VOnaQ,243
|
|
|
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
|
-
fourcipp-1.
|
|
25
|
-
fourcipp-1.
|
|
26
|
-
fourcipp-1.
|
|
27
|
-
fourcipp-1.
|
|
28
|
-
fourcipp-1.
|
|
23
|
+
fourcipp-1.28.0.dist-info/licenses/LICENSE,sha256=lkSOHdH9IZ8c3Vnz0fFjqls1cRlmLADBP8QEIwUlH3o,1082
|
|
24
|
+
fourcipp-1.28.0.dist-info/METADATA,sha256=1oVsqGq_Htde7uhrtVGGozfq6DEOM2ocI4OFTN7nveo,7916
|
|
25
|
+
fourcipp-1.28.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
26
|
+
fourcipp-1.28.0.dist-info/entry_points.txt,sha256=44XBG4bwhuq1EwOZ0U055HYP8_qN6_d30ecVsa5Igng,53
|
|
27
|
+
fourcipp-1.28.0.dist-info/top_level.txt,sha256=oZ6jgFFmvi157VwGUEFuKT3D8oS5mOkpOVx8zZURZrQ,9
|
|
28
|
+
fourcipp-1.28.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|