From fc2d209adb096a17e96bb2cac64f72bd9501f804 Mon Sep 17 00:00:00 2001 From: dkazanc Date: Tue, 14 Apr 2026 15:17:20 +0100 Subject: [PATCH 1/2] updates to CI jobs --- .github/workflows/httomo_pypi_publish.yml | 6 +++--- .github/workflows/lint.yml | 5 +++++ .github/workflows/tests_httomo.yml | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/httomo_pypi_publish.yml b/.github/workflows/httomo_pypi_publish.yml index 1ac53d848..bf34944bc 100644 --- a/.github/workflows/httomo_pypi_publish.yml +++ b/.github/workflows/httomo_pypi_publish.yml @@ -16,11 +16,11 @@ jobs: permissions: id-token: write steps: - - uses: actions/checkout@v4 - - name: Set up Python + - uses: actions/checkout@v5 + - name: Set up Python 3.12 uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.12" - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 88cbb6e2f..863efffc1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,5 +14,10 @@ jobs: steps: - name: Checkout repository code uses: actions/checkout@v5 + + - name: Setup Python 3.12 + uses: actions/setup-python@v5 + with: + python-version: '3.12' - name: Run black uses: psf/black@stable diff --git a/.github/workflows/tests_httomo.yml b/.github/workflows/tests_httomo.yml index 29961352c..0b85bca73 100644 --- a/.github/workflows/tests_httomo.yml +++ b/.github/workflows/tests_httomo.yml @@ -17,7 +17,7 @@ jobs: shell: bash -l {0} steps: - name: Checkout repository code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Create conda environment uses: mamba-org/setup-micromamba@v2 From b3f54fbdbb1630fa1dfd59d148ac499b7ff82316 Mon Sep 17 00:00:00 2001 From: dkazanc Date: Tue, 14 Apr 2026 15:26:54 +0100 Subject: [PATCH 2/2] fixing linting --- httomo/transform_layer.py | 2 +- tests/test_transform_layer.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/httomo/transform_layer.py b/httomo/transform_layer.py index 956659a91..9ababd35a 100644 --- a/httomo/transform_layer.py +++ b/httomo/transform_layer.py @@ -57,7 +57,7 @@ def insert_save_methods(self, pipeline: Pipeline) -> Pipeline: methods.append(m) if ( (m.save_result or self._save_all) - and m.method_name not in ["save_to_images", "data_checker"] + and m.method_name not in ["save_to_images", "data_checker"] and "center" not in m.method_name ): methods.append( diff --git a/tests/test_transform_layer.py b/tests/test_transform_layer.py index afc812921..c459b522b 100644 --- a/tests/test_transform_layer.py +++ b/tests/test_transform_layer.py @@ -54,7 +54,9 @@ def test_insert_save_methods_save_all(mocker: MockerFixture, tmp_path: Path): assert pipeline[3].task_id == "save_t2" -@pytest.mark.parametrize("method_name", ["save_to_images", "find_center_vo", "data_checker"]) +@pytest.mark.parametrize( + "method_name", ["save_to_images", "find_center_vo", "data_checker"] +) def test_insert_save_methods_does_not_save_for_some_methods( mocker: MockerFixture, method_name: str, tmp_path: Path ):