diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 61aa624..cae0eb5 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -23,7 +23,7 @@ jobs: pip install ".[dev]" - name: Test with pytest run: | - pytest --color=yes --cov={{cookiecutter.project_slug}} --cov-report=xml --cov-report=term-missing tests + pytest --color=yes --cov=cellmap_models --cov-report=xml --cov-report=term-missing tests # Coverage should work out of the box for public repos. For private repos, more setup is likely required. - name: Coverage uses: codecov/codecov-action@v4 diff --git a/src/cellmap_models/pytorch/cosem/load_model.py b/src/cellmap_models/pytorch/cosem/load_model.py index 24da416..0f7010b 100755 --- a/src/cellmap_models/pytorch/cosem/load_model.py +++ b/src/cellmap_models/pytorch/cosem/load_model.py @@ -46,14 +46,16 @@ def load_model(checkpoint_name: str) -> torch.nn.Module: ): if checkpoint_name in model_names: checkpoint_path = Path( - Path(__file__).parent / Path(checkpoint_name) / "model.py" + Path(__file__).parent + / Path(checkpoint_name.replace(".", "_")) + / "model.py" ) no_weights = True else: raise ValueError(f"Model {checkpoint_name} not found") else: checkpoint_path = Path( - Path(__file__).parent / Path(checkpoint_name) + Path(__file__).parent / Path(checkpoint_name.replace(".", "_")) ).with_suffix(".pth") if not checkpoint_path.exists(): url = models_dict[checkpoint_name] diff --git a/src/cellmap_models/pytorch/cosem/setup26.1/.DS_Store b/src/cellmap_models/pytorch/cosem/setup26.1/.DS_Store deleted file mode 100644 index 5008ddf..0000000 Binary files a/src/cellmap_models/pytorch/cosem/setup26.1/.DS_Store and /dev/null differ diff --git a/src/cellmap_models/pytorch/cosem/setup26.1/__init__.py b/src/cellmap_models/pytorch/cosem/setup26_1/__init__.py similarity index 100% rename from src/cellmap_models/pytorch/cosem/setup26.1/__init__.py rename to src/cellmap_models/pytorch/cosem/setup26_1/__init__.py diff --git a/src/cellmap_models/pytorch/cosem/setup26.1/model.py b/src/cellmap_models/pytorch/cosem/setup26_1/model.py similarity index 100% rename from src/cellmap_models/pytorch/cosem/setup26.1/model.py rename to src/cellmap_models/pytorch/cosem/setup26_1/model.py