From f342aef9517339f41b96d9e64d9a627747e49bd6 Mon Sep 17 00:00:00 2001 From: Justus Kuhlmann Date: Tue, 2 Dec 2025 10:36:11 +0100 Subject: [PATCH 1/4] add ruff workflow --- .github/workflows/ruff.yaml | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/ruff.yaml diff --git a/.github/workflows/ruff.yaml b/.github/workflows/ruff.yaml new file mode 100644 index 0000000..2a93902 --- /dev/null +++ b/.github/workflows/ruff.yaml @@ -0,0 +1,39 @@ +name: Pytest + +on: + push: + pull_request: + workflow_dispatch: + schedule: + - cron: '0 4 1 * *' + +jobs: + pytest: + strategy: + matrix: + python-version: + - "3.12" + - "3.13" + - "3.14" + + runs-on: ubuntu-latest + env: + UV_CACHE_DIR: /tmp/.uv-cache + steps: + - name: Install git-annex + run: | + sudo apt-get update + sudo apt-get install -y git-annex + - name: Check out the repository + uses: https://github.com/RouxAntoine/checkout@v4.1.8 + with: + show-progress: true + - name: Install uv + uses: astral-sh/setup-uv@v7 + with: + python-version: ${{ matrix.python-version }} + enable-cache: true + - name: Install corrlib + run: uv sync --locked --all-extras --dev --python ${{ matrix.python-version }} + - name: Run tests + run: uv run ruff check corrlib From e2a3e7c7277a3fef36e6270cd9c4756dd6e3639c Mon Sep 17 00:00:00 2001 From: Justus Kuhlmann Date: Tue, 2 Dec 2025 10:38:07 +0100 Subject: [PATCH 2/4] no matrix --- .github/workflows/ruff.yaml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ruff.yaml b/.github/workflows/ruff.yaml index 2a93902..e99ec08 100644 --- a/.github/workflows/ruff.yaml +++ b/.github/workflows/ruff.yaml @@ -1,20 +1,12 @@ -name: Pytest +name: Ruff on: push: pull_request: workflow_dispatch: - schedule: - - cron: '0 4 1 * *' jobs: - pytest: - strategy: - matrix: - python-version: - - "3.12" - - "3.13" - - "3.14" + ruff: runs-on: ubuntu-latest env: @@ -31,7 +23,6 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v7 with: - python-version: ${{ matrix.python-version }} enable-cache: true - name: Install corrlib run: uv sync --locked --all-extras --dev --python ${{ matrix.python-version }} From 4447b2ebe6ba2f17a36a9cff378e312e68293d47 Mon Sep 17 00:00:00 2001 From: Justus Kuhlmann Date: Tue, 2 Dec 2025 10:42:43 +0100 Subject: [PATCH 3/4] set python version to 3.12 --- .github/workflows/ruff.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ruff.yaml b/.github/workflows/ruff.yaml index e99ec08..4de4b0b 100644 --- a/.github/workflows/ruff.yaml +++ b/.github/workflows/ruff.yaml @@ -25,6 +25,6 @@ jobs: with: enable-cache: true - name: Install corrlib - run: uv sync --locked --all-extras --dev --python ${{ matrix.python-version }} + run: uv sync --locked --all-extras --dev --python "3.12" - name: Run tests run: uv run ruff check corrlib From ecfab2a89793953677790c268b86dd3111db50c1 Mon Sep 17 00:00:00 2001 From: Justus Kuhlmann Date: Tue, 2 Dec 2025 10:50:42 +0100 Subject: [PATCH 4/4] correct sfcf ruff errors --- corrlib/input/sfcf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/corrlib/input/sfcf.py b/corrlib/input/sfcf.py index c8a5d46..79532e9 100644 --- a/corrlib/input/sfcf.py +++ b/corrlib/input/sfcf.py @@ -194,7 +194,7 @@ def _map_params(params: dict, spec_list: list) -> dict[str, Any]: The parameters extracted from the parameter (input) file. in the dict form given by read_param. spec_list: list The list of specifications that belongs to the dorrelator in question. - + Return ------ new_specs: dict