FourCIPP 1.29.0__tar.gz → 1.30.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.
- {fourcipp-1.29.0 → fourcipp-1.30.0}/.github/workflows/run_testsuite.yaml +2 -2
- {fourcipp-1.29.0/src/FourCIPP.egg-info → fourcipp-1.30.0}/PKG-INFO +2 -1
- {fourcipp-1.29.0 → fourcipp-1.30.0}/pyproject.toml +1 -1
- {fourcipp-1.29.0 → fourcipp-1.30.0/src/FourCIPP.egg-info}/PKG-INFO +2 -1
- {fourcipp-1.29.0 → fourcipp-1.30.0}/src/FourCIPP.egg-info/requires.txt +1 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/src/fourcipp/legacy_io/inline_dat.py +8 -1
- {fourcipp-1.29.0 → fourcipp-1.30.0}/src/fourcipp/version.py +3 -3
- {fourcipp-1.29.0 → fourcipp-1.30.0}/tests/fourcipp/legacy_io/test_inline_dat.py +13 -3
- {fourcipp-1.29.0 → fourcipp-1.30.0}/tests/fourcipp/test_fourc_input.py +19 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/.coveragerc +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/.github/workflows/check_code.yaml +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/.github/workflows/publish_pypi.yaml +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/.github/workflows/tag_version.yaml +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/.github/workflows/update_4C_metadata_schema_file.yaml +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/.gitignore +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/.pre-commit-config.yaml +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/LICENSE +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/README.md +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/docs/assets/fourcipp_logo_black.svg +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/docs/assets/fourcipp_logo_white.svg +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/requirements.in +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/requirements.txt +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/setup.cfg +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/src/FourCIPP.egg-info/SOURCES.txt +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/src/FourCIPP.egg-info/dependency_links.txt +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/src/FourCIPP.egg-info/entry_points.txt +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/src/FourCIPP.egg-info/top_level.txt +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/src/fourcipp/__init__.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/src/fourcipp/config/4C_metadata.yaml +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/src/fourcipp/config/4C_schema.json +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/src/fourcipp/config/config.yaml +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/src/fourcipp/fourc_input.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/src/fourcipp/legacy_io/__init__.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/src/fourcipp/legacy_io/element.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/src/fourcipp/legacy_io/node.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/src/fourcipp/legacy_io/node_topology.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/src/fourcipp/legacy_io/particle.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/src/fourcipp/utils/__init__.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/src/fourcipp/utils/cli.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/src/fourcipp/utils/configuration.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/src/fourcipp/utils/converter.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/src/fourcipp/utils/dict_utils.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/src/fourcipp/utils/metadata.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/src/fourcipp/utils/not_set.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/src/fourcipp/utils/type_hinting.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/src/fourcipp/utils/validation.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/src/fourcipp/utils/yaml_io.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/tests/__init__.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/tests/conftest.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/tests/fourcipp/__init__.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/tests/fourcipp/legacy_io/__init__.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/tests/fourcipp/legacy_io/test_element.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/tests/fourcipp/legacy_io/test_legacy_io.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/tests/fourcipp/legacy_io/test_node.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/tests/fourcipp/legacy_io/test_node_topology.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/tests/fourcipp/legacy_io/test_particle.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/tests/fourcipp/legacy_io/utils.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/tests/fourcipp/test_readme_quickstart_example.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/tests/fourcipp/utils/__init__.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/tests/fourcipp/utils/test_configuration.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/tests/fourcipp/utils/test_converter.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/tests/fourcipp/utils/test_dict_utils.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/tests/fourcipp/utils/test_metadata.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/tests/fourcipp/utils/test_not_set.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.0}/tests/fourcipp/utils/test_validation.py +0 -0
- {fourcipp-1.29.0 → fourcipp-1.30.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.
|
|
3
|
+
Version: 1.30.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.
|
|
3
|
+
Version: 1.30.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">
|
|
@@ -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: {
|
|
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.
|
|
32
|
-
__version_tuple__ = version_tuple = (1,
|
|
31
|
+
__version__ = version = '1.30.0'
|
|
32
|
+
__version_tuple__ = version_tuple = (1, 30, 0)
|
|
33
33
|
|
|
34
|
-
__commit_id__ = commit_id = '
|
|
34
|
+
__commit_id__ = commit_id = 'g308bd25f3'
|
|
@@ -46,13 +46,23 @@ def test_entry_casting_factory_invalid_type():
|
|
|
46
46
|
_entry_casting_factory({"type": "invalid"})
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
|
|
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([
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|