diff --git a/.ci_support/environment-atomistics.yml b/.ci_support/environment-pyiron-atomistics-0-6-13.yml similarity index 100% rename from .ci_support/environment-atomistics.yml rename to .ci_support/environment-pyiron-atomistics-0-6-13.yml diff --git a/.github/workflows/pyiron_atomistics_tests.yml b/.github/workflows/pyiron_atomistics_tests.yml index de6f18b..cebb678 100644 --- a/.github/workflows/pyiron_atomistics_tests.yml +++ b/.github/workflows/pyiron_atomistics_tests.yml @@ -1,4 +1,4 @@ -name: Tests for pyiron_atomistics +name: Tests for pyiron_atomistics 0.6.13 on: push: @@ -19,7 +19,7 @@ jobs: python-version: "3.12" miniforge-version: latest condarc-file: .condarc - environment-file: .ci_support/environment-atomistics.yml + environment-file: .ci_support/environment-pyiron-atomistics-0-6-13.yml - name: Test shell: bash -l {0} timeout-minutes: 5 diff --git a/tests/convert.py b/tests/convert.py index 9026ecb..162a6b5 100644 --- a/tests/convert.py +++ b/tests/convert.py @@ -73,14 +73,14 @@ def convert_sphinx_job_dict(job_dict: dict) -> SphinxJob: ) return SphinxJob( executable=Executable( - version=job_dict["executable"]["executable"]["version"], - name=job_dict["executable"]["executable"]["name"], - operation_system_nt=job_dict["executable"]["executable"][ + version=job_dict["executable"]["version"], + name=job_dict["executable"]["name"], + operation_system_nt=job_dict["executable"][ "operation_system_nt" ], - executable=job_dict["executable"]["executable"]["executable"], - mpi=job_dict["executable"]["executable"]["mpi"], - accepted_return_codes=job_dict["executable"]["executable"][ + executable=job_dict["executable"]["executable"], + mpi=job_dict["executable"]["mpi"], + accepted_return_codes=job_dict["executable"][ "accepted_return_codes" ], ), @@ -92,7 +92,7 @@ def convert_sphinx_job_dict(job_dict: dict) -> SphinxJob: qid=job_dict["server"]["qid"], cores=job_dict["server"]["cores"], threads=job_dict["server"]["threads"], - new_hdf=job_dict["server"]["new_h5"], + new_hdf=job_dict["server"]["new_hdf"], run_time=job_dict["server"]["run_time"], memory_limit=job_dict["server"]["memory_limit"], accept_crash=job_dict["server"]["accept_crash"], @@ -954,7 +954,7 @@ def recursive_sort(input_value: dict) -> dict: else: ind_dict[int(ind)] = key content_dict[key] = recursive_sort(input_value=v) - else: + elif k != "DICT_VERSION": content_dict[k] = recursive_sort(input_value=v) if content_lst_flag: return [ind_dict[ind] for ind in sorted(list(ind_dict.keys()))] @@ -966,7 +966,7 @@ def recursive_sort(input_value: dict) -> dict: elif len(ind_dict) == 0: return content_dict else: - raise KeyError() + raise KeyError(ind_dict, content_dict) def convert_datacontainer_to_dictionary(data_container_dict: dict) -> dict: diff --git a/tests/static/lmp.h5 b/tests/pyiron_atomistics_0_6_13/lmp.h5 similarity index 100% rename from tests/static/lmp.h5 rename to tests/pyiron_atomistics_0_6_13/lmp.h5 diff --git a/tests/pyiron_atomistics_0_6_13/sx.h5 b/tests/pyiron_atomistics_0_6_13/sx.h5 new file mode 100644 index 0000000..e169b66 Binary files /dev/null and b/tests/pyiron_atomistics_0_6_13/sx.h5 differ diff --git a/tests/static/vasp.h5 b/tests/pyiron_atomistics_0_6_13/vasp.h5 similarity index 100% rename from tests/static/vasp.h5 rename to tests/pyiron_atomistics_0_6_13/vasp.h5 diff --git a/tests/static/sx.h5 b/tests/static/sx.h5 deleted file mode 100644 index b9d76e4..0000000 Binary files a/tests/static/sx.h5 and /dev/null differ diff --git a/tests/test_pyiron_atomistics_static.py b/tests/test_pyiron_atomistics_static.py index 6eb1f48..8eb58dc 100644 --- a/tests/test_pyiron_atomistics_static.py +++ b/tests/test_pyiron_atomistics_static.py @@ -16,7 +16,7 @@ class TestPyironAtomisticsStatic(TestCase): def test_sphinx(self): ureg = UnitRegistry() job_dict = read_dict_from_hdf( - file_name=os.path.join(os.path.dirname(__file__), "static", "sx.h5"), + file_name=os.path.join(os.path.dirname(__file__), "pyiron_atomistics_0_6_13", "sx.h5"), h5_path="/sx", recursive=True, slash='ignore', @@ -27,7 +27,7 @@ def test_sphinx(self): def test_lammps(self): ureg = UnitRegistry() job_dict = read_dict_from_hdf( - file_name=os.path.join(os.path.dirname(__file__), "static", "lmp.h5"), + file_name=os.path.join(os.path.dirname(__file__), "pyiron_atomistics_0_6_13", "lmp.h5"), h5_path="/lmp", recursive=True, slash='ignore', @@ -38,7 +38,7 @@ def test_lammps(self): def test_vasp(self): ureg = UnitRegistry() job_dict = read_dict_from_hdf( - file_name=os.path.join(os.path.dirname(__file__), "static", "vasp.h5"), + file_name=os.path.join(os.path.dirname(__file__), "pyiron_atomistics_0_6_13", "vasp.h5"), h5_path="/vasp", recursive=True, slash='ignore', @@ -48,7 +48,7 @@ def test_vasp(self): def test_all(self): ureg = UnitRegistry() - static_folder = os.path.join(os.path.dirname(__file__), "static") + static_folder = os.path.join(os.path.dirname(__file__), "pyiron_atomistics_0_6_13") energy_dict = { "sx.h5": -228.7831594379917 * ureg.eV, "lmp.h5": -9428.45286561574 * ureg.eV,