Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
- pyyaml
# for testing
- coverage
- pooch
- pooch >=1.9.0 # min for https://github.com/fatiando/pooch/issues/502
- pytest
- pytest-cov
- pytest-xdist
Expand Down
28 changes: 18 additions & 10 deletions src/openfe_analysis/tests/conftest.py
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes here are from precommit

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pathlib
from importlib import resources

import pathlib
import pooch
import pytest

Expand All @@ -9,41 +9,49 @@
path=POOCH_CACHE,
base_url="doi:10.5281/zenodo.17916322",
registry={
"openfe_analysis_simulation_output.tar.gz":"md5:09752f2c4e5b7744d8afdee66dbd1414",
"openfe_analysis_skipped.tar.gz": "md5:3840d044299caacc4ccd50e6b22c0880",
"openfe_analysis_simulation_output.tar.gz": "md5:09752f2c4e5b7744d8afdee66dbd1414",
"openfe_analysis_skipped.tar.gz": "md5:3840d044299caacc4ccd50e6b22c0880",
},
)


@pytest.fixture(scope="session")
def rbfe_output_data_dir() -> pathlib.Path:
ZENODO_RBFE_DATA.fetch("openfe_analysis_simulation_output.tar.gz", processor=pooch.Untar())
result_dir = pathlib.Path(POOCH_CACHE) / "openfe_analysis_simulation_output.tar.gz.untar/openfe_analysis_simulation_output/"
result_dir = (
pathlib.Path(POOCH_CACHE)
/ "openfe_analysis_simulation_output.tar.gz.untar/openfe_analysis_simulation_output/"
)
return result_dir


@pytest.fixture(scope="session")
def rbfe_skipped_data_dir() -> pathlib.Path:
ZENODO_RBFE_DATA.fetch("openfe_analysis_skipped.tar.gz", processor=pooch.Untar())
result_dir = pathlib.Path(POOCH_CACHE) / "openfe_analysis_skipped.tar.gz.untar/openfe_analysis_skipped/"
result_dir = (
pathlib.Path(POOCH_CACHE) / "openfe_analysis_skipped.tar.gz.untar/openfe_analysis_skipped/"
)
return result_dir


@pytest.fixture(scope="session")
def simulation_nc(rbfe_output_data_dir) -> pathlib.Path:
return rbfe_output_data_dir/"simulation.nc"
return rbfe_output_data_dir / "simulation.nc"


@pytest.fixture(scope="session")
def simulation_skipped_nc(rbfe_skipped_data_dir) -> pathlib.Path:
return rbfe_skipped_data_dir/"simulation.nc"
return rbfe_skipped_data_dir / "simulation.nc"


@pytest.fixture(scope="session")
def hybrid_system_pdb(rbfe_output_data_dir) -> pathlib.Path:
return rbfe_output_data_dir/"hybrid_system.pdb"
return rbfe_output_data_dir / "hybrid_system.pdb"


@pytest.fixture(scope="session")
def hybrid_system_skipped_pdb(rbfe_skipped_data_dir)->pathlib.Path:
return rbfe_skipped_data_dir/"hybrid_system.pdb"
def hybrid_system_skipped_pdb(rbfe_skipped_data_dir) -> pathlib.Path:
return rbfe_skipped_data_dir / "hybrid_system.pdb"


@pytest.fixture(scope="session")
Expand Down
Loading