FourCIPP 1.29.0__tar.gz → 1.31.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 (66) hide show
  1. {fourcipp-1.29.0 → fourcipp-1.31.0}/.github/workflows/run_testsuite.yaml +2 -2
  2. {fourcipp-1.29.0/src/FourCIPP.egg-info → fourcipp-1.31.0}/PKG-INFO +2 -1
  3. {fourcipp-1.29.0 → fourcipp-1.31.0}/pyproject.toml +1 -1
  4. {fourcipp-1.29.0 → fourcipp-1.31.0/src/FourCIPP.egg-info}/PKG-INFO +2 -1
  5. {fourcipp-1.29.0 → fourcipp-1.31.0}/src/FourCIPP.egg-info/requires.txt +1 -0
  6. {fourcipp-1.29.0 → fourcipp-1.31.0}/src/fourcipp/config/4C_metadata.yaml +41 -1
  7. {fourcipp-1.29.0 → fourcipp-1.31.0}/src/fourcipp/config/4C_schema.json +66 -2
  8. {fourcipp-1.29.0 → fourcipp-1.31.0}/src/fourcipp/legacy_io/inline_dat.py +8 -1
  9. {fourcipp-1.29.0 → fourcipp-1.31.0}/src/fourcipp/version.py +3 -3
  10. {fourcipp-1.29.0 → fourcipp-1.31.0}/tests/fourcipp/legacy_io/test_inline_dat.py +13 -3
  11. {fourcipp-1.29.0 → fourcipp-1.31.0}/tests/fourcipp/test_fourc_input.py +19 -0
  12. {fourcipp-1.29.0 → fourcipp-1.31.0}/.coveragerc +0 -0
  13. {fourcipp-1.29.0 → fourcipp-1.31.0}/.github/workflows/check_code.yaml +0 -0
  14. {fourcipp-1.29.0 → fourcipp-1.31.0}/.github/workflows/publish_pypi.yaml +0 -0
  15. {fourcipp-1.29.0 → fourcipp-1.31.0}/.github/workflows/tag_version.yaml +0 -0
  16. {fourcipp-1.29.0 → fourcipp-1.31.0}/.github/workflows/update_4C_metadata_schema_file.yaml +0 -0
  17. {fourcipp-1.29.0 → fourcipp-1.31.0}/.gitignore +0 -0
  18. {fourcipp-1.29.0 → fourcipp-1.31.0}/.pre-commit-config.yaml +0 -0
  19. {fourcipp-1.29.0 → fourcipp-1.31.0}/LICENSE +0 -0
  20. {fourcipp-1.29.0 → fourcipp-1.31.0}/README.md +0 -0
  21. {fourcipp-1.29.0 → fourcipp-1.31.0}/docs/assets/fourcipp_logo_black.svg +0 -0
  22. {fourcipp-1.29.0 → fourcipp-1.31.0}/docs/assets/fourcipp_logo_white.svg +0 -0
  23. {fourcipp-1.29.0 → fourcipp-1.31.0}/requirements.in +0 -0
  24. {fourcipp-1.29.0 → fourcipp-1.31.0}/requirements.txt +0 -0
  25. {fourcipp-1.29.0 → fourcipp-1.31.0}/setup.cfg +0 -0
  26. {fourcipp-1.29.0 → fourcipp-1.31.0}/src/FourCIPP.egg-info/SOURCES.txt +0 -0
  27. {fourcipp-1.29.0 → fourcipp-1.31.0}/src/FourCIPP.egg-info/dependency_links.txt +0 -0
  28. {fourcipp-1.29.0 → fourcipp-1.31.0}/src/FourCIPP.egg-info/entry_points.txt +0 -0
  29. {fourcipp-1.29.0 → fourcipp-1.31.0}/src/FourCIPP.egg-info/top_level.txt +0 -0
  30. {fourcipp-1.29.0 → fourcipp-1.31.0}/src/fourcipp/__init__.py +0 -0
  31. {fourcipp-1.29.0 → fourcipp-1.31.0}/src/fourcipp/config/config.yaml +0 -0
  32. {fourcipp-1.29.0 → fourcipp-1.31.0}/src/fourcipp/fourc_input.py +0 -0
  33. {fourcipp-1.29.0 → fourcipp-1.31.0}/src/fourcipp/legacy_io/__init__.py +0 -0
  34. {fourcipp-1.29.0 → fourcipp-1.31.0}/src/fourcipp/legacy_io/element.py +0 -0
  35. {fourcipp-1.29.0 → fourcipp-1.31.0}/src/fourcipp/legacy_io/node.py +0 -0
  36. {fourcipp-1.29.0 → fourcipp-1.31.0}/src/fourcipp/legacy_io/node_topology.py +0 -0
  37. {fourcipp-1.29.0 → fourcipp-1.31.0}/src/fourcipp/legacy_io/particle.py +0 -0
  38. {fourcipp-1.29.0 → fourcipp-1.31.0}/src/fourcipp/utils/__init__.py +0 -0
  39. {fourcipp-1.29.0 → fourcipp-1.31.0}/src/fourcipp/utils/cli.py +0 -0
  40. {fourcipp-1.29.0 → fourcipp-1.31.0}/src/fourcipp/utils/configuration.py +0 -0
  41. {fourcipp-1.29.0 → fourcipp-1.31.0}/src/fourcipp/utils/converter.py +0 -0
  42. {fourcipp-1.29.0 → fourcipp-1.31.0}/src/fourcipp/utils/dict_utils.py +0 -0
  43. {fourcipp-1.29.0 → fourcipp-1.31.0}/src/fourcipp/utils/metadata.py +0 -0
  44. {fourcipp-1.29.0 → fourcipp-1.31.0}/src/fourcipp/utils/not_set.py +0 -0
  45. {fourcipp-1.29.0 → fourcipp-1.31.0}/src/fourcipp/utils/type_hinting.py +0 -0
  46. {fourcipp-1.29.0 → fourcipp-1.31.0}/src/fourcipp/utils/validation.py +0 -0
  47. {fourcipp-1.29.0 → fourcipp-1.31.0}/src/fourcipp/utils/yaml_io.py +0 -0
  48. {fourcipp-1.29.0 → fourcipp-1.31.0}/tests/__init__.py +0 -0
  49. {fourcipp-1.29.0 → fourcipp-1.31.0}/tests/conftest.py +0 -0
  50. {fourcipp-1.29.0 → fourcipp-1.31.0}/tests/fourcipp/__init__.py +0 -0
  51. {fourcipp-1.29.0 → fourcipp-1.31.0}/tests/fourcipp/legacy_io/__init__.py +0 -0
  52. {fourcipp-1.29.0 → fourcipp-1.31.0}/tests/fourcipp/legacy_io/test_element.py +0 -0
  53. {fourcipp-1.29.0 → fourcipp-1.31.0}/tests/fourcipp/legacy_io/test_legacy_io.py +0 -0
  54. {fourcipp-1.29.0 → fourcipp-1.31.0}/tests/fourcipp/legacy_io/test_node.py +0 -0
  55. {fourcipp-1.29.0 → fourcipp-1.31.0}/tests/fourcipp/legacy_io/test_node_topology.py +0 -0
  56. {fourcipp-1.29.0 → fourcipp-1.31.0}/tests/fourcipp/legacy_io/test_particle.py +0 -0
  57. {fourcipp-1.29.0 → fourcipp-1.31.0}/tests/fourcipp/legacy_io/utils.py +0 -0
  58. {fourcipp-1.29.0 → fourcipp-1.31.0}/tests/fourcipp/test_readme_quickstart_example.py +0 -0
  59. {fourcipp-1.29.0 → fourcipp-1.31.0}/tests/fourcipp/utils/__init__.py +0 -0
  60. {fourcipp-1.29.0 → fourcipp-1.31.0}/tests/fourcipp/utils/test_configuration.py +0 -0
  61. {fourcipp-1.29.0 → fourcipp-1.31.0}/tests/fourcipp/utils/test_converter.py +0 -0
  62. {fourcipp-1.29.0 → fourcipp-1.31.0}/tests/fourcipp/utils/test_dict_utils.py +0 -0
  63. {fourcipp-1.29.0 → fourcipp-1.31.0}/tests/fourcipp/utils/test_metadata.py +0 -0
  64. {fourcipp-1.29.0 → fourcipp-1.31.0}/tests/fourcipp/utils/test_not_set.py +0 -0
  65. {fourcipp-1.29.0 → fourcipp-1.31.0}/tests/fourcipp/utils/test_validation.py +0 -0
  66. {fourcipp-1.29.0 → fourcipp-1.31.0}/tests/fourcipp/utils/test_yaml_io.py +0 -0
@@ -70,10 +70,10 @@ jobs:
70
70
  - name: Run pytest using 4C_docker_main config
71
71
  run: |
72
72
  fourcipp switch-config-profile 4C_docker_main
73
- pytest --color=yes -v
73
+ pytest -n 4 --color=yes -v
74
74
  - name: Run pytest using default config
75
75
  # For this job coverage is turned off, otherwise the checks would fail.
76
76
  # Coverage is done in the 4C docker job, as here 4C test input files are available.
77
77
  run: |
78
78
  fourcipp switch-config-profile default
79
- pytest --color=yes -v --no-cov
79
+ pytest -n 4 --color=yes -v --no-cov
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: FourCIPP
3
- Version: 1.29.0
3
+ Version: 1.31.0
4
4
  Summary: A streamlined Python Parser for 4C input files
5
5
  Author: FourCIPP Authors
6
6
  License: The MIT License (MIT)
@@ -39,6 +39,7 @@ Requires-Dist: pre-commit; extra == "dev"
39
39
  Requires-Dist: pytest; extra == "dev"
40
40
  Requires-Dist: pytest-cov; extra == "dev"
41
41
  Requires-Dist: pip-tools; extra == "dev"
42
+ Requires-Dist: pytest-xdist; extra == "dev"
42
43
  Dynamic: license-file
43
44
 
44
45
  <p align="center">
@@ -30,7 +30,7 @@ optional-dependencies = { safe = { file = [
30
30
  "fourcipp.config" = ["*.json", "*.yaml"]
31
31
 
32
32
  [project.optional-dependencies]
33
- dev = ["pre-commit", "pytest", "pytest-cov", "pip-tools"]
33
+ dev = ["pre-commit", "pytest", "pytest-cov", "pip-tools", "pytest-xdist"]
34
34
 
35
35
  [tool.setuptools_scm]
36
36
  version_file = "src/fourcipp/version.py"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: FourCIPP
3
- Version: 1.29.0
3
+ Version: 1.31.0
4
4
  Summary: A streamlined Python Parser for 4C input files
5
5
  Author: FourCIPP Authors
6
6
  License: The MIT License (MIT)
@@ -39,6 +39,7 @@ Requires-Dist: pre-commit; extra == "dev"
39
39
  Requires-Dist: pytest; extra == "dev"
40
40
  Requires-Dist: pytest-cov; extra == "dev"
41
41
  Requires-Dist: pip-tools; extra == "dev"
42
+ Requires-Dist: pytest-xdist; extra == "dev"
42
43
  Dynamic: license-file
43
44
 
44
45
  <p align="center">
@@ -9,3 +9,4 @@ pre-commit
9
9
  pytest
10
10
  pytest-cov
11
11
  pip-tools
12
+ pytest-xdist
@@ -1,5 +1,5 @@
1
1
  metadata:
2
- commit_hash: 8095d8aaa1256ed5ab513233b4b304a6515766bc
2
+ commit_hash: e9cbd1b8923fa74b6bd9233af7947fc7d79be199
3
3
  version: 2025.4.0-dev
4
4
  description_section_name: TITLE
5
5
  legacy_element_specs:
@@ -41122,6 +41122,46 @@ sections:
41122
41122
  - name: COUPLING_ID
41123
41123
  type: int
41124
41124
  required: true
41125
+ - name: BEAM INTERACTION/BEAM TO BEAM POINT COUPLING CONDITIONS
41126
+ type: list
41127
+ description: Coupling conditions between beams based on closest point projections.
41128
+ required: false
41129
+ spec:
41130
+ type: all_of
41131
+ specs:
41132
+ - name: E
41133
+ type: int
41134
+ description: "ID of the condition. This ID refers to the respective topological entity of the condition."
41135
+ required: true
41136
+ - name: ENTITY_TYPE
41137
+ type: enum
41138
+ description: "The type of entity that E refers to."
41139
+ required: false
41140
+ default: legacy_id
41141
+ choices:
41142
+ - name: legacy_id
41143
+ - name: node_set_id
41144
+ - name: element_block_id
41145
+ - name: COUPLING_ID
41146
+ type: int
41147
+ required: true
41148
+ - name: PARAMETERS
41149
+ type: group
41150
+ required: false
41151
+ specs:
41152
+ - type: all_of
41153
+ specs:
41154
+ - name: POSITIONAL_PENALTY_PARAMETER
41155
+ type: double
41156
+ required: true
41157
+ - name: ROTATIONAL_PENALTY_PARAMETER
41158
+ type: double
41159
+ required: true
41160
+ - name: PROJECTION_VALID_FACTOR
41161
+ type: double
41162
+ description: "Factor multiplied with sum of cross section radii to define valid projection distance"
41163
+ required: false
41164
+ default: 2
41125
41165
  - name: BEAM INTERACTION/BEAM TO SOLID EDGE CONTACT
41126
41166
  type: group
41127
41167
  description: Parameters for beam-to-solid edge contact.
@@ -1,5 +1,5 @@
1
1
  {
2
- "description": "Schema for 4C\nCommit hash: 8095d8aaa1256ed5ab513233b4b304a6515766bc\nVersion: 2025.4.0-dev",
2
+ "description": "Schema for 4C\nCommit hash: e9cbd1b8923fa74b6bd9233af7947fc7d79be199\nVersion: 2025.4.0-dev",
3
3
  "type": "object",
4
4
  "properties": {
5
5
  "ALE DOMAIN": {
@@ -69149,6 +69149,70 @@
69149
69149
  ]
69150
69150
  }
69151
69151
  },
69152
+ "BEAM INTERACTION/BEAM TO BEAM POINT COUPLING CONDITIONS": {
69153
+ "title": "BEAM INTERACTION/BEAM TO BEAM POINT COUPLING CONDITIONS (list)",
69154
+ "description": "Coupling conditions between beams based on closest point projections.",
69155
+ "type": "array",
69156
+ "items": {
69157
+ "type": "object",
69158
+ "properties": {
69159
+ "E": {
69160
+ "title": "E (int)",
69161
+ "description": "ID of the condition. This ID refers to the respective topological entity of the condition.",
69162
+ "type": "integer"
69163
+ },
69164
+ "ENTITY_TYPE": {
69165
+ "title": "ENTITY_TYPE (enum)",
69166
+ "description": "The type of entity that E refers to.",
69167
+ "default": "legacy_id",
69168
+ "type": "string",
69169
+ "enum": [
69170
+ "legacy_id",
69171
+ "node_set_id",
69172
+ "element_block_id"
69173
+ ]
69174
+ },
69175
+ "COUPLING_ID": {
69176
+ "title": "COUPLING_ID (int)",
69177
+ "description": "No description yet.",
69178
+ "type": "integer"
69179
+ },
69180
+ "PARAMETERS": {
69181
+ "title": "PARAMETERS (group)",
69182
+ "description": "No description yet.",
69183
+ "type": "object",
69184
+ "properties": {
69185
+ "POSITIONAL_PENALTY_PARAMETER": {
69186
+ "title": "POSITIONAL_PENALTY_PARAMETER (double)",
69187
+ "description": "No description yet.",
69188
+ "type": "number"
69189
+ },
69190
+ "ROTATIONAL_PENALTY_PARAMETER": {
69191
+ "title": "ROTATIONAL_PENALTY_PARAMETER (double)",
69192
+ "description": "No description yet.",
69193
+ "type": "number"
69194
+ },
69195
+ "PROJECTION_VALID_FACTOR": {
69196
+ "title": "PROJECTION_VALID_FACTOR (double)",
69197
+ "description": "Factor multiplied with sum of cross section radii to define valid projection distance",
69198
+ "default": 2,
69199
+ "type": "number"
69200
+ }
69201
+ },
69202
+ "additionalProperties": false,
69203
+ "required": [
69204
+ "POSITIONAL_PENALTY_PARAMETER",
69205
+ "ROTATIONAL_PENALTY_PARAMETER"
69206
+ ]
69207
+ }
69208
+ },
69209
+ "additionalProperties": false,
69210
+ "required": [
69211
+ "E",
69212
+ "COUPLING_ID"
69213
+ ]
69214
+ }
69215
+ },
69152
69216
  "BEAM INTERACTION/BEAM TO SOLID EDGE CONTACT": {
69153
69217
  "title": "BEAM INTERACTION/BEAM TO SOLID EDGE CONTACT (group)",
69154
69218
  "description": "Parameters for beam-to-solid edge contact.",
@@ -401750,5 +401814,5 @@
401750
401814
  "PROBLEM TYPE"
401751
401815
  ],
401752
401816
  "$schema": "https://json-schema.org/draft/2020-12/schema",
401753
- "$id": "8095d8aaa1256ed5ab513233b4b304a6515766bc"
401817
+ "$id": "e9cbd1b8923fa74b6bd9233af7947fc7d79be199"
401754
401818
  }
@@ -123,7 +123,14 @@ def _entry_casting_factory(spec: dict) -> LineListExtractor:
123
123
  """
124
124
 
125
125
  primitive_extractors = Primitive.PRIMITIVE_TYPES_TO_PYTHON.copy()
126
- primitive_extractors["bool"] = lambda v: {"true": True, "false": False}[v]
126
+ primitive_extractors["bool"] = lambda v: {
127
+ "true": True,
128
+ "yes": True,
129
+ "1": True,
130
+ "false": False,
131
+ "no": False,
132
+ "0": False,
133
+ }[v]
127
134
 
128
135
  if spec["type"] in primitive_extractors:
129
136
  extractor = primitive_extractors[spec["type"]]
@@ -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.29.0'
32
- __version_tuple__ = version_tuple = (1, 29, 0)
31
+ __version__ = version = '1.31.0'
32
+ __version_tuple__ = version_tuple = (1, 31, 0)
33
33
 
34
- __commit_id__ = commit_id = 'g2a27eaf10'
34
+ __commit_id__ = commit_id = 'g13850abd6'
@@ -46,13 +46,23 @@ def test_entry_casting_factory_invalid_type():
46
46
  _entry_casting_factory({"type": "invalid"})
47
47
 
48
48
 
49
- def test_entry_casting_factory_bool_cast():
49
+ @pytest.mark.parametrize(
50
+ "value,expected_value",
51
+ [
52
+ ("true", True),
53
+ ("yes", True),
54
+ ("1", True),
55
+ ("false", False),
56
+ ("no", False),
57
+ ("0", False),
58
+ ],
59
+ )
60
+ def test_entry_casting_factory_bool_cast(value, expected_value):
50
61
  """Test bool casting."""
51
62
  spec = {"type": "bool"}
52
63
  cast_func = _entry_casting_factory(spec)
53
64
 
54
- assert cast_func(["true"]) is True
55
- assert cast_func(["false"]) is False
65
+ assert cast_func([value]) is expected_value
56
66
 
57
67
 
58
68
  @pytest.mark.parametrize(
@@ -469,6 +469,25 @@ def test_roundtrip_test(fourc_file, tmp_path):
469
469
  )
470
470
 
471
471
 
472
+ @pytest.mark.skipif(CONFIG.name != "4C_docker_main", reason="Not using docker config.")
473
+ @pytest.mark.parametrize(
474
+ "fourc_file",
475
+ [
476
+ str(f.resolve())
477
+ for f in pathlib.Path("/home/user/4C/tests/input_files").glob("*.4C.yaml")
478
+ ],
479
+ )
480
+ def test_readin_all_test_files(fourc_file):
481
+ """Read all known 4C files and check if valid."""
482
+ fourc_file = pathlib.Path(fourc_file)
483
+
484
+ # Load 4C input test file
485
+ fourc_input = FourCInput.from_4C_yaml(fourc_file)
486
+
487
+ # Check if it is valid
488
+ fourc_input.validate()
489
+
490
+
472
491
  def test_extract_header_sections(fourc_input, fourc_input_with_legacy_section):
473
492
  """Test the header extraction."""
474
493
 
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