diff --git a/pyproject.toml b/pyproject.toml index 6ffc4ab8cb67620ced2805f3fd195061c07017ac..37c132aaa01b351b78aaa200ad181e908b5ff6b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -165,7 +165,10 @@ uv = "*" uv-update-lock = "uv pip compile -q pyproject.toml --python-platform=linux -o uv.lock" [tool.pixi.feature.cuda] -channels = [{ channel = "nvidia", priority = 1}, { channel = "pytorch", priority = -1 }] +channels = [ + { channel = "nvidia", priority = 1 }, + { channel = "pytorch", priority = -1 }, +] platforms = ["linux-64", "osx-arm64"] [tool.pixi.feature.cuda.system-requirements] @@ -483,3 +486,4 @@ override_SS05 = [ # override SS05 to allow docstrings starting with these words addopts = ["--cov=mednet", "--cov-report=term-missing", "--import-mode=append"] junit_logging = "all" junit_log_passing_tests = false +markers = ["slow: marks tests as slow (deselect with '-m \"not slow\"')"] diff --git a/tests/test_cli.py b/tests/test_cli.py index d98ef50f9e1712e07cb6cd7af3213133430ae73d..e79d500d99cad1a2a6575f627681b901b362a037 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -201,6 +201,7 @@ def test_upload_help(): _check_help(upload) +@pytest.mark.slow @pytest.mark.skip_if_rc_var_not_set("datadir.montgomery") def test_train_pasa_montgomery(temporary_basedir): from mednet.scripts.train import train @@ -256,6 +257,7 @@ def test_train_pasa_montgomery(temporary_basedir): ) +@pytest.mark.slow @pytest.mark.skip_if_rc_var_not_set("datadir.montgomery") def test_train_pasa_montgomery_from_checkpoint(temporary_basedir): from mednet.scripts.train import train @@ -333,6 +335,7 @@ def test_train_pasa_montgomery_from_checkpoint(temporary_basedir): ) +@pytest.mark.slow @pytest.mark.skip_if_rc_var_not_set("datadir.montgomery") def test_predict_pasa_montgomery(temporary_basedir): from mednet.scripts.predict import predict @@ -386,6 +389,7 @@ def test_predict_pasa_montgomery(temporary_basedir): ) +@pytest.mark.slow @pytest.mark.skip_if_rc_var_not_set("datadir.montgomery") def test_evaluate_pasa_montgomery(temporary_basedir): from mednet.scripts.evaluate import evaluate @@ -432,6 +436,7 @@ def test_evaluate_pasa_montgomery(temporary_basedir): ) +@pytest.mark.slow @pytest.mark.skip_if_rc_var_not_set("datadir.montgomery") def test_experiment(temporary_basedir): from mednet.scripts.experiment import experiment diff --git a/tests/test_montgomery.py b/tests/test_montgomery.py index 3db2bad6008c1b179f63b5ace4c68e8103304026..fddeaefaf75265d7ba31048b72704f04f28dd19e 100644 --- a/tests/test_montgomery.py +++ b/tests/test_montgomery.py @@ -110,6 +110,7 @@ def test_loading(database_checkers, name: str, dataset: str): limit -= 1 +@pytest.mark.slow @pytest.mark.skip_if_rc_var_not_set("datadir.montgomery") def test_raw_transforms_image_quality(database_checkers, datadir: pathlib.Path): datamodule = importlib.import_module( diff --git a/tests/test_montgomery_shenzhen.py b/tests/test_montgomery_shenzhen.py index 58bc9806be67bffb70c1a6cd78f18e7f39a11f7d..58f3313c9121a2c796d2641d05b870fdf0567d5a 100644 --- a/tests/test_montgomery_shenzhen.py +++ b/tests/test_montgomery_shenzhen.py @@ -61,6 +61,7 @@ def test_split_consistency(name: str): assert isinstance(combined.splits[split][1][1], shenzhen_loader) +@pytest.mark.slow @pytest.mark.skip_if_rc_var_not_set("datadir.montgomery") @pytest.mark.skip_if_rc_var_not_set("datadir.shenzhen") def test_database_check(): diff --git a/tests/test_montgomery_shenzhen_indian.py b/tests/test_montgomery_shenzhen_indian.py index 470ee2cfaded3164a29ee828130f5d79829f6b91..47de3afd567ce93320d8c107493978e73babc5ac 100644 --- a/tests/test_montgomery_shenzhen_indian.py +++ b/tests/test_montgomery_shenzhen_indian.py @@ -75,6 +75,7 @@ def test_split_consistency(name: str): assert isinstance(combined.splits[split][2][1], indian_loader) +@pytest.mark.slow @pytest.mark.skip_if_rc_var_not_set("datadir.montgomery") @pytest.mark.skip_if_rc_var_not_set("datadir.indian") @pytest.mark.skip_if_rc_var_not_set("datadir.shenzhen") diff --git a/tests/test_montgomery_shenzhen_indian_padchest.py b/tests/test_montgomery_shenzhen_indian_padchest.py index d56798a794b9d82fcdac5d14563a43f616e288cd..e44b5b6082e1fbf05ee66b577a57388017b82a3b 100644 --- a/tests/test_montgomery_shenzhen_indian_padchest.py +++ b/tests/test_montgomery_shenzhen_indian_padchest.py @@ -81,6 +81,7 @@ def test_split_consistency(name: str, padchest_name: str): assert isinstance(combined.splits[split][3][1], padchest_loader) +@pytest.mark.slow @pytest.mark.skip_if_rc_var_not_set("datadir.montgomery") @pytest.mark.skip_if_rc_var_not_set("datadir.shenzhen") @pytest.mark.skip_if_rc_var_not_set("datadir.indian") diff --git a/tests/test_montgomery_shenzhen_indian_tbx11k.py b/tests/test_montgomery_shenzhen_indian_tbx11k.py index 0a4a3bffc15ca8c7fee5dd8a93b1c53c0f3dcfd0..75464104c1f789358144e2ddcff3553b3c9a14fe 100644 --- a/tests/test_montgomery_shenzhen_indian_tbx11k.py +++ b/tests/test_montgomery_shenzhen_indian_tbx11k.py @@ -100,6 +100,7 @@ def test_split_consistency(name: str, tbx11k_name: str): assert isinstance(combined.splits[split][3][1], tbx11k_loader) +@pytest.mark.slow @pytest.mark.skip_if_rc_var_not_set("datadir.montgomery") @pytest.mark.skip_if_rc_var_not_set("datadir.shenzhen") @pytest.mark.skip_if_rc_var_not_set("datadir.indian")