From 11639a41ac198036e209af916b897de2763d0b23 Mon Sep 17 00:00:00 2001 From: Gareth S Cabourn Davies Date: Fri, 23 Jan 2026 09:23:55 +0000 Subject: [PATCH 01/18] Add unused variable check to flake8, use vulture for unreachable code --- .github/workflows/check_code.yml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/check_code.yml b/.github/workflows/check_code.yml index d0e8b2ffb9b..ed4282ee8ae 100644 --- a/.github/workflows/check_code.yml +++ b/.github/workflows/check_code.yml @@ -1,7 +1,7 @@ -name: Flake8 check +name: Code quality checks on: [pull_request] jobs: - flake8_unused_imports: + linters: runs-on: ubuntu-latest steps: - name: Check out repository @@ -10,14 +10,13 @@ jobs: uses: actions/setup-python@v4 with: python-version: 3.11 - - name: Install flake8 - run: pip install flake8 - - name: Checking executables for unused imports - run: flake8 --select=F401 $(find bin -type f -name pycbc_*) - - name: Checking modules for unused imports - run: | - flake8 --select=F401 $(find pycbc | grep '\.py$' | grep -v -e __init__ -e 'version.py') - - name: Checking tests for unused imports - run: | - flake8 --select=F401 $(find test | grep '\.py$' | grep -v test_schemes) - + - name: Install linters + run: pip install flake8 vulture + - name: Checking executables for unused imports and variables + run: find bin -type f -name "pycbc_*" | xargs flake8 --select=F401,F841 + - name: Checking modules for unused imports and variables + run: flake8 pycbc --select=F401,F841 --exclude="__init__.py,version.py" + - name: Checking tests for unused imports and variables + run: flake8 test --select=F401,F841 --exclude="*test_schemes*" + - name: Checking for unused code + run: vulture pycbc --min-confidence 100 From c40595a4d72abe1b1bbe8189227fdb9d2cda43d8 Mon Sep 17 00:00:00 2001 From: Gareth S Cabourn Davies Date: Fri, 23 Jan 2026 12:30:30 +0000 Subject: [PATCH 02/18] Make changes to workflo files, add workflow defaults so that there is a single source of truth, and do some syntax cleanup --- .github/workflows/bank-compress-workflow.yml | 5 +- .github/workflows/check_code.yml | 42 +++++---- .github/workflows/distribution.yml | 53 ++++++------ .github/workflows/inference-workflow.yml | 5 +- .github/workflows/mac-test.yml | 64 +++++++------- .github/workflows/search-workflow.yml | 5 +- .github/workflows/tmpltbank-workflow.yml | 91 ++++++++++---------- .github/workflows/workflow-defaults.yml | 40 +++++++++ .github/workflows/workflow-tests.yml | 4 +- pycbc/__init__.py | 2 +- 10 files changed, 186 insertions(+), 125 deletions(-) create mode 100644 .github/workflows/workflow-defaults.yml diff --git a/.github/workflows/bank-compress-workflow.yml b/.github/workflows/bank-compress-workflow.yml index d97b22ed798..3727dc21e84 100644 --- a/.github/workflows/bank-compress-workflow.yml +++ b/.github/workflows/bank-compress-workflow.yml @@ -7,7 +7,10 @@ concurrency: cancel-in-progress: true jobs: + workflow_defaults: + uses: ./.github/workflows/workflow-defaults.yml build: + needs: workflow_defaults runs-on: ubuntu-24.04 timeout-minutes: 90 steps: @@ -15,7 +18,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ needs.workflow_defaults.outputs.python-version }} - name: install condor run: | wget -qO - https://research.cs.wisc.edu/htcondor/ubuntu/HTCondor-Release.gpg.key | sudo apt-key add - diff --git a/.github/workflows/check_code.yml b/.github/workflows/check_code.yml index ed4282ee8ae..097363f9b0f 100644 --- a/.github/workflows/check_code.yml +++ b/.github/workflows/check_code.yml @@ -1,22 +1,26 @@ name: Code quality checks on: [pull_request] jobs: - linters: - runs-on: ubuntu-latest - steps: - - name: Check out repository - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: 3.11 - - name: Install linters - run: pip install flake8 vulture - - name: Checking executables for unused imports and variables - run: find bin -type f -name "pycbc_*" | xargs flake8 --select=F401,F841 - - name: Checking modules for unused imports and variables - run: flake8 pycbc --select=F401,F841 --exclude="__init__.py,version.py" - - name: Checking tests for unused imports and variables - run: flake8 test --select=F401,F841 --exclude="*test_schemes*" - - name: Checking for unused code - run: vulture pycbc --min-confidence 100 + workflow_defaults: + uses: ./.github/workflows/workflow-defaults.yml + + linters: + needs: workflow_defaults + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ${{ needs.workflow_defaults.outputs.python-version }} + - name: Install linters + run: pip install flake8 vulture + - name: Checking executables for unused imports and variables + run: find bin -type f -name "pycbc_*" | xargs flake8 --select=F401,F841 + - name: Checking modules for unused imports and variables + run: flake8 pycbc --select=F401,F841 --exclude="__init__.py,version.py" + - name: Checking tests for unused imports and variables + run: flake8 test --select=F401,F841 --exclude="*test_schemes*" + - name: Checking for unused code + run: vulture pycbc --min-confidence 100 diff --git a/.github/workflows/distribution.yml b/.github/workflows/distribution.yml index eacb2ccb071..50c5c52739a 100644 --- a/.github/workflows/distribution.yml +++ b/.github/workflows/distribution.yml @@ -7,8 +7,11 @@ concurrency: cancel-in-progress: true jobs: + workflow_defaults: + uses: ./.github/workflows/workflow-defaults.yml build_wheels: name: Build wheels on ${{ matrix.os }} + needs: workflow_defaults runs-on: ${{ matrix.os }} strategy: matrix: @@ -20,7 +23,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ needs.workflow_defaults.outputs.python-version }} - name: Install cibuildwheel run: python -m pip install cibuildwheel - name: Build wheels @@ -37,28 +40,28 @@ jobs: deploy_pypi: name: Package and publish to PyPI runs-on: ubuntu-24.04 - needs: build_wheels + needs: [build_wheels, workflow_defaults] steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - uses: actions/download-artifact@v4.1.7 - with: - pattern: wheel-* - merge-multiple: true - path: dist/ - - name: Build source distribution - run: | - python -c 'import setuptools ; print("setuptools version", setuptools.__version__)' - pip install pip setuptools --upgrade - python setup.py sdist - ls -lh dist - - name: Publish to PyPI - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4 - with: - password: ${{ secrets.pypi_password }} + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ needs.workflow_defaults.outputs.python-version }} + - uses: actions/download-artifact@v4.1.7 + with: + pattern: wheel-* + merge-multiple: true + path: dist/ + - name: Build source distribution + run: | + python -c 'import setuptools ; print("setuptools version", setuptools.__version__)' + pip install pip setuptools --upgrade + python setup.py sdist + ls -lh dist + - name: Publish to PyPI + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4 + with: + password: ${{ secrets.pypi_password }} diff --git a/.github/workflows/inference-workflow.yml b/.github/workflows/inference-workflow.yml index 0db7289855f..5bc7955deeb 100644 --- a/.github/workflows/inference-workflow.yml +++ b/.github/workflows/inference-workflow.yml @@ -3,14 +3,17 @@ name: run small inference workflow using pegasus + condor on: [push, pull_request] jobs: + workflow_defaults: + uses: ./.github/workflows/workflow-defaults.yml build: + needs: workflow_defaults runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v1 - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ needs.workflow_defaults.outputs.python-version }} - name: install condor run: | wget -qO - https://research.cs.wisc.edu/htcondor/ubuntu/HTCondor-Release.gpg.key | sudo apt-key add - diff --git a/.github/workflows/mac-test.yml b/.github/workflows/mac-test.yml index cbe7b6c0c8d..22b5028cdfc 100644 --- a/.github/workflows/mac-test.yml +++ b/.github/workflows/mac-test.yml @@ -24,35 +24,35 @@ jobs: shell: bash -el {0} steps: - - uses: actions/checkout@v1 - - - name: Cache conda packages - uses: actions/cache@v4 - env: - # increment to reset cache - CACHE_NUMBER: 0 - with: - path: ~/conda_pkgs_dir - key: ${{ runner.os }}-conda-${{ matrix.python-version}}-${{ env.CACHE_NUMBER }} - - - name: Configure conda - uses: conda-incubator/setup-miniconda@v3 - with: - activate-environment: test - channels: conda-forge - miniforge-version: latest - python-version: ${{ matrix.python-version }} - - - name: Conda info - run: conda info --all - - - name: Install tox - run: | - conda install \ - pip \ - setuptools \ - tox - - - name: Run basic pycbc test suite - run: | - tox -e py-unittest + - uses: actions/checkout@v1 + + - name: Cache conda packages + uses: actions/cache@v4 + env: + # increment to reset cache + CACHE_NUMBER: 0 + with: + path: ~/conda_pkgs_dir + key: ${{ runner.os }}-conda-${{ matrix.python-version}}-${{ env.CACHE_NUMBER }} + + - name: Configure conda + uses: conda-incubator/setup-miniconda@v3 + with: + activate-environment: test + channels: conda-forge + miniforge-version: latest + python-version: ${{ matrix.python-version }} + + - name: Conda info + run: conda info --all + + - name: Install tox + run: | + conda install \ + pip \ + setuptools \ + tox + + - name: Run basic pycbc test suite + run: | + tox -e py-unittest diff --git a/.github/workflows/search-workflow.yml b/.github/workflows/search-workflow.yml index f3771636c28..51d4cb49bcf 100644 --- a/.github/workflows/search-workflow.yml +++ b/.github/workflows/search-workflow.yml @@ -7,7 +7,10 @@ concurrency: cancel-in-progress: true jobs: + workflow_defaults: + uses: ./.github/workflows/workflow-defaults.yml build: + needs: workflow_defaults runs-on: ubuntu-24.04 timeout-minutes: 90 env: @@ -17,7 +20,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ needs.workflow_defaults.outputs.python-version }} - name: install condor run: | wget -qO - https://research.cs.wisc.edu/htcondor/ubuntu/HTCondor-Release.gpg.key | sudo apt-key add - diff --git a/.github/workflows/tmpltbank-workflow.yml b/.github/workflows/tmpltbank-workflow.yml index 87b10f561d4..95a1631c229 100644 --- a/.github/workflows/tmpltbank-workflow.yml +++ b/.github/workflows/tmpltbank-workflow.yml @@ -7,51 +7,54 @@ concurrency: cancel-in-progress: true jobs: + workflow_defaults: + uses: ./.github/workflows/workflow-defaults.yml build: + needs: workflow_defaults runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - name: install condor - run: | - wget -qO - https://research.cs.wisc.edu/htcondor/ubuntu/HTCondor-Release.gpg.key | sudo apt-key add - - echo "deb http://research.cs.wisc.edu/htcondor/ubuntu/8.9/focal focal contrib" | sudo tee -a /etc/apt/sources.list - echo "deb-src http://research.cs.wisc.edu/htcondor/ubuntu/8.9/focal focal contrib" | sudo tee -a /etc/apt/sources.list - sudo apt-get -o Acquire::Retries=3 update - sudo apt-get -o Acquire::Retries=3 install minihtcondor - sudo systemctl start condor - sudo systemctl enable condor - - name: install pegasus - run: | - wget -qO - https://download.pegasus.isi.edu/pegasus/gpg.txt | sudo apt-key add - - echo "deb https://download.pegasus.isi.edu/pegasus/ubuntu noble main" | sudo tee -a /etc/apt/sources.list - sudo apt-get -o Acquire::Retries=3 update - sudo apt-get -o Acquire::Retries=3 install pegasus=5.1.1-1+ubuntu24 - - run: sudo apt-get -o Acquire::Retries=3 install *fftw3* intel-mkl* - - name: Install pycbc - run: | - python -m pip install --upgrade pip setuptools - pip install GitPython # This shouldn't really be needed! - pip install -r requirements.txt - pip install sbank - pip install . - - name: generating, submitting and running workflow - env: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ needs.workflow_defaults.outputs.python-version }} + - name: install condor + run: | + wget -qO - https://research.cs.wisc.edu/htcondor/ubuntu/HTCondor-Release.gpg.key | sudo apt-key add - + echo "deb http://research.cs.wisc.edu/htcondor/ubuntu/8.9/focal focal contrib" | sudo tee -a /etc/apt/sources.list + echo "deb-src http://research.cs.wisc.edu/htcondor/ubuntu/8.9/focal focal contrib" | sudo tee -a /etc/apt/sources.list + sudo apt-get -o Acquire::Retries=3 update + sudo apt-get -o Acquire::Retries=3 install minihtcondor + sudo systemctl start condor + sudo systemctl enable condor + - name: install pegasus + run: | + wget -qO - https://download.pegasus.isi.edu/pegasus/gpg.txt | sudo apt-key add - + echo "deb https://download.pegasus.isi.edu/pegasus/ubuntu noble main" | sudo tee -a /etc/apt/sources.list + sudo apt-get -o Acquire::Retries=3 update + sudo apt-get -o Acquire::Retries=3 install pegasus=5.1.1-1+ubuntu24 + - run: sudo apt-get -o Acquire::Retries=3 install *fftw3* intel-mkl* + - name: Install pycbc + run: | + python -m pip install --upgrade pip setuptools + pip install GitPython # This shouldn't really be needed! + pip install -r requirements.txt + pip install sbank + pip install . + - name: generating, submitting and running workflow + env: _CONDOR_DAGMAN_USE_STRICT: "0" - run: | - cp examples/tmpltbank/bank_workflow_test/*.ini ./ - bash -e examples/tmpltbank/bank_workflow_test/gen.sh - condor_status - cd output - ./status - python ../examples/search/check_job.py - find submitdir/work/ -type f -name '*.tar.gz' -delete - - name: store log files - if: always() - uses: actions/upload-artifact@v4 - with: - name: logs - path: output/submitdir/work + run: | + cp examples/tmpltbank/bank_workflow_test/*.ini ./ + bash -e examples/tmpltbank/bank_workflow_test/gen.sh + condor_status + cd output + ./status + python ../examples/search/check_job.py + find submitdir/work/ -type f -name '*.tar.gz' -delete + - name: store log files + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs + path: output/submitdir/work diff --git a/.github/workflows/workflow-defaults.yml b/.github/workflows/workflow-defaults.yml new file mode 100644 index 00000000000..c374ab55291 --- /dev/null +++ b/.github/workflows/workflow-defaults.yml @@ -0,0 +1,40 @@ +# Provide default values used across workflows. +# Add new defaults (inputs) here and expose them as outputs so other +# workflows can consume them via `needs..outputs.`. +on: + workflow_call: + inputs: + python-version: + description: 'Default Python version for workflows' + required: false + default: '3.11' + runner: + description: 'Default runner for jobs' + required: false + default: 'ubuntu-latest' + cache-deps: + description: 'Enable dependency caching ("true"/"false")' + required: false + default: 'true' + outputs: + python-version: + description: 'Python version string to use in workflows' + runner: + description: 'Runner to use for jobs' + cache-deps: + description: 'Whether dependency caching is enabled' + +jobs: + provide: + runs-on: ubuntu-latest + outputs: + python-version: ${{ steps.set.outputs.python-version }} + runner: ${{ steps.set.outputs.runner }} + cache-deps: ${{ steps.set.outputs.cache-deps }} + steps: + - id: set + run: | + # Export inputs as outputs via GITHUB_OUTPUT so other jobs can use them + echo "python-version=${{ inputs.python-version }}" >> $GITHUB_OUTPUT + echo "runner=${{ inputs.runner }}" >> $GITHUB_OUTPUT + echo "cache-deps=${{ inputs.cache-deps }}" >> $GITHUB_OUTPUT diff --git a/.github/workflows/workflow-tests.yml b/.github/workflows/workflow-tests.yml index dde087ae20c..40ace766b03 100644 --- a/.github/workflows/workflow-tests.yml +++ b/.github/workflows/workflow-tests.yml @@ -7,6 +7,8 @@ concurrency: cancel-in-progress: true jobs: + workflow_defaults: + uses: ./.github/workflows/workflow-defaults.yml build: runs-on: ${{ matrix.os }} strategy: @@ -19,7 +21,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ needs.workflow_defaults.outputs.python-version }} - name: install condor run: | wget -qO - https://research.cs.wisc.edu/htcondor/ubuntu/HTCondor-Release.gpg.key | sudo apt-key add - diff --git a/pycbc/__init__.py b/pycbc/__init__.py index 70437aff46a..bf76c0a9fae 100644 --- a/pycbc/__init__.py +++ b/pycbc/__init__.py @@ -60,7 +60,7 @@ class LogFormatter(logging.Formatter): """ converter = dt.fromtimestamp - def formatTime(self, record, datefmt=None): + def formatTime(self, record, datefmt=None): # pylint: disable=unused-argument ct = self.converter(record.created).astimezone() t = ct.strftime("%Y-%m-%dT%H:%M:%S") s = f"{t}.{int(record.msecs):03d}" From c8a49fc613312afdcc7767ec925a14401b4df5af Mon Sep 17 00:00:00 2001 From: Gareth S Cabourn Davies Date: Fri, 23 Jan 2026 12:37:10 +0000 Subject: [PATCH 03/18] revert distribution.yml to have explicit versions --- .github/workflows/distribution.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/distribution.yml b/.github/workflows/distribution.yml index 50c5c52739a..aa04ee8c5f7 100644 --- a/.github/workflows/distribution.yml +++ b/.github/workflows/distribution.yml @@ -7,11 +7,9 @@ concurrency: cancel-in-progress: true jobs: - workflow_defaults: - uses: ./.github/workflows/workflow-defaults.yml build_wheels: name: Build wheels on ${{ matrix.os }} - needs: workflow_defaults + # explicit python version for reproducible builds runs-on: ${{ matrix.os }} strategy: matrix: @@ -23,7 +21,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-python@v5 with: - python-version: ${{ needs.workflow_defaults.outputs.python-version }} + python-version: '3.11' - name: Install cibuildwheel run: python -m pip install cibuildwheel - name: Build wheels @@ -40,7 +38,7 @@ jobs: deploy_pypi: name: Package and publish to PyPI runs-on: ubuntu-24.04 - needs: [build_wheels, workflow_defaults] + needs: [build_wheels] steps: - uses: actions/checkout@v4 with: @@ -48,7 +46,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: ${{ needs.workflow_defaults.outputs.python-version }} + python-version: '3.11' - uses: actions/download-artifact@v4.1.7 with: pattern: wheel-* From 1c78d4d8d4784f802125ef3b6c784dc2cebebf73 Mon Sep 17 00:00:00 2001 From: Gareth S Cabourn Davies Date: Fri, 23 Jan 2026 12:47:12 +0000 Subject: [PATCH 04/18] Remove cache default --- .github/workflows/basic-tests.yml | 4 ++++ .github/workflows/workflow-defaults.yml | 19 +++---------------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/.github/workflows/basic-tests.yml b/.github/workflows/basic-tests.yml index 79294148ab8..73eee467cc4 100644 --- a/.github/workflows/basic-tests.yml +++ b/.github/workflows/basic-tests.yml @@ -7,7 +7,11 @@ concurrency: cancel-in-progress: true jobs: + workflow_defaults: + uses: ./.github/workflows/workflow-defaults.yml + build: + needs: workflow_defaults runs-on: ${{ matrix.os }} strategy: max-parallel: 60 diff --git a/.github/workflows/workflow-defaults.yml b/.github/workflows/workflow-defaults.yml index c374ab55291..9f158d726f0 100644 --- a/.github/workflows/workflow-defaults.yml +++ b/.github/workflows/workflow-defaults.yml @@ -8,33 +8,20 @@ on: description: 'Default Python version for workflows' required: false default: '3.11' - runner: - description: 'Default runner for jobs' - required: false - default: 'ubuntu-latest' - cache-deps: - description: 'Enable dependency caching ("true"/"false")' - required: false - default: 'true' outputs: python-version: description: 'Python version string to use in workflows' - runner: - description: 'Runner to use for jobs' - cache-deps: - description: 'Whether dependency caching is enabled' + jobs: provide: runs-on: ubuntu-latest outputs: python-version: ${{ steps.set.outputs.python-version }} - runner: ${{ steps.set.outputs.runner }} - cache-deps: ${{ steps.set.outputs.cache-deps }} + steps: - id: set run: | # Export inputs as outputs via GITHUB_OUTPUT so other jobs can use them echo "python-version=${{ inputs.python-version }}" >> $GITHUB_OUTPUT - echo "runner=${{ inputs.runner }}" >> $GITHUB_OUTPUT - echo "cache-deps=${{ inputs.cache-deps }}" >> $GITHUB_OUTPUT + From 5fca205bba3e2752d869675adc8e351fb63b5492 Mon Sep 17 00:00:00 2001 From: Gareth S Cabourn Davies Date: Fri, 23 Jan 2026 12:55:47 +0000 Subject: [PATCH 05/18] revert un-needed changes --- .github/workflows/distribution.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/distribution.yml b/.github/workflows/distribution.yml index aa04ee8c5f7..8e146859548 100644 --- a/.github/workflows/distribution.yml +++ b/.github/workflows/distribution.yml @@ -9,7 +9,6 @@ concurrency: jobs: build_wheels: name: Build wheels on ${{ matrix.os }} - # explicit python version for reproducible builds runs-on: ${{ matrix.os }} strategy: matrix: @@ -38,7 +37,7 @@ jobs: deploy_pypi: name: Package and publish to PyPI runs-on: ubuntu-24.04 - needs: [build_wheels] + needs: build_wheels steps: - uses: actions/checkout@v4 with: From a42a0ff3d6aba161bfeec1eadef4a58978e2f1c7 Mon Sep 17 00:00:00 2001 From: Gareth S Cabourn Davies Date: Fri, 23 Jan 2026 12:59:30 +0000 Subject: [PATCH 06/18] Fix the workflow defaults job --- .github/workflows/workflow-defaults.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/workflow-defaults.yml b/.github/workflows/workflow-defaults.yml index 9f158d726f0..384b2988d58 100644 --- a/.github/workflows/workflow-defaults.yml +++ b/.github/workflows/workflow-defaults.yml @@ -7,10 +7,12 @@ on: python-version: description: 'Default Python version for workflows' required: false + type: string default: '3.11' outputs: python-version: description: 'Python version string to use in workflows' + value: ${{ jobs.provide.outputs.python-version }} jobs: From a7804cebc3bdc67b83142d7570d356d4482b0b7f Mon Sep 17 00:00:00 2001 From: Gareth S Cabourn Davies Date: Fri, 23 Jan 2026 13:05:27 +0000 Subject: [PATCH 07/18] Fail only on unused imports, report on unused variables --- .github/workflows/check_code.yml | 42 +++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/.github/workflows/check_code.yml b/.github/workflows/check_code.yml index 097363f9b0f..a3113aa6443 100644 --- a/.github/workflows/check_code.yml +++ b/.github/workflows/check_code.yml @@ -15,12 +15,36 @@ jobs: with: python-version: ${{ needs.workflow_defaults.outputs.python-version }} - name: Install linters - run: pip install flake8 vulture - - name: Checking executables for unused imports and variables - run: find bin -type f -name "pycbc_*" | xargs flake8 --select=F401,F841 - - name: Checking modules for unused imports and variables - run: flake8 pycbc --select=F401,F841 --exclude="__init__.py,version.py" - - name: Checking tests for unused imports and variables - run: flake8 test --select=F401,F841 --exclude="*test_schemes*" - - name: Checking for unused code - run: vulture pycbc --min-confidence 100 + run: pip install flake8 vulture pylint + + - name: Check executables for unused imports (fail) + run: | + find bin -type f -name 'pycbc_*' -print0 | xargs -0 flake8 --select=F401 + + - name: Check executables for unused variables (report) + run: | + find bin -type f -name 'pycbc_*' -print0 | xargs -0 flake8 --select=F841 || true + + - name: Check modules for unused imports (fail) + run: flake8 pycbc --select=F401 --exclude="__init__.py,version.py" + + - name: Check modules for unused variables (report) + run: flake8 pycbc --select=F841 --exclude="__init__.py,version.py" || true + + - name: Check tests for unused imports (fail) + run: flake8 test --select=F401 --exclude="*test_schemes*" + + - name: Check tests for unused variables (report) + run: flake8 test --select=F841 --exclude="*test_schemes*" || true + + - name: Check for unreachable code (fail) + run: | + # Run pylint only for unreachable code. Disable all other messages. + python -m pylint --disable=all --enable=unreachable pycbc || true + # pylint exits with non-zero when messages are emitted; fail if any found + if python -m pylint --disable=all --enable=unreachable pycbc | grep -q "unreachable"; then + echo "Unreachable code found by pylint"; exit 1 + fi + + - name: Checking for unused codes + run: vulture pycbc --min-confidence 100 || true From da405a65afffb7a4d0379999b4b49da3c83e60ca Mon Sep 17 00:00:00 2001 From: Gareth S Cabourn Davies Date: Fri, 23 Jan 2026 13:09:31 +0000 Subject: [PATCH 08/18] Revert to previously-working test syntax --- .github/workflows/check_code.yml | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/check_code.yml b/.github/workflows/check_code.yml index a3113aa6443..bbcd319be7e 100644 --- a/.github/workflows/check_code.yml +++ b/.github/workflows/check_code.yml @@ -18,25 +18,21 @@ jobs: run: pip install flake8 vulture pylint - name: Check executables for unused imports (fail) - run: | - find bin -type f -name 'pycbc_*' -print0 | xargs -0 flake8 --select=F401 - + run: flake8 --select=F401 $(find bin -type f -name pycbc_*) - name: Check executables for unused variables (report) - run: | - find bin -type f -name 'pycbc_*' -print0 | xargs -0 flake8 --select=F841 || true - + run: flake8 --select=F841 $(find bin -type f -name pycbc_*) || true - name: Check modules for unused imports (fail) - run: flake8 pycbc --select=F401 --exclude="__init__.py,version.py" - + run: | + flake8 --select=F401 $(find pycbc | grep '\.py$' | grep -v -e __init__ -e 'version.py') - name: Check modules for unused variables (report) - run: flake8 pycbc --select=F841 --exclude="__init__.py,version.py" || true - + run: | + flake8 --select=F841 $(find pycbc | grep '\.py$' | grep -v -e __init__ -e 'version.py') || true - name: Check tests for unused imports (fail) - run: flake8 test --select=F401 --exclude="*test_schemes*" - + run: | + flake8 --select=F401 $(find test | grep '\.py$' | grep -v test_schemes) - name: Check tests for unused variables (report) - run: flake8 test --select=F841 --exclude="*test_schemes*" || true - + run: | + flake8 --select=F841 $(find test | grep '\.py$' | grep -v test_schemes) || true - name: Check for unreachable code (fail) run: | # Run pylint only for unreachable code. Disable all other messages. From f098f98c25b9db925c6481a4b88d472a69995282 Mon Sep 17 00:00:00 2001 From: Gareth S Cabourn Davies Date: Fri, 23 Jan 2026 13:12:48 +0000 Subject: [PATCH 09/18] Remove unreachable code so that tests can actually pass --- .github/workflows/check_code.yml | 16 ++++++++-------- pycbc/distributions/joint.py | 1 - pycbc/scheme.py | 1 - 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/check_code.yml b/.github/workflows/check_code.yml index bbcd319be7e..980f351842c 100644 --- a/.github/workflows/check_code.yml +++ b/.github/workflows/check_code.yml @@ -17,23 +17,23 @@ jobs: - name: Install linters run: pip install flake8 vulture pylint - - name: Check executables for unused imports (fail) + - name: Check executables for unused imports run: flake8 --select=F401 $(find bin -type f -name pycbc_*) - - name: Check executables for unused variables (report) + - name: Check executables for unused variables (report only) run: flake8 --select=F841 $(find bin -type f -name pycbc_*) || true - - name: Check modules for unused imports (fail) + - name: Check modules for unused imports run: | flake8 --select=F401 $(find pycbc | grep '\.py$' | grep -v -e __init__ -e 'version.py') - - name: Check modules for unused variables (report) + - name: Check modules for unused variables (report only) run: | flake8 --select=F841 $(find pycbc | grep '\.py$' | grep -v -e __init__ -e 'version.py') || true - - name: Check tests for unused imports (fail) + - name: Check tests for unused imports run: | flake8 --select=F401 $(find test | grep '\.py$' | grep -v test_schemes) - - name: Check tests for unused variables (report) + - name: Check tests for unused variables (report only) run: | flake8 --select=F841 $(find test | grep '\.py$' | grep -v test_schemes) || true - - name: Check for unreachable code (fail) + - name: Check for unreachable code run: | # Run pylint only for unreachable code. Disable all other messages. python -m pylint --disable=all --enable=unreachable pycbc || true @@ -42,5 +42,5 @@ jobs: echo "Unreachable code found by pylint"; exit 1 fi - - name: Checking for unused codes + - name: Checking for unused codes (report only) run: vulture pycbc --min-confidence 100 || true diff --git a/pycbc/distributions/joint.py b/pycbc/distributions/joint.py index 920d91cdca9..d766198ddab 100644 --- a/pycbc/distributions/joint.py +++ b/pycbc/distributions/joint.py @@ -186,7 +186,6 @@ def _return_atomic(params): return True elif isinstance(params, numpy.ndarray): return False - params = params.view(type=FieldArray) elif isinstance(params, FieldArray): return False else: diff --git a/pycbc/scheme.py b/pycbc/scheme.py index 9d27d146792..bc32db80e38 100644 --- a/pycbc/scheme.py +++ b/pycbc/scheme.py @@ -382,7 +382,6 @@ def __getitem__(self, scheme): for base in scheme.__mro__[0:-1]: try: return dict.__getitem__(self, base) - break except: pass From 44e3f08cb9314ac93e04838938f91b21ef009f13 Mon Sep 17 00:00:00 2001 From: Gareth S Cabourn Davies Date: Fri, 23 Jan 2026 13:17:26 +0000 Subject: [PATCH 10/18] Copilot says that the defaults code won't work, it seems to work but let's go along with it this for safety --- .github/workflows/bank-compress-workflow.yml | 2 +- .github/workflows/check_code.yml | 2 +- .github/workflows/inference-workflow.yml | 2 +- .github/workflows/search-workflow.yml | 2 +- .github/workflows/tmpltbank-workflow.yml | 2 +- .github/workflows/workflow-defaults.yml | 8 ++++---- .github/workflows/workflow-tests.yml | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/bank-compress-workflow.yml b/.github/workflows/bank-compress-workflow.yml index 3727dc21e84..2c2515c66aa 100644 --- a/.github/workflows/bank-compress-workflow.yml +++ b/.github/workflows/bank-compress-workflow.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: ${{ needs.workflow_defaults.outputs.python-version }} + python-version: ${{ needs.workflow_defaults.outputs.python_version }} - name: install condor run: | wget -qO - https://research.cs.wisc.edu/htcondor/ubuntu/HTCondor-Release.gpg.key | sudo apt-key add - diff --git a/.github/workflows/check_code.yml b/.github/workflows/check_code.yml index 980f351842c..7e3d99ca09e 100644 --- a/.github/workflows/check_code.yml +++ b/.github/workflows/check_code.yml @@ -13,7 +13,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: ${{ needs.workflow_defaults.outputs.python-version }} + python-version: ${{ needs.workflow_defaults.outputs.python_version }} - name: Install linters run: pip install flake8 vulture pylint diff --git a/.github/workflows/inference-workflow.yml b/.github/workflows/inference-workflow.yml index 5bc7955deeb..2d7b6df5a17 100644 --- a/.github/workflows/inference-workflow.yml +++ b/.github/workflows/inference-workflow.yml @@ -13,7 +13,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: ${{ needs.workflow_defaults.outputs.python-version }} + python-version: ${{ needs.workflow_defaults.outputs.python_version }} - name: install condor run: | wget -qO - https://research.cs.wisc.edu/htcondor/ubuntu/HTCondor-Release.gpg.key | sudo apt-key add - diff --git a/.github/workflows/search-workflow.yml b/.github/workflows/search-workflow.yml index 51d4cb49bcf..88555d7e34d 100644 --- a/.github/workflows/search-workflow.yml +++ b/.github/workflows/search-workflow.yml @@ -20,7 +20,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: ${{ needs.workflow_defaults.outputs.python-version }} + python-version: ${{ needs.workflow_defaults.outputs.python_version }} - name: install condor run: | wget -qO - https://research.cs.wisc.edu/htcondor/ubuntu/HTCondor-Release.gpg.key | sudo apt-key add - diff --git a/.github/workflows/tmpltbank-workflow.yml b/.github/workflows/tmpltbank-workflow.yml index 95a1631c229..7e9556306cd 100644 --- a/.github/workflows/tmpltbank-workflow.yml +++ b/.github/workflows/tmpltbank-workflow.yml @@ -17,7 +17,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: ${{ needs.workflow_defaults.outputs.python-version }} + python-version: ${{ needs.workflow_defaults.outputs.python_version }} - name: install condor run: | wget -qO - https://research.cs.wisc.edu/htcondor/ubuntu/HTCondor-Release.gpg.key | sudo apt-key add - diff --git a/.github/workflows/workflow-defaults.yml b/.github/workflows/workflow-defaults.yml index 384b2988d58..9ddcd90e5a8 100644 --- a/.github/workflows/workflow-defaults.yml +++ b/.github/workflows/workflow-defaults.yml @@ -10,20 +10,20 @@ on: type: string default: '3.11' outputs: - python-version: + python_version: description: 'Python version string to use in workflows' - value: ${{ jobs.provide.outputs.python-version }} + value: ${{ jobs.provide.outputs.python_version }} jobs: provide: runs-on: ubuntu-latest outputs: - python-version: ${{ steps.set.outputs.python-version }} + python_version: ${{ steps.set.outputs.python_version }} steps: - id: set run: | # Export inputs as outputs via GITHUB_OUTPUT so other jobs can use them - echo "python-version=${{ inputs.python-version }}" >> $GITHUB_OUTPUT + echo "python_version=${{ inputs.python-version }}" >> $GITHUB_OUTPUT diff --git a/.github/workflows/workflow-tests.yml b/.github/workflows/workflow-tests.yml index 40ace766b03..5d0c0b2e2e0 100644 --- a/.github/workflows/workflow-tests.yml +++ b/.github/workflows/workflow-tests.yml @@ -21,7 +21,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: ${{ needs.workflow_defaults.outputs.python-version }} + python-version: ${{ needs.workflow_defaults.outputs.python_version }} - name: install condor run: | wget -qO - https://research.cs.wisc.edu/htcondor/ubuntu/HTCondor-Release.gpg.key | sudo apt-key add - From 882b5e25424ea448d438e1bc2badbf82acfe39de Mon Sep 17 00:00:00 2001 From: Gareth S Cabourn Davies Date: Mon, 26 Jan 2026 15:31:33 +0000 Subject: [PATCH 11/18] Add caching to the search workflow --- .github/workflows/search-workflow.yml | 20 +++++++++++++++++++ examples/search/get.sh | 28 ++++++++++++++++++++++++--- 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/.github/workflows/search-workflow.yml b/.github/workflows/search-workflow.yml index 88555d7e34d..477ae455ae2 100644 --- a/.github/workflows/search-workflow.yml +++ b/.github/workflows/search-workflow.yml @@ -17,6 +17,26 @@ jobs: PEGASUS_METRICS: 'false' steps: - uses: actions/checkout@v1 + - name: Restore LAL auxiliary data cache + id: restore-lal + uses: actions/cache@v4 + with: + key: lal-aux-data + path: | + ~/lal_aux_data + + - name: Restore example GW data cache for search example + id: restore-example-gw + uses: actions/cache@v4 + with: + key: ${{ needs.workflow_defaults.outputs.example_gw_cache_key }} + path: | + examples/search + + - name: list restored example files + run: | + echo "Restored files in examples/search:" + ls -la examples/search || true - name: Set up Python uses: actions/setup-python@v5 with: diff --git a/examples/search/get.sh b/examples/search/get.sh index ec4bd98635a..eb5e0e3c4aa 100644 --- a/examples/search/get.sh +++ b/examples/search/get.sh @@ -1,6 +1,28 @@ #!/bin/bash set -e -wget -nv https://dcc.ligo.org/public/0146/P1700341/001/H-H1_LOSC_CLN_4_V1-1186740069-3584.gwf -wget -nv https://dcc.ligo.org/public/0146/P1700341/001/L-L1_LOSC_CLN_4_V1-1186740069-3584.gwf -wget -nv https://dcc.ligo.org/public/0146/P1700341/001/V-V1_LOSC_CLN_4_V1-1186739813-4096.gwf +# List of frame files used by the example +FILES=( + "H-H1_LOSC_CLN_4_V1-1186740069-3584.gwf" + "L-L1_LOSC_CLN_4_V1-1186740069-3584.gwf" + "V-V1_LOSC_CLN_4_V1-1186739813-4096.gwf" +) + +for f in "${FILES[@]}"; do + # If file is already in current working directory, skip + if [ -f "./$f" ]; then + echo "Found $f in working directory; skipping download." + continue + fi + + # If file is present in examples/search (i.e. the cache), then copy it + if [ -f "examples/search/$f" ]; then + echo "Found $f in examples/search (cache); copying." + cp "examples/search/$f" ./ + continue + fi + + # Otherwise, download from the DCC + echo "Downloading $f from DCC..." + wget -nv "https://dcc.ligo.org/public/0146/P1700341/001/$f" +done From 42e05d14a38c03b328b9984663c7739a3ce5b446 Mon Sep 17 00:00:00 2001 From: Gareth S Cabourn Davies Date: Mon, 26 Jan 2026 15:33:41 +0000 Subject: [PATCH 12/18] Add file caching to the shared workflow defaults --- .github/workflows/basic-tests.yml | 40 +++---------------- .github/workflows/workflow-defaults.yml | 51 +++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 35 deletions(-) diff --git a/.github/workflows/basic-tests.yml b/.github/workflows/basic-tests.yml index 73eee467cc4..0b7642c3341 100644 --- a/.github/workflows/basic-tests.yml +++ b/.github/workflows/basic-tests.yml @@ -13,6 +13,8 @@ jobs: build: needs: workflow_defaults runs-on: ${{ matrix.os }} + env: + LAL_DATA_PATH: ${{ needs.workflow_defaults.outputs.lal_data_path }} strategy: max-parallel: 60 matrix: @@ -30,51 +32,19 @@ jobs: sudo apt-get -o Acquire::Retries=3 update sudo apt-get -o Acquire::Retries=3 install *fftw3* mpi intel-mkl* graphviz pip install tox pip setuptools --upgrade - - name: Cache LAL auxiliary data files - id: cache-lal-aux-data - uses: actions/cache@v4 - with: - key: lal-aux-data - path: ~/lal_aux_data - - if: ${{ steps.cache-lal-aux-data.outputs.cache-hit != 'true' }} - name: Download LAL auxiliary data files - run: | - mkdir ~/lal_aux_data - pushd ~/lal_aux_data - curl --show-error --silent \ - --remote-name https://zenodo.org/records/14999310/files/SEOBNRv4ROM_v2.0.hdf5 \ - --remote-name https://zenodo.org/records/14999310/files/SEOBNRv4ROM_v3.0.hdf5 - popd - - name: Cache example GW data - id: cache-example-gw-data - uses: actions/cache@v4 - with: - key: example-gw-data - path: | - docs/_include/*_TDI_v2.gwf - docs/_include/*_GWOSC_4KHZ_R1-1126257415-4096.gwf - docs/_include/*_LOSC_CLN_4_V1-1187007040-2048.gwf - examples/inference/lisa_smbhb_ldc/*_psd.txt - examples/inference/lisa_smbhb_ldc/*_TDI_v2.gwf - examples/inference/lisa_smbhb_ldc/MBHB_params_v2_LISA_frame.pkl - examples/inference/margtime/*.gwf - examples/inference/multisignal/*.gwf - examples/inference/relative/*.gwf - examples/inference/relmarg/*.gwf - examples/inference/single/*.gwf + # LAL and example GW data are provided by the reusable workflow `workflow-defaults` + # and exposed via `needs.workflow_defaults.outputs.lal_data_path` and + # `needs.workflow_defaults.outputs.example_gw_cache_key`. - name: run pycbc test suite run: | - export LAL_DATA_PATH=$HOME/lal_aux_data tox -e py-${{matrix.test-type}} - name: check help messages work if: matrix.test-type == 'unittest' run: | - export LAL_DATA_PATH=$HOME/lal_aux_data tox -e py-help - name: run inference tests if: matrix.test-type == 'search' run: | - export LAL_DATA_PATH=$HOME/lal_aux_data tox -e py-inference - name: store documentation page if: matrix.test-type == 'docs' && matrix.python-version == '3.12' diff --git a/.github/workflows/workflow-defaults.yml b/.github/workflows/workflow-defaults.yml index 9ddcd90e5a8..44c6caee09b 100644 --- a/.github/workflows/workflow-defaults.yml +++ b/.github/workflows/workflow-defaults.yml @@ -13,6 +13,12 @@ on: python_version: description: 'Python version string to use in workflows' value: ${{ jobs.provide.outputs.python_version }} + lal_data_path: + description: 'Path where LAL auxiliary data is cached on the runner' + value: ${{ jobs.provide.outputs.lal_data_path }} + example_gw_cache_key: + description: 'Cache key used for example GW data (useful when restoring cache)' + value: ${{ jobs.provide.outputs.example_gw_cache_key }} jobs: @@ -20,10 +26,55 @@ jobs: runs-on: ubuntu-latest outputs: python_version: ${{ steps.set.outputs.python_version }} + lal_data_path: ${{ steps.set_paths.outputs.lal_data_path }} + example_gw_cache_key: ${{ steps.set_paths.outputs.example_gw_cache_key }} steps: - id: set run: | # Export inputs as outputs via GITHUB_OUTPUT so other jobs can use them echo "python_version=${{ inputs.python-version }}" >> $GITHUB_OUTPUT + + - name: Cache LAL auxiliary data files + id: cache-lal-aux-data + uses: actions/cache@v4 + with: + key: lal-aux-data + path: ~/lal_aux_data + + - if: ${{ steps.cache-lal-aux-data.outputs.cache-hit != 'true' }} + name: Download LAL auxiliary data files + run: | + mkdir -p ~/lal_aux_data + pushd ~/lal_aux_data + curl --show-error --silent \ + --remote-name https://zenodo.org/records/14999310/files/SEOBNRv4ROM_v2.0.hdf5 \ + --remote-name https://zenodo.org/records/14999310/files/SEOBNRv4ROM_v3.0.hdf5 + popd + + - name: Cache example GW data + id: cache-example-gw-data + uses: actions/cache@v4 + with: + key: example-gw-data + path: | + docs/_include/*_TDI_v2.gwf + docs/_include/*_GWOSC_4KHZ_R1-1126257415-4096.gwf + docs/_include/*_LOSC_CLN_4_V1-1187007040-2048.gwf + examples/inference/lisa_smbhb_ldc/*_psd.txt + examples/inference/lisa_smbhb_ldc/*_TDI_v2.gwf + examples/inference/lisa_smbhb_ldc/MBHB_params_v2_LISA_frame.pkl + examples/inference/margtime/*.gwf + examples/inference/multisignal/*.gwf + examples/inference/relative/*.gwf + examples/inference/relmarg/*.gwf + examples/inference/single/*.gwf + examples/search/*.gwf + + - id: set_paths + name: Set path outputs for cached data + run: | + # Expose the LAL data path and cache key so callers can reference them + echo "lal_data_path=$HOME/lal_aux_data" >> $GITHUB_OUTPUT + echo "example_gw_cache_key=example-gw-data" >> $GITHUB_OUTPUT From 040009a53b6af5d78d8fbd81f91757ea16f55198 Mon Sep 17 00:00:00 2001 From: Gareth S Cabourn Davies Date: Mon, 26 Jan 2026 15:55:51 +0000 Subject: [PATCH 13/18] remove comment --- .github/workflows/basic-tests.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/basic-tests.yml b/.github/workflows/basic-tests.yml index 0b7642c3341..e01b12261f6 100644 --- a/.github/workflows/basic-tests.yml +++ b/.github/workflows/basic-tests.yml @@ -32,9 +32,6 @@ jobs: sudo apt-get -o Acquire::Retries=3 update sudo apt-get -o Acquire::Retries=3 install *fftw3* mpi intel-mkl* graphviz pip install tox pip setuptools --upgrade - # LAL and example GW data are provided by the reusable workflow `workflow-defaults` - # and exposed via `needs.workflow_defaults.outputs.lal_data_path` and - # `needs.workflow_defaults.outputs.example_gw_cache_key`. - name: run pycbc test suite run: | tox -e py-${{matrix.test-type}} From 554b8a20d69adc7f44627ab6145cffa4a102caf6 Mon Sep 17 00:00:00 2001 From: Gareth S Cabourn Davies Date: Tue, 27 Jan 2026 08:43:50 +0000 Subject: [PATCH 14/18] remove unrelated changes --- pycbc/__init__.py | 2 +- pycbc/distributions/joint.py | 1 + pycbc/scheme.py | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pycbc/__init__.py b/pycbc/__init__.py index bf76c0a9fae..70437aff46a 100644 --- a/pycbc/__init__.py +++ b/pycbc/__init__.py @@ -60,7 +60,7 @@ class LogFormatter(logging.Formatter): """ converter = dt.fromtimestamp - def formatTime(self, record, datefmt=None): # pylint: disable=unused-argument + def formatTime(self, record, datefmt=None): ct = self.converter(record.created).astimezone() t = ct.strftime("%Y-%m-%dT%H:%M:%S") s = f"{t}.{int(record.msecs):03d}" diff --git a/pycbc/distributions/joint.py b/pycbc/distributions/joint.py index d766198ddab..920d91cdca9 100644 --- a/pycbc/distributions/joint.py +++ b/pycbc/distributions/joint.py @@ -186,6 +186,7 @@ def _return_atomic(params): return True elif isinstance(params, numpy.ndarray): return False + params = params.view(type=FieldArray) elif isinstance(params, FieldArray): return False else: diff --git a/pycbc/scheme.py b/pycbc/scheme.py index bc32db80e38..9d27d146792 100644 --- a/pycbc/scheme.py +++ b/pycbc/scheme.py @@ -382,6 +382,7 @@ def __getitem__(self, scheme): for base in scheme.__mro__[0:-1]: try: return dict.__getitem__(self, base) + break except: pass From 8827a5abd429bdfe715aa9796c712e74c502d5d3 Mon Sep 17 00:00:00 2001 From: Gareth S Cabourn Davies Date: Tue, 27 Jan 2026 13:08:00 +0000 Subject: [PATCH 15/18] copilot siuggestions / yaml should supposedly have this at the start of each file --- .github/workflows/bank-compress-workflow.yml | 1 + .github/workflows/basic-tests.yml | 9 +- .github/workflows/build_venv.yml | 1 + .github/workflows/check_code.yml | 61 +++++--------- .github/workflows/distribution.yml | 46 +++++----- .github/workflows/docker-build.yml | 1 + .github/workflows/inference-workflow.yml | 1 + .github/workflows/mac-test.yml | 66 +++++++-------- .github/workflows/search-workflow.yml | 2 +- .github/workflows/tmpltbank-workflow.yml | 89 ++++++++++---------- .github/workflows/tut-test.yml | 7 +- .github/workflows/workflow-defaults.yml | 19 +++-- .github/workflows/workflow-tests.yml | 1 + examples/search/get.sh | 2 + 14 files changed, 151 insertions(+), 155 deletions(-) diff --git a/.github/workflows/bank-compress-workflow.yml b/.github/workflows/bank-compress-workflow.yml index 2c2515c66aa..2714dc7ff72 100644 --- a/.github/workflows/bank-compress-workflow.yml +++ b/.github/workflows/bank-compress-workflow.yml @@ -1,3 +1,4 @@ +--- name: compress waveforms into a bank using pegasus + condor on: [push, pull_request] diff --git a/.github/workflows/basic-tests.yml b/.github/workflows/basic-tests.yml index e01b12261f6..acd81ab68cf 100644 --- a/.github/workflows/basic-tests.yml +++ b/.github/workflows/basic-tests.yml @@ -1,3 +1,4 @@ +--- name: basic tests on: [push, pull_request] @@ -19,14 +20,14 @@ jobs: max-parallel: 60 matrix: os: [ubuntu-24.04] - python-version: ['3.11', '3.12', '3.13'] + python_version: ['3.11', '3.12', '3.13'] test-type: [unittest, search, docs] steps: - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} + - name: Set up Python ${{ matrix.python_version }} uses: actions/setup-python@v5 with: - python-version: ${{ matrix.python-version }} + python-version: ${{ matrix.python_version }} - name: installing system packages run: | sudo apt-get -o Acquire::Retries=3 update @@ -44,7 +45,7 @@ jobs: run: | tox -e py-inference - name: store documentation page - if: matrix.test-type == 'docs' && matrix.python-version == '3.12' + if: matrix.test-type == 'docs' && matrix.python_version == '3.12' uses: actions/upload-artifact@v4 with: name: documentation-page diff --git a/.github/workflows/build_venv.yml b/.github/workflows/build_venv.yml index 6336f84f52e..18bcd62b03d 100644 --- a/.github/workflows/build_venv.yml +++ b/.github/workflows/build_venv.yml @@ -1,3 +1,4 @@ +--- name: build the LVK virtualenv on: [push, pull_request] diff --git a/.github/workflows/check_code.yml b/.github/workflows/check_code.yml index 7e3d99ca09e..af354c0ac12 100644 --- a/.github/workflows/check_code.yml +++ b/.github/workflows/check_code.yml @@ -1,46 +1,27 @@ -name: Code quality checks +--- +name: Flake8 check on: [pull_request] jobs: workflow_defaults: uses: ./.github/workflows/workflow-defaults.yml - linters: - needs: workflow_defaults - runs-on: ubuntu-latest - steps: - - name: Check out repository - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: ${{ needs.workflow_defaults.outputs.python_version }} - - name: Install linters - run: pip install flake8 vulture pylint + flake8_unused_imports: + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ${{ needs.workflow_defaults.outputs.python_version }} + - name: Install flake8 + run: pip install flake8 + - name: Checking executables for unused imports + run: flake8 --select=F401 $(find bin -type f -name pycbc_*) + - name: Checking modules for unused imports + run: | + flake8 --select=F401 $(find pycbc | grep '\.py$' | grep -v -e __init__ -e 'version.py') + - name: Checking tests for unused imports + run: | + flake8 --select=F401 $(find test | grep '\.py$' | grep -v test_schemes) - - name: Check executables for unused imports - run: flake8 --select=F401 $(find bin -type f -name pycbc_*) - - name: Check executables for unused variables (report only) - run: flake8 --select=F841 $(find bin -type f -name pycbc_*) || true - - name: Check modules for unused imports - run: | - flake8 --select=F401 $(find pycbc | grep '\.py$' | grep -v -e __init__ -e 'version.py') - - name: Check modules for unused variables (report only) - run: | - flake8 --select=F841 $(find pycbc | grep '\.py$' | grep -v -e __init__ -e 'version.py') || true - - name: Check tests for unused imports - run: | - flake8 --select=F401 $(find test | grep '\.py$' | grep -v test_schemes) - - name: Check tests for unused variables (report only) - run: | - flake8 --select=F841 $(find test | grep '\.py$' | grep -v test_schemes) || true - - name: Check for unreachable code - run: | - # Run pylint only for unreachable code. Disable all other messages. - python -m pylint --disable=all --enable=unreachable pycbc || true - # pylint exits with non-zero when messages are emitted; fail if any found - if python -m pylint --disable=all --enable=unreachable pycbc | grep -q "unreachable"; then - echo "Unreachable code found by pylint"; exit 1 - fi - - - name: Checking for unused codes (report only) - run: vulture pycbc --min-confidence 100 || true diff --git a/.github/workflows/distribution.yml b/.github/workflows/distribution.yml index 8e146859548..eacb2ccb071 100644 --- a/.github/workflows/distribution.yml +++ b/.github/workflows/distribution.yml @@ -39,26 +39,26 @@ jobs: runs-on: ubuntu-24.04 needs: build_wheels steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - uses: actions/download-artifact@v4.1.7 - with: - pattern: wheel-* - merge-multiple: true - path: dist/ - - name: Build source distribution - run: | - python -c 'import setuptools ; print("setuptools version", setuptools.__version__)' - pip install pip setuptools --upgrade - python setup.py sdist - ls -lh dist - - name: Publish to PyPI - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4 - with: - password: ${{ secrets.pypi_password }} + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + - uses: actions/download-artifact@v4.1.7 + with: + pattern: wheel-* + merge-multiple: true + path: dist/ + - name: Build source distribution + run: | + python -c 'import setuptools ; print("setuptools version", setuptools.__version__)' + pip install pip setuptools --upgrade + python setup.py sdist + ls -lh dist + - name: Publish to PyPI + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4 + with: + password: ${{ secrets.pypi_password }} diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index fa7136f9a68..d03de544667 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -1,3 +1,4 @@ +--- name: docker build on: [push, pull_request] diff --git a/.github/workflows/inference-workflow.yml b/.github/workflows/inference-workflow.yml index 2d7b6df5a17..722866bff1a 100644 --- a/.github/workflows/inference-workflow.yml +++ b/.github/workflows/inference-workflow.yml @@ -1,3 +1,4 @@ +--- name: run small inference workflow using pegasus + condor on: [push, pull_request] diff --git a/.github/workflows/mac-test.yml b/.github/workflows/mac-test.yml index 22b5028cdfc..dd71eae29f0 100644 --- a/.github/workflows/mac-test.yml +++ b/.github/workflows/mac-test.yml @@ -13,7 +13,7 @@ jobs: max-parallel: 4 matrix: os: [macos-latest] - python-version: + python_version: - '3.11' - '3.12' - '3.13' @@ -24,35 +24,35 @@ jobs: shell: bash -el {0} steps: - - uses: actions/checkout@v1 - - - name: Cache conda packages - uses: actions/cache@v4 - env: - # increment to reset cache - CACHE_NUMBER: 0 - with: - path: ~/conda_pkgs_dir - key: ${{ runner.os }}-conda-${{ matrix.python-version}}-${{ env.CACHE_NUMBER }} - - - name: Configure conda - uses: conda-incubator/setup-miniconda@v3 - with: - activate-environment: test - channels: conda-forge - miniforge-version: latest - python-version: ${{ matrix.python-version }} - - - name: Conda info - run: conda info --all - - - name: Install tox - run: | - conda install \ - pip \ - setuptools \ - tox - - - name: Run basic pycbc test suite - run: | - tox -e py-unittest + - uses: actions/checkout@v1 + + - name: Cache conda packages + uses: actions/cache@v4 + env: + # increment to reset cache + CACHE_NUMBER: 0 + with: + path: $HOME/conda_pkgs_dir + key: ${{ runner.os }}-conda-${{ matrix.python_version}}-${{ env.CACHE_NUMBER }} + + - name: Configure conda + uses: conda-incubator/setup-miniconda@v3 + with: + activate-environment: test + channels: conda-forge + miniforge-version: latest + python-version: ${{ matrix.python_version }} + + - name: Conda info + run: conda info --all + + - name: Install tox + run: | + conda install \ + pip \ + setuptools \ + tox + + - name: Run basic pycbc test suite + run: | + tox -e py-unittest diff --git a/.github/workflows/search-workflow.yml b/.github/workflows/search-workflow.yml index 477ae455ae2..3117326af70 100644 --- a/.github/workflows/search-workflow.yml +++ b/.github/workflows/search-workflow.yml @@ -23,7 +23,7 @@ jobs: with: key: lal-aux-data path: | - ~/lal_aux_data + $HOME/lal_aux_data - name: Restore example GW data cache for search example id: restore-example-gw diff --git a/.github/workflows/tmpltbank-workflow.yml b/.github/workflows/tmpltbank-workflow.yml index 7e9556306cd..1a20238acdc 100644 --- a/.github/workflows/tmpltbank-workflow.yml +++ b/.github/workflows/tmpltbank-workflow.yml @@ -1,3 +1,4 @@ +--- name: run small template bank generation using pegasus + condor on: [push, pull_request] @@ -13,48 +14,48 @@ jobs: needs: workflow_defaults runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: ${{ needs.workflow_defaults.outputs.python_version }} - - name: install condor - run: | - wget -qO - https://research.cs.wisc.edu/htcondor/ubuntu/HTCondor-Release.gpg.key | sudo apt-key add - - echo "deb http://research.cs.wisc.edu/htcondor/ubuntu/8.9/focal focal contrib" | sudo tee -a /etc/apt/sources.list - echo "deb-src http://research.cs.wisc.edu/htcondor/ubuntu/8.9/focal focal contrib" | sudo tee -a /etc/apt/sources.list - sudo apt-get -o Acquire::Retries=3 update - sudo apt-get -o Acquire::Retries=3 install minihtcondor - sudo systemctl start condor - sudo systemctl enable condor - - name: install pegasus - run: | - wget -qO - https://download.pegasus.isi.edu/pegasus/gpg.txt | sudo apt-key add - - echo "deb https://download.pegasus.isi.edu/pegasus/ubuntu noble main" | sudo tee -a /etc/apt/sources.list - sudo apt-get -o Acquire::Retries=3 update - sudo apt-get -o Acquire::Retries=3 install pegasus=5.1.1-1+ubuntu24 - - run: sudo apt-get -o Acquire::Retries=3 install *fftw3* intel-mkl* - - name: Install pycbc - run: | - python -m pip install --upgrade pip setuptools - pip install GitPython # This shouldn't really be needed! - pip install -r requirements.txt - pip install sbank - pip install . - - name: generating, submitting and running workflow - env: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ needs.workflow_defaults.outputs.python_version }} + - name: install condor + run: | + wget -qO - https://research.cs.wisc.edu/htcondor/ubuntu/HTCondor-Release.gpg.key | sudo apt-key add - + echo "deb http://research.cs.wisc.edu/htcondor/ubuntu/8.9/focal focal contrib" | sudo tee -a /etc/apt/sources.list + echo "deb-src http://research.cs.wisc.edu/htcondor/ubuntu/8.9/focal focal contrib" | sudo tee -a /etc/apt/sources.list + sudo apt-get -o Acquire::Retries=3 update + sudo apt-get -o Acquire::Retries=3 install minihtcondor + sudo systemctl start condor + sudo systemctl enable condor + - name: install pegasus + run: | + wget -qO - https://download.pegasus.isi.edu/pegasus/gpg.txt | sudo apt-key add - + echo "deb https://download.pegasus.isi.edu/pegasus/ubuntu noble main" | sudo tee -a /etc/apt/sources.list + sudo apt-get -o Acquire::Retries=3 update + sudo apt-get -o Acquire::Retries=3 install pegasus=5.1.1-1+ubuntu24 + - run: sudo apt-get -o Acquire::Retries=3 install *fftw3* intel-mkl* + - name: Install pycbc + run: | + python -m pip install --upgrade pip setuptools + pip install GitPython # This shouldn't really be needed! + pip install -r requirements.txt + pip install sbank + pip install . + - name: generating, submitting and running workflow + env: _CONDOR_DAGMAN_USE_STRICT: "0" - run: | - cp examples/tmpltbank/bank_workflow_test/*.ini ./ - bash -e examples/tmpltbank/bank_workflow_test/gen.sh - condor_status - cd output - ./status - python ../examples/search/check_job.py - find submitdir/work/ -type f -name '*.tar.gz' -delete - - name: store log files - if: always() - uses: actions/upload-artifact@v4 - with: - name: logs - path: output/submitdir/work + run: | + cp examples/tmpltbank/bank_workflow_test/*.ini ./ + bash -e examples/tmpltbank/bank_workflow_test/gen.sh + condor_status + cd output + ./status + python ../examples/search/check_job.py + find submitdir/work/ -type f -name '*.tar.gz' -delete + - name: store log files + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs + path: output/submitdir/work diff --git a/.github/workflows/tut-test.yml b/.github/workflows/tut-test.yml index 4f021152cf3..e9bc05b0c0b 100644 --- a/.github/workflows/tut-test.yml +++ b/.github/workflows/tut-test.yml @@ -1,3 +1,4 @@ +--- name: tutorial tests on: [push, pull_request] @@ -13,13 +14,13 @@ jobs: max-parallel: 60 matrix: os: [ubuntu-24.04] - python-version: ['3.11', '3.12', '3.13'] + python_version: ['3.11', '3.12', '3.13'] steps: - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} + - name: Set up Python ${{ matrix.python_version }} uses: actions/setup-python@v5 with: - python-version: ${{ matrix.python-version }} + python-version: ${{ matrix.python_version }} - name: installing packages run: | sudo apt-get -o Acquire::Retries=3 update diff --git a/.github/workflows/workflow-defaults.yml b/.github/workflows/workflow-defaults.yml index 44c6caee09b..a3e7fabb408 100644 --- a/.github/workflows/workflow-defaults.yml +++ b/.github/workflows/workflow-defaults.yml @@ -1,3 +1,4 @@ +--- # Provide default values used across workflows. # Add new defaults (inputs) here and expose them as outputs so other # workflows can consume them via `needs..outputs.`. @@ -19,7 +20,7 @@ on: example_gw_cache_key: description: 'Cache key used for example GW data (useful when restoring cache)' value: ${{ jobs.provide.outputs.example_gw_cache_key }} - + jobs: provide: @@ -28,26 +29,30 @@ jobs: python_version: ${{ steps.set.outputs.python_version }} lal_data_path: ${{ steps.set_paths.outputs.lal_data_path }} example_gw_cache_key: ${{ steps.set_paths.outputs.example_gw_cache_key }} - + steps: - id: set run: | # Export inputs as outputs via GITHUB_OUTPUT so other jobs can use them echo "python_version=${{ inputs.python-version }}" >> $GITHUB_OUTPUT + - name: Checkout repository + uses: actions/checkout@v4 + - name: Cache LAL auxiliary data files id: cache-lal-aux-data uses: actions/cache@v4 with: key: lal-aux-data - path: ~/lal_aux_data + path: $HOME/lal_aux_data - if: ${{ steps.cache-lal-aux-data.outputs.cache-hit != 'true' }} name: Download LAL auxiliary data files run: | - mkdir -p ~/lal_aux_data - pushd ~/lal_aux_data - curl --show-error --silent \ + mkdir -p $HOME/lal_aux_data + pushd $HOME/lal_aux_data + # Retry transient network errors up to 3 times with a short delay + curl --show-error --silent --fail --retry 3 --retry-delay 5 --retry-connrefused \ --remote-name https://zenodo.org/records/14999310/files/SEOBNRv4ROM_v2.0.hdf5 \ --remote-name https://zenodo.org/records/14999310/files/SEOBNRv4ROM_v3.0.hdf5 popd @@ -77,4 +82,4 @@ jobs: # Expose the LAL data path and cache key so callers can reference them echo "lal_data_path=$HOME/lal_aux_data" >> $GITHUB_OUTPUT echo "example_gw_cache_key=example-gw-data" >> $GITHUB_OUTPUT - + diff --git a/.github/workflows/workflow-tests.yml b/.github/workflows/workflow-tests.yml index 5d0c0b2e2e0..ecaaf077e54 100644 --- a/.github/workflows/workflow-tests.yml +++ b/.github/workflows/workflow-tests.yml @@ -1,3 +1,4 @@ +--- name: run generic example workflow tests on: [push, pull_request] diff --git a/examples/search/get.sh b/examples/search/get.sh index eb5e0e3c4aa..5901b12bae5 100644 --- a/examples/search/get.sh +++ b/examples/search/get.sh @@ -25,4 +25,6 @@ for f in "${FILES[@]}"; do # Otherwise, download from the DCC echo "Downloading $f from DCC..." wget -nv "https://dcc.ligo.org/public/0146/P1700341/001/$f" + # Copy into the cache folder + cp $f examples/search/ done From b5c309fa87f3804db201839e5ce854772bf3179a Mon Sep 17 00:00:00 2001 From: Gareth S Cabourn Davies Date: Tue, 27 Jan 2026 15:21:16 +0000 Subject: [PATCH 16/18] use actions for single source of truth --- .github/actions/defaults/action.yml | 20 +++++ .../install-htcondor-pegasus/action.yml | 22 +++++ .../actions/install-system-deps/action.yml | 14 +++ .github/actions/populate-caches/action.yml | 79 +++++++++++++++++ .github/workflows/bank-compress-workflow.yml | 29 ++----- .github/workflows/basic-tests.yml | 16 ++-- .github/workflows/build_venv.yml | 1 - .github/workflows/check_code.yml | 9 +- .github/workflows/docker-build.yml | 1 - .github/workflows/inference-workflow.yml | 29 ++----- .github/workflows/search-workflow.yml | 48 ++--------- .github/workflows/tmpltbank-workflow.yml | 29 ++----- .github/workflows/tut-test.yml | 7 +- .github/workflows/workflow-defaults.yml | 85 ------------------- .github/workflows/workflow-tests.yml | 28 ++---- 15 files changed, 189 insertions(+), 228 deletions(-) create mode 100644 .github/actions/defaults/action.yml create mode 100644 .github/actions/install-htcondor-pegasus/action.yml create mode 100644 .github/actions/install-system-deps/action.yml create mode 100644 .github/actions/populate-caches/action.yml delete mode 100644 .github/workflows/workflow-defaults.yml diff --git a/.github/actions/defaults/action.yml b/.github/actions/defaults/action.yml new file mode 100644 index 00000000000..09ffc877caf --- /dev/null +++ b/.github/actions/defaults/action.yml @@ -0,0 +1,20 @@ +name: Defaults +description: "Composite action that exposes default values for workflows (e.g., python_version)." + +inputs: + python-version: + description: "Default Python version to use in workflows" + required: false + default: '3.11' + +runs: + using: composite + steps: + - id: set + run: | + echo "python_version=${{ inputs.python-version }}" >> $GITHUB_OUTPUT + +outputs: + python_version: + description: "Python version string" + value: ${{ steps.set.outputs.python_version }} diff --git a/.github/actions/install-htcondor-pegasus/action.yml b/.github/actions/install-htcondor-pegasus/action.yml new file mode 100644 index 00000000000..24d198e3a57 --- /dev/null +++ b/.github/actions/install-htcondor-pegasus/action.yml @@ -0,0 +1,22 @@ +name: Install HTCondor and Pegasus +description: "Composite action to install HTCondor and Pegasus on Ubuntu runners." +runs: + using: "composite" + steps: + - name: Install HTCondor + run: | + wget -qO - https://research.cs.wisc.edu/htcondor/ubuntu/HTCondor-Release.gpg.key | sudo apt-key add - + echo "deb http://research.cs.wisc.edu/htcondor/ubuntu/8.9/focal focal contrib" | sudo tee -a /etc/apt/sources.list + echo "deb-src http://research.cs.wisc.edu/htcondor/ubuntu/8.9/focal focal contrib" | sudo tee -a /etc/apt/sources.list + sudo apt-get -o Acquire::Retries=3 update + sudo apt-get -o Acquire::Retries=3 install -y minihtcondor + # systemd may not be available in all runners, ignore failures when enabling + sudo systemctl start condor || true + sudo systemctl enable condor || true + + - name: Install Pegasus + run: | + wget -qO - https://download.pegasus.isi.edu/pegasus/gpg.txt | sudo apt-key add - + echo "deb https://download.pegasus.isi.edu/pegasus/ubuntu noble main" | sudo tee -a /etc/apt/sources.list + sudo apt-get -o Acquire::Retries=3 update + sudo apt-get -o Acquire::Retries=3 install -y pegasus=5.1.1-1+ubuntu24 diff --git a/.github/actions/install-system-deps/action.yml b/.github/actions/install-system-deps/action.yml new file mode 100644 index 00000000000..26a365c12ea --- /dev/null +++ b/.github/actions/install-system-deps/action.yml @@ -0,0 +1,14 @@ +name: Install system packages +description: "Composite action to install common system packages (fftw3, intel-mkl, mpi, graphviz) on Ubuntu runners." + +runs: + using: 'composite' + steps: + - name: Update apt + run: | + sudo apt-get -o Acquire::Retries=3 update + + - name: Install system packages + run: | + set -euxo pipefail + sudo apt-get -o Acquire::Retries=3 install -y *fftw3* intel-mkl* mpi graphviz diff --git a/.github/actions/populate-caches/action.yml b/.github/actions/populate-caches/action.yml new file mode 100644 index 00000000000..c36b16851a7 --- /dev/null +++ b/.github/actions/populate-caches/action.yml @@ -0,0 +1,79 @@ +name: Populate caches (LAL aux + example GW data) +description: "Composite action that restores LAL auxiliary data and example GW data caches and downloads missing files." + +runs: + using: "composite" + steps: + - name: Restore LAL auxiliary data cache + id: restore-lal-aux + uses: actions/cache@v4 + with: + key: lal-aux-data + path: $HOME/lal_aux_data + + - name: Download LAL auxiliary data files on miss + if: ${{ steps.restore-lal-aux.outputs.cache-hit != 'true' }} + run: | + mkdir -p $HOME/lal_aux_data + pushd $HOME/lal_aux_data + curl --show-error --silent --fail --retry 3 --retry-delay 5 --retry-connrefused \ + --remote-name https://zenodo.org/records/14999310/files/SEOBNRv4ROM_v2.0.hdf5 \ + --remote-name https://zenodo.org/records/14999310/files/SEOBNRv4ROM_v3.0.hdf5 + popd + + - name: Restore example GW data cache + name: Populate caches (LAL aux + example GW data) + description: "Composite action that restores LAL auxiliary data and example GW data caches and downloads missing files." + + runs: + using: "composite" + steps: + - name: Restore LAL auxiliary data cache + id: restore-lal-aux + uses: actions/cache@v4 + with: + key: lal-aux-data + path: $HOME/lal_aux_data + + - name: Download LAL auxiliary data files on miss + if: ${{ steps.restore-lal-aux.outputs.cache-hit != 'true' }} + run: | + mkdir -p $HOME/lal_aux_data + pushd $HOME/lal_aux_data + curl --show-error --silent --fail --retry 3 --retry-delay 5 --retry-connrefused \ + --remote-name https://zenodo.org/records/14999310/files/SEOBNRv4ROM_v2.0.hdf5 \ + --remote-name https://zenodo.org/records/14999310/files/SEOBNRv4ROM_v3.0.hdf5 + popd + + - name: Restore example GW data cache + id: restore-example-gw + uses: actions/cache@v4 + with: + key: example-gw-data + path: | + docs/_include/*_TDI_v2.gwf + docs/_include/*_GWOSC_4KHZ_R1-1126257415-4096.gwf + docs/_include/*_LOSC_CLN_4_V1-1187007040-2048.gwf + examples/inference/lisa_smbhb_ldc/*_psd.txt + examples/inference/lisa_smbhb_ldc/*_TDI_v2.gwf + examples/inference/lisa_smbhb_ldc/MBHB_params_v2_LISA_frame.pkl + examples/inference/margtime/*.gwf + examples/inference/multisignal/*.gwf + examples/inference/relative/*.gwf + examples/inference/relmarg/*.gwf + examples/inference/single/*.gwf + examples/search/*.gwf + + - name: Set path outputs for cached data + id: set_paths + run: | + echo "lal_data_path=$HOME/lal_aux_data" >> $GITHUB_OUTPUT + echo "example_gw_cache_key=example-gw-data" >> $GITHUB_OUTPUT + + outputs: + lal_data_path: + description: "Path where LAL auxiliary data is stored on the runner" + value: ${{ steps.set_paths.outputs.lal_data_path }} + example_gw_cache_key: + description: "Cache key used for example GW data" + value: ${{ steps.set_paths.outputs.example_gw_cache_key }} diff --git a/.github/workflows/bank-compress-workflow.yml b/.github/workflows/bank-compress-workflow.yml index 2714dc7ff72..e21cbbb3569 100644 --- a/.github/workflows/bank-compress-workflow.yml +++ b/.github/workflows/bank-compress-workflow.yml @@ -1,4 +1,3 @@ ---- name: compress waveforms into a bank using pegasus + condor on: [push, pull_request] @@ -8,34 +7,22 @@ concurrency: cancel-in-progress: true jobs: - workflow_defaults: - uses: ./.github/workflows/workflow-defaults.yml build: - needs: workflow_defaults runs-on: ubuntu-24.04 timeout-minutes: 90 steps: - uses: actions/checkout@v1 + - name: Load defaults + id: defaults + uses: ./.github/actions/defaults - name: Set up Python uses: actions/setup-python@v5 with: - python-version: ${{ needs.workflow_defaults.outputs.python_version }} - - name: install condor - run: | - wget -qO - https://research.cs.wisc.edu/htcondor/ubuntu/HTCondor-Release.gpg.key | sudo apt-key add - - echo "deb http://research.cs.wisc.edu/htcondor/ubuntu/8.9/focal focal contrib" | sudo tee -a /etc/apt/sources.list - echo "deb-src http://research.cs.wisc.edu/htcondor/ubuntu/8.9/focal focal contrib" | sudo tee -a /etc/apt/sources.list - sudo apt-get -o Acquire::Retries=3 update - sudo apt-get -o Acquire::Retries=3 install minihtcondor - sudo systemctl start condor - sudo systemctl enable condor - - name: install pegasus - run: | - wget -qO - https://download.pegasus.isi.edu/pegasus/gpg.txt | sudo apt-key add - - echo "deb https://download.pegasus.isi.edu/pegasus/ubuntu noble main" | sudo tee -a /etc/apt/sources.list - sudo apt-get -o Acquire::Retries=3 update - sudo apt-get -o Acquire::Retries=3 install pegasus=5.1.1-1+ubuntu24 - - run: sudo apt-get -o Acquire::Retries=3 install *fftw3* intel-mkl* + python-version: ${{ steps.defaults.outputs.python_version }} + - name: Install condor & pegasus + uses: ./.github/actions/install-htcondor-pegasus + - name: Install system dependencies + uses: ./.github/actions/install-system-deps - name: Install pycbc run: | python -m pip install --upgrade pip setuptools diff --git a/.github/workflows/basic-tests.yml b/.github/workflows/basic-tests.yml index acd81ab68cf..8761ab93dc6 100644 --- a/.github/workflows/basic-tests.yml +++ b/.github/workflows/basic-tests.yml @@ -1,4 +1,3 @@ ---- name: basic tests on: [push, pull_request] @@ -8,14 +7,8 @@ concurrency: cancel-in-progress: true jobs: - workflow_defaults: - uses: ./.github/workflows/workflow-defaults.yml - build: - needs: workflow_defaults runs-on: ${{ matrix.os }} - env: - LAL_DATA_PATH: ${{ needs.workflow_defaults.outputs.lal_data_path }} strategy: max-parallel: 60 matrix: @@ -24,14 +17,19 @@ jobs: test-type: [unittest, search, docs] steps: - uses: actions/checkout@v4 + - name: Populate caches (LAL aux + example GW data) + id: populate + uses: ./.github/actions/populate-caches + - name: Expose LAL_DATA_PATH to subsequent steps + run: echo "LAL_DATA_PATH=${{ steps.populate.outputs.lal_data_path }}" >> $GITHUB_ENV - name: Set up Python ${{ matrix.python_version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python_version }} - name: installing system packages + uses: .github/actions/install-system-deps + - name: Install python dependencies run: | - sudo apt-get -o Acquire::Retries=3 update - sudo apt-get -o Acquire::Retries=3 install *fftw3* mpi intel-mkl* graphviz pip install tox pip setuptools --upgrade - name: run pycbc test suite run: | diff --git a/.github/workflows/build_venv.yml b/.github/workflows/build_venv.yml index 18bcd62b03d..6336f84f52e 100644 --- a/.github/workflows/build_venv.yml +++ b/.github/workflows/build_venv.yml @@ -1,4 +1,3 @@ ---- name: build the LVK virtualenv on: [push, pull_request] diff --git a/.github/workflows/check_code.yml b/.github/workflows/check_code.yml index af354c0ac12..f8f8bb6172b 100644 --- a/.github/workflows/check_code.yml +++ b/.github/workflows/check_code.yml @@ -1,19 +1,18 @@ ---- name: Flake8 check on: [pull_request] jobs: - workflow_defaults: - uses: ./.github/workflows/workflow-defaults.yml - flake8_unused_imports: runs-on: ubuntu-latest steps: - name: Check out repository uses: actions/checkout@v3 + - name: Load defaults + id: defaults + uses: ./.github/actions/defaults - name: Set up Python uses: actions/setup-python@v4 with: - python-version: ${{ needs.workflow_defaults.outputs.python_version }} + python-version: ${{ steps.defaults.outputs.python_version }} - name: Install flake8 run: pip install flake8 - name: Checking executables for unused imports diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index d03de544667..fa7136f9a68 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -1,4 +1,3 @@ ---- name: docker build on: [push, pull_request] diff --git a/.github/workflows/inference-workflow.yml b/.github/workflows/inference-workflow.yml index 722866bff1a..1539ac54800 100644 --- a/.github/workflows/inference-workflow.yml +++ b/.github/workflows/inference-workflow.yml @@ -1,36 +1,23 @@ ---- name: run small inference workflow using pegasus + condor on: [push, pull_request] jobs: - workflow_defaults: - uses: ./.github/workflows/workflow-defaults.yml build: - needs: workflow_defaults runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v1 + - name: Load defaults + id: defaults + uses: ./.github/actions/defaults - name: Set up Python uses: actions/setup-python@v5 with: - python-version: ${{ needs.workflow_defaults.outputs.python_version }} - - name: install condor - run: | - wget -qO - https://research.cs.wisc.edu/htcondor/ubuntu/HTCondor-Release.gpg.key | sudo apt-key add - - echo "deb http://research.cs.wisc.edu/htcondor/ubuntu/8.9/focal focal contrib" | sudo tee -a /etc/apt/sources.list - echo "deb-src http://research.cs.wisc.edu/htcondor/ubuntu/8.9/focal focal contrib" | sudo tee -a /etc/apt/sources.list - sudo apt-get -o Acquire::Retries=3 update - sudo apt-get -o Acquire::Retries=3 install minihtcondor - sudo systemctl start condor - sudo systemctl enable condor - - name: install pegasus - run: | - wget -qO - https://download.pegasus.isi.edu/pegasus/gpg.txt | sudo apt-key add - - echo "deb https://download.pegasus.isi.edu/pegasus/ubuntu noble main" | sudo tee -a /etc/apt/sources.list - sudo apt-get -o Acquire::Retries=3 update - sudo apt-get -o Acquire::Retries=3 install pegasus=5.1.1-1+ubuntu24 - - run: sudo apt-get -o Acquire::Retries=3 install *fftw3* intel-mkl* + python-version: ${{ steps.defaults.outputs.python_version }} + - name: install condor and pegasus + uses: ./.github/actions/install-htcondor-pegasus + - name: install system dependecies + uses: ./.github/actions/install-system-deps - name: Install pycbc run: | python -m pip install --upgrade pip setuptools diff --git a/.github/workflows/search-workflow.yml b/.github/workflows/search-workflow.yml index 3117326af70..f337412d997 100644 --- a/.github/workflows/search-workflow.yml +++ b/.github/workflows/search-workflow.yml @@ -7,56 +7,24 @@ concurrency: cancel-in-progress: true jobs: - workflow_defaults: - uses: ./.github/workflows/workflow-defaults.yml build: - needs: workflow_defaults runs-on: ubuntu-24.04 timeout-minutes: 90 env: PEGASUS_METRICS: 'false' steps: - uses: actions/checkout@v1 - - name: Restore LAL auxiliary data cache - id: restore-lal - uses: actions/cache@v4 - with: - key: lal-aux-data - path: | - $HOME/lal_aux_data - - - name: Restore example GW data cache for search example - id: restore-example-gw - uses: actions/cache@v4 - with: - key: ${{ needs.workflow_defaults.outputs.example_gw_cache_key }} - path: | - examples/search - - - name: list restored example files - run: | - echo "Restored files in examples/search:" - ls -la examples/search || true + - name: Load defaults + id: defaults + uses: ./.github/actions/defaults - name: Set up Python uses: actions/setup-python@v5 with: - python-version: ${{ needs.workflow_defaults.outputs.python_version }} - - name: install condor - run: | - wget -qO - https://research.cs.wisc.edu/htcondor/ubuntu/HTCondor-Release.gpg.key | sudo apt-key add - - echo "deb http://research.cs.wisc.edu/htcondor/ubuntu/8.9/focal focal contrib" | sudo tee -a /etc/apt/sources.list - echo "deb-src http://research.cs.wisc.edu/htcondor/ubuntu/8.9/focal focal contrib" | sudo tee -a /etc/apt/sources.list - sudo apt-get -o Acquire::Retries=3 update - sudo apt-get -o Acquire::Retries=3 install minihtcondor - sudo systemctl start condor - sudo systemctl enable condor - - name: install pegasus - run: | - wget -qO - https://download.pegasus.isi.edu/pegasus/gpg.txt | sudo apt-key add - - echo "deb https://download.pegasus.isi.edu/pegasus/ubuntu noble main" | sudo tee -a /etc/apt/sources.list - sudo apt-get -o Acquire::Retries=3 update - sudo apt-get -o Acquire::Retries=3 install pegasus=5.1.1-1+ubuntu24 - - run: sudo apt-get -o Acquire::Retries=3 install *fftw3* intel-mkl* + python-version: ${{ steps.defaults.outputs.python_version }} + - name: Install condor & pegasus + uses: ./.github/actions/install-htcondor-pegasus + - name: installing system packages + uses: .github/actions/install-system-deps - name: Install pycbc run: | python -m pip install --upgrade pip setuptools diff --git a/.github/workflows/tmpltbank-workflow.yml b/.github/workflows/tmpltbank-workflow.yml index 1a20238acdc..3ecedf52548 100644 --- a/.github/workflows/tmpltbank-workflow.yml +++ b/.github/workflows/tmpltbank-workflow.yml @@ -1,4 +1,3 @@ ---- name: run small template bank generation using pegasus + condor on: [push, pull_request] @@ -8,33 +7,21 @@ concurrency: cancel-in-progress: true jobs: - workflow_defaults: - uses: ./.github/workflows/workflow-defaults.yml build: - needs: workflow_defaults runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v1 + - name: Load defaults + id: defaults + uses: ./.github/actions/defaults - name: Set up Python uses: actions/setup-python@v5 with: - python-version: ${{ needs.workflow_defaults.outputs.python_version }} - - name: install condor - run: | - wget -qO - https://research.cs.wisc.edu/htcondor/ubuntu/HTCondor-Release.gpg.key | sudo apt-key add - - echo "deb http://research.cs.wisc.edu/htcondor/ubuntu/8.9/focal focal contrib" | sudo tee -a /etc/apt/sources.list - echo "deb-src http://research.cs.wisc.edu/htcondor/ubuntu/8.9/focal focal contrib" | sudo tee -a /etc/apt/sources.list - sudo apt-get -o Acquire::Retries=3 update - sudo apt-get -o Acquire::Retries=3 install minihtcondor - sudo systemctl start condor - sudo systemctl enable condor - - name: install pegasus - run: | - wget -qO - https://download.pegasus.isi.edu/pegasus/gpg.txt | sudo apt-key add - - echo "deb https://download.pegasus.isi.edu/pegasus/ubuntu noble main" | sudo tee -a /etc/apt/sources.list - sudo apt-get -o Acquire::Retries=3 update - sudo apt-get -o Acquire::Retries=3 install pegasus=5.1.1-1+ubuntu24 - - run: sudo apt-get -o Acquire::Retries=3 install *fftw3* intel-mkl* + python-version: ${{ steps.defaults.outputs.python_version }} + - name: Install condor & pegasus + uses: ./.github/actions/install-htcondor-pegasus + - name: Install system dependencies + uses: ./.github/actions/install-system-deps - name: Install pycbc run: | python -m pip install --upgrade pip setuptools diff --git a/.github/workflows/tut-test.yml b/.github/workflows/tut-test.yml index e9bc05b0c0b..6973c83e87e 100644 --- a/.github/workflows/tut-test.yml +++ b/.github/workflows/tut-test.yml @@ -1,4 +1,3 @@ ---- name: tutorial tests on: [push, pull_request] @@ -21,10 +20,10 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python_version }} - - name: installing packages + - name: Install system dependencies + uses: ./.github/actions/install-system-deps + - name: installing python packages run: | - sudo apt-get -o Acquire::Retries=3 update - sudo apt-get -o Acquire::Retries=3 install *fftw3* mpi intel-mkl* pip install tox pip setuptools notebook --upgrade pip install . - name: retrieving pycbc tutorials diff --git a/.github/workflows/workflow-defaults.yml b/.github/workflows/workflow-defaults.yml deleted file mode 100644 index a3e7fabb408..00000000000 --- a/.github/workflows/workflow-defaults.yml +++ /dev/null @@ -1,85 +0,0 @@ ---- -# Provide default values used across workflows. -# Add new defaults (inputs) here and expose them as outputs so other -# workflows can consume them via `needs..outputs.`. -on: - workflow_call: - inputs: - python-version: - description: 'Default Python version for workflows' - required: false - type: string - default: '3.11' - outputs: - python_version: - description: 'Python version string to use in workflows' - value: ${{ jobs.provide.outputs.python_version }} - lal_data_path: - description: 'Path where LAL auxiliary data is cached on the runner' - value: ${{ jobs.provide.outputs.lal_data_path }} - example_gw_cache_key: - description: 'Cache key used for example GW data (useful when restoring cache)' - value: ${{ jobs.provide.outputs.example_gw_cache_key }} - - -jobs: - provide: - runs-on: ubuntu-latest - outputs: - python_version: ${{ steps.set.outputs.python_version }} - lal_data_path: ${{ steps.set_paths.outputs.lal_data_path }} - example_gw_cache_key: ${{ steps.set_paths.outputs.example_gw_cache_key }} - - steps: - - id: set - run: | - # Export inputs as outputs via GITHUB_OUTPUT so other jobs can use them - echo "python_version=${{ inputs.python-version }}" >> $GITHUB_OUTPUT - - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Cache LAL auxiliary data files - id: cache-lal-aux-data - uses: actions/cache@v4 - with: - key: lal-aux-data - path: $HOME/lal_aux_data - - - if: ${{ steps.cache-lal-aux-data.outputs.cache-hit != 'true' }} - name: Download LAL auxiliary data files - run: | - mkdir -p $HOME/lal_aux_data - pushd $HOME/lal_aux_data - # Retry transient network errors up to 3 times with a short delay - curl --show-error --silent --fail --retry 3 --retry-delay 5 --retry-connrefused \ - --remote-name https://zenodo.org/records/14999310/files/SEOBNRv4ROM_v2.0.hdf5 \ - --remote-name https://zenodo.org/records/14999310/files/SEOBNRv4ROM_v3.0.hdf5 - popd - - - name: Cache example GW data - id: cache-example-gw-data - uses: actions/cache@v4 - with: - key: example-gw-data - path: | - docs/_include/*_TDI_v2.gwf - docs/_include/*_GWOSC_4KHZ_R1-1126257415-4096.gwf - docs/_include/*_LOSC_CLN_4_V1-1187007040-2048.gwf - examples/inference/lisa_smbhb_ldc/*_psd.txt - examples/inference/lisa_smbhb_ldc/*_TDI_v2.gwf - examples/inference/lisa_smbhb_ldc/MBHB_params_v2_LISA_frame.pkl - examples/inference/margtime/*.gwf - examples/inference/multisignal/*.gwf - examples/inference/relative/*.gwf - examples/inference/relmarg/*.gwf - examples/inference/single/*.gwf - examples/search/*.gwf - - - id: set_paths - name: Set path outputs for cached data - run: | - # Expose the LAL data path and cache key so callers can reference them - echo "lal_data_path=$HOME/lal_aux_data" >> $GITHUB_OUTPUT - echo "example_gw_cache_key=example-gw-data" >> $GITHUB_OUTPUT - diff --git a/.github/workflows/workflow-tests.yml b/.github/workflows/workflow-tests.yml index ecaaf077e54..03c3198f6ef 100644 --- a/.github/workflows/workflow-tests.yml +++ b/.github/workflows/workflow-tests.yml @@ -1,4 +1,3 @@ ---- name: run generic example workflow tests on: [push, pull_request] @@ -8,8 +7,6 @@ concurrency: cancel-in-progress: true jobs: - workflow_defaults: - uses: ./.github/workflows/workflow-defaults.yml build: runs-on: ${{ matrix.os }} strategy: @@ -19,26 +16,17 @@ jobs: test-type: [simple_subworkflow_data, multilevel_subworkflow_data] steps: - uses: actions/checkout@v1 + - name: Load defaults + id: defaults + uses: ./.github/actions/defaults - name: Set up Python uses: actions/setup-python@v5 with: - python-version: ${{ needs.workflow_defaults.outputs.python_version }} - - name: install condor - run: | - wget -qO - https://research.cs.wisc.edu/htcondor/ubuntu/HTCondor-Release.gpg.key | sudo apt-key add - - echo "deb http://research.cs.wisc.edu/htcondor/ubuntu/8.9/focal focal contrib" | sudo tee -a /etc/apt/sources.list - echo "deb-src http://research.cs.wisc.edu/htcondor/ubuntu/8.9/focal focal contrib" | sudo tee -a /etc/apt/sources.list - sudo apt-get -o Acquire::Retries=3 update - sudo apt-get -o Acquire::Retries=3 install minihtcondor - sudo systemctl start condor - sudo systemctl enable condor - - name: install pegasus - run: | - wget -qO - https://download.pegasus.isi.edu/pegasus/gpg.txt | sudo apt-key add - - echo "deb https://download.pegasus.isi.edu/pegasus/ubuntu noble main" | sudo tee -a /etc/apt/sources.list - sudo apt-get -o Acquire::Retries=3 update - sudo apt-get -o Acquire::Retries=3 install pegasus=5.1.1-1+ubuntu24 - - run: sudo apt-get -o Acquire::Retries=3 install *fftw3* intel-mkl* + python-version: ${{ steps.defaults.outputs.python_version }} + - name: Install condor & pegasus + uses: ./.github/actions/install-htcondor-pegasus + - name: Install system dependencies + uses: ./.github/actions/install-system-deps - name: Install pycbc run: | python -m pip install --upgrade pip setuptools From 3e6d0689ed9fa8639b1ac2226560cfb4daf22577 Mon Sep 17 00:00:00 2001 From: Gareth S Cabourn Davies Date: Tue, 27 Jan 2026 15:27:54 +0000 Subject: [PATCH 17/18] add shell to defaults action --- .github/actions/defaults/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/defaults/action.yml b/.github/actions/defaults/action.yml index 09ffc877caf..f45a75226c1 100644 --- a/.github/actions/defaults/action.yml +++ b/.github/actions/defaults/action.yml @@ -13,6 +13,7 @@ runs: - id: set run: | echo "python_version=${{ inputs.python-version }}" >> $GITHUB_OUTPUT + shell: bash outputs: python_version: From 9f09386b22098fb21085aee5e9fda51cc1dcb6a9 Mon Sep 17 00:00:00 2001 From: Gareth S Cabourn Davies Date: Tue, 27 Jan 2026 15:31:02 +0000 Subject: [PATCH 18/18] add shell to other action runs --- .github/actions/install-htcondor-pegasus/action.yml | 2 ++ .github/actions/install-system-deps/action.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/actions/install-htcondor-pegasus/action.yml b/.github/actions/install-htcondor-pegasus/action.yml index 24d198e3a57..42ae6265eb5 100644 --- a/.github/actions/install-htcondor-pegasus/action.yml +++ b/.github/actions/install-htcondor-pegasus/action.yml @@ -4,6 +4,7 @@ runs: using: "composite" steps: - name: Install HTCondor + shell: bash run: | wget -qO - https://research.cs.wisc.edu/htcondor/ubuntu/HTCondor-Release.gpg.key | sudo apt-key add - echo "deb http://research.cs.wisc.edu/htcondor/ubuntu/8.9/focal focal contrib" | sudo tee -a /etc/apt/sources.list @@ -15,6 +16,7 @@ runs: sudo systemctl enable condor || true - name: Install Pegasus + shell: bash run: | wget -qO - https://download.pegasus.isi.edu/pegasus/gpg.txt | sudo apt-key add - echo "deb https://download.pegasus.isi.edu/pegasus/ubuntu noble main" | sudo tee -a /etc/apt/sources.list diff --git a/.github/actions/install-system-deps/action.yml b/.github/actions/install-system-deps/action.yml index 26a365c12ea..fedb526481d 100644 --- a/.github/actions/install-system-deps/action.yml +++ b/.github/actions/install-system-deps/action.yml @@ -5,10 +5,12 @@ runs: using: 'composite' steps: - name: Update apt + shell: bash run: | sudo apt-get -o Acquire::Retries=3 update - name: Install system packages + shell: bash run: | set -euxo pipefail sudo apt-get -o Acquire::Retries=3 install -y *fftw3* intel-mkl* mpi graphviz