From 9f996fcf0704e2d3b955093e3946f07e48a1ee5c Mon Sep 17 00:00:00 2001 From: iback Date: Mon, 1 Dec 2025 16:23:47 +0000 Subject: [PATCH 1/2] fixed minor bugs --- TPTBox/core/poi.py | 2 +- TPTBox/core/poi_fun/save_mkr.py | 2 +- TPTBox/registration/deepali/deepali_trainer.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/TPTBox/core/poi.py b/TPTBox/core/poi.py index ff97cb0..99158eb 100755 --- a/TPTBox/core/poi.py +++ b/TPTBox/core/poi.py @@ -575,7 +575,7 @@ def resample_from_to(self, ref: Has_Grid): return self.to_global().to_other(ref) def resample_from_to_(self, ref: Has_Grid): - return self._set_inplace(self.resample_from_to_(ref)) + return self._set_inplace(self.resample_from_to(ref)) def save( self, diff --git a/TPTBox/core/poi_fun/save_mkr.py b/TPTBox/core/poi_fun/save_mkr.py index d99357e..d8d2857 100644 --- a/TPTBox/core/poi_fun/save_mkr.py +++ b/TPTBox/core/poi_fun/save_mkr.py @@ -331,7 +331,7 @@ def _save_mrk( "@schema": "https://raw.githubusercontent.com/slicer/slicer/master/Modules/Loadable/Markups/Resources/Schema/markups-schema-v1.0.3.json#", "markups": markups, } - print(markups[-1].get("display")) + # print(markups[-1].get("display")) filepath.unlink(missing_ok=True) with open(filepath, "w") as f: json.dump(mrk_data, f, indent=2) diff --git a/TPTBox/registration/deepali/deepali_trainer.py b/TPTBox/registration/deepali/deepali_trainer.py index b9a1ef5..9d96b70 100644 --- a/TPTBox/registration/deepali/deepali_trainer.py +++ b/TPTBox/registration/deepali/deepali_trainer.py @@ -627,7 +627,7 @@ def _run_level( def on_split_losses(self): misc_excl = set() - self.loss_terms = {a: l.to(self.device) for a, l in self.loss_terms.items()} + # self.loss_terms = {a: l.to(self.device) for a, l in self.loss_terms.items()} from TPTBox.registration.ridged_intensity.affine_deepali import ( # noqa: PLC0415 PairwiseSegImageLoss, ) From ea5c24b7fbaedac6b08a22b1e90b5bc42ee79592 Mon Sep 17 00:00:00 2001 From: Robert Graf Date: Mon, 1 Dec 2025 16:33:50 +0000 Subject: [PATCH 2/2] fix py3.10 testing --- .github/workflows/tests_mr.yml | 2 +- pyproject.toml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests_mr.yml b/.github/workflows/tests_mr.yml index 9c0d43e..ea17b2f 100644 --- a/.github/workflows/tests_mr.yml +++ b/.github/workflows/tests_mr.yml @@ -14,7 +14,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - python-version: ["3.9","3.12"] + python-version: ["3.9","3.10","3.12"] steps: - uses: actions/checkout@v4 diff --git a/pyproject.toml b/pyproject.toml index d22ed2c..d9e86f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ readme = "README.md" packages = [{ include = "TPTBox" }] [tool.poetry.dependencies] -python = "^3.9 || ^3.10 || ^3.11 || ^3.12" +python = "^3.9 || ^3.10 || ^3.11 || ^3.12 || ^3.13 || ^3.14" pathlib = "*" nibabel = "^5.2.0" numpy = "^1.26.3" @@ -38,7 +38,7 @@ pre-commit = "*" pyvista = "^0.43.2" coverage = ">=7.0.1" pytest-mock = "^3.6.0" - +exceptiongroup = { version = "^1.2", python = "<3.11" } [build-system]