Skip to content

Commit a47ebfb

Browse files
authored
add tag to zinchub.DataHub (#512)
* add `tag` to `zinchub.DataHub` * add `tag` to `zinchub.DataHub` * uncomment tests - kirkwood buff integrals - POMF
1 parent b123135 commit a47ebfb

26 files changed

+168
-88
lines changed

CI/functional_tests/test_molten_salts.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,15 @@ def traj_files(tmp_path_factory) -> Tuple[str, str]:
3838
"""Download trajectory file into a temporary directory and keep it for all tests"""
3939
temporary_path = tmp_path_factory.getbasetemp()
4040

41-
NaCl_file = DataHub(url="https://github.com/zincware/DataHub/tree/main/NaCl_rnd_md")
41+
NaCl_file = DataHub(
42+
url="https://github.com/zincware/DataHub/tree/main/NaCl_rnd_md", tag="v0.1.0"
43+
)
4244
NaCl_file.get_file(temporary_path)
4345
NaCl_out = (temporary_path / NaCl_file.file_raw).as_posix()
4446

45-
KCl_file = DataHub(url="https://github.com/zincware/DataHub/tree/main/KCl_rnd_md")
47+
KCl_file = DataHub(
48+
url="https://github.com/zincware/DataHub/tree/main/KCl_rnd_md", tag="v0.1.0"
49+
)
4650
KCl_file.get_file(temporary_path)
4751
KCl_out = (temporary_path / KCl_file.get_file(temporary_path)).as_posix()
4852

CI/functional_tests/test_water_study.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ def traj_files(tmp_path_factory) -> List[str]:
4040
"""Download trajectory file into a temporary directory and keep it for all tests"""
4141
temporary_path = tmp_path_factory.getbasetemp()
4242

43-
water = DataHub(url="https://github.com/zincware/DataHub/tree/main/Water_14_Gromacs")
43+
water = DataHub(
44+
url="https://github.com/zincware/DataHub/tree/main/Water_14_Gromacs", tag="v0.1.0"
45+
)
4446
water.get_file(temporary_path)
4547
file_paths = [(temporary_path / f).as_posix() for f in water.file_raw]
4648
return file_paths

CI/integration_tests/calculators/__test_structure_factor.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ def traj_file(tmp_path_factory) -> str:
4040
"""Download trajectory file into a temporary directory and keep it for all tests"""
4141
temporary_path = tmp_path_factory.getbasetemp()
4242

43-
NaCl = DataHub(url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q")
43+
NaCl = DataHub(
44+
url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q", tag="v0.1.0"
45+
)
4446
NaCl.get_file(path=temporary_path)
4547

4648
return (temporary_path / NaCl.file_raw).as_posix()
@@ -49,7 +51,9 @@ def traj_file(tmp_path_factory) -> str:
4951
@pytest.fixture(scope="session")
5052
def true_values() -> dict:
5153
"""Example fixture for downloading analysis results from github"""
52-
NaCl = DataHub(url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q")
54+
NaCl = DataHub(
55+
url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q", tag="v0.1.0"
56+
)
5357
return NaCl.get_analysis(analysis="StructureFactor.json")
5458

5559

CI/integration_tests/calculators/_test_coordination_numbers.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ def traj_file(tmp_path_factory) -> str:
3838
"""Download trajectory file into a temporary directory and keep it for all tests"""
3939
temporary_path = tmp_path_factory.getbasetemp()
4040

41-
NaCl = DataHub(url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q")
41+
NaCl = DataHub(
42+
url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q", tag="v0.1.0"
43+
)
4244
NaCl.get_file(path=temporary_path)
4345

4446
return (temporary_path / NaCl.file_raw).as_posix()
@@ -47,7 +49,9 @@ def traj_file(tmp_path_factory) -> str:
4749
@pytest.fixture(scope="session")
4850
def true_values() -> dict:
4951
"""Example fixture for downloading analysis results from github"""
50-
NaCl = DataHub(url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q")
52+
NaCl = DataHub(
53+
url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q", tag="v0.1.0"
54+
)
5155
return NaCl.get_analysis(analysis="CoordinationNumbers.json")
5256

5357

CI/integration_tests/calculators/_test_einstein_helfand_thermal_kinaci.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ def traj_file(tmp_path_factory) -> str:
4141
"""Download trajectory file into a temporary directory and keep it for all tests"""
4242
temporary_path = tmp_path_factory.getbasetemp()
4343

44-
NaCl = DataHub(url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q")
44+
NaCl = DataHub(
45+
url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q", tag="v0.1.0"
46+
)
4547
NaCl.get_file(path=temporary_path)
4648

4749
return (temporary_path / NaCl.file_raw).as_posix()
@@ -50,7 +52,9 @@ def traj_file(tmp_path_factory) -> str:
5052
@pytest.fixture(scope="session")
5153
def true_values() -> dict:
5254
"""Example fixture for downloading analysis results from github"""
53-
NaCl = DataHub(url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q")
55+
NaCl = DataHub(
56+
url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q", tag="v0.1.0"
57+
)
5458
return NaCl.get_analysis(analysis="EinsteinHelfandThermanKinaci.json")
5559

5660

CI/integration_tests/calculators/_test_green_kubo_thermal_conductivity.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ def traj_file(tmp_path_factory) -> str:
4040
"""Download trajectory file into a temporary directory and keep it for all tests"""
4141
temporary_path = tmp_path_factory.getbasetemp()
4242

43-
NaCl = DataHub(url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q")
43+
NaCl = DataHub(
44+
url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q", tag="v0.1.0"
45+
)
4446
NaCl.get_file(path=temporary_path)
4547

4648
return (temporary_path / NaCl.file_raw).as_posix()
@@ -49,7 +51,9 @@ def traj_file(tmp_path_factory) -> str:
4951
@pytest.fixture(scope="session")
5052
def true_values() -> dict:
5153
"""Example fixture for downloading analysis results from github"""
52-
NaCl = DataHub(url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q")
54+
NaCl = DataHub(
55+
url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q", tag="v0.1.0"
56+
)
5357
return NaCl.get_analysis(analysis="GreenKuboThermalConductivity.json")
5458

5559

CI/integration_tests/calculators/_test_green_kubo_viscosity.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ def traj_file(tmp_path_factory) -> str:
4040
"""Download trajectory file into a temporary directory and keep it for all tests"""
4141
temporary_path = tmp_path_factory.getbasetemp()
4242

43-
NaCl = DataHub(url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q")
43+
NaCl = DataHub(
44+
url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q", tag="v0.1.0"
45+
)
4446
NaCl.get_file(path=temporary_path)
4547

4648
return (temporary_path / NaCl.file_raw).as_posix()
@@ -49,7 +51,9 @@ def traj_file(tmp_path_factory) -> str:
4951
@pytest.fixture(scope="session")
5052
def true_values() -> dict:
5153
"""Example fixture for downloading analysis results from github"""
52-
NaCl = DataHub(url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q")
54+
NaCl = DataHub(
55+
url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q", tag="v0.1.0"
56+
)
5357
return NaCl.get_analysis(analysis="GreenKuboViscosity.json")
5458

5559

CI/integration_tests/calculators/_test_green_kubo_viscosity_flux.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ def traj_file(tmp_path_factory) -> str:
4141
"""Download trajectory file into a temporary directory and keep it for all tests"""
4242
temporary_path = tmp_path_factory.getbasetemp()
4343

44-
NaCl = DataHub(url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q")
44+
NaCl = DataHub(
45+
url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q", tag="v0.1.0"
46+
)
4547
NaCl.get_file(path=temporary_path)
4648

4749
return (temporary_path / NaCl.file_raw).as_posix()
@@ -50,7 +52,9 @@ def traj_file(tmp_path_factory) -> str:
5052
@pytest.fixture(scope="session")
5153
def true_values() -> dict:
5254
"""Example fixture for downloading analysis results from github"""
53-
NaCl = DataHub(url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q")
55+
NaCl = DataHub(
56+
url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q", tag="v0.1.0"
57+
)
5458
return NaCl.get_analysis(analysis="GreenKuboViscosityFlux.json")
5559

5660

CI/integration_tests/calculators/_test_nernst_einstein_ionic_conductivity.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ def traj_file(tmp_path_factory) -> str:
4040
"""Download trajectory file into a temporary directory and keep it for all tests"""
4141
temporary_path = tmp_path_factory.getbasetemp()
4242

43-
NaCl = DataHub(url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q")
43+
NaCl = DataHub(
44+
url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q", tag="v0.1.0"
45+
)
4446
NaCl.get_file(path=temporary_path)
4547

4648
return (temporary_path / NaCl.file_raw).as_posix()
@@ -49,7 +51,9 @@ def traj_file(tmp_path_factory) -> str:
4951
@pytest.fixture(scope="session")
5052
def true_values() -> dict:
5153
"""Example fixture for downloading analysis results from github"""
52-
NaCl = DataHub(url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q")
54+
NaCl = DataHub(
55+
url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q", tag="v0.1.0"
56+
)
5357
return NaCl.get_analysis(analysis="NernstEinsteinIonicConductivity.json")
5458

5559

CI/integration_tests/calculators/test_angular_distribution_function.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ def traj_file(tmp_path_factory) -> str:
3838
"""Download trajectory file into a temporary directory and keep it for all tests"""
3939
temporary_path = tmp_path_factory.getbasetemp()
4040

41-
NaCl = DataHub(url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q")
41+
NaCl = DataHub(
42+
url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q", tag="v0.1.0"
43+
)
4244
NaCl.get_file(path=temporary_path)
4345

4446
return (temporary_path / NaCl.file_raw).as_posix()
@@ -47,7 +49,9 @@ def traj_file(tmp_path_factory) -> str:
4749
@pytest.fixture(scope="session")
4850
def true_values() -> dict:
4951
"""Example fixture for downloading analysis results from github"""
50-
NaCl = DataHub(url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q")
52+
NaCl = DataHub(
53+
url="https://github.com/zincware/DataHub/tree/main/NaCl_gk_i_q", tag="v0.1.0"
54+
)
5155
return NaCl.get_analysis(analysis="AngularDistributionFunction.json")
5256

5357

0 commit comments

Comments
 (0)