Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
11639a4
Add unused variable check to flake8, use vulture for unreachable code
GarethCabournDavies Jan 23, 2026
c40595a
Make changes to workflo files, add workflow defaults so that there is…
GarethCabournDavies Jan 23, 2026
c8a49fc
revert distribution.yml to have explicit versions
GarethCabournDavies Jan 23, 2026
1c78d4d
Remove cache default
GarethCabournDavies Jan 23, 2026
5fca205
revert un-needed changes
GarethCabournDavies Jan 23, 2026
a42a0ff
Fix the workflow defaults job
GarethCabournDavies Jan 23, 2026
a7804ce
Fail only on unused imports, report on unused variables
GarethCabournDavies Jan 23, 2026
da405a6
Revert to previously-working test syntax
GarethCabournDavies Jan 23, 2026
f098f98
Remove unreachable code so that tests can actually pass
GarethCabournDavies Jan 23, 2026
44e3f08
Copilot says that the defaults code won't work, it seems to work but …
GarethCabournDavies Jan 23, 2026
882b5e2
Add caching to the search workflow
GarethCabournDavies Jan 26, 2026
42e05d1
Add file caching to the shared workflow defaults
GarethCabournDavies Jan 26, 2026
040009a
remove comment
GarethCabournDavies Jan 26, 2026
554b8a2
remove unrelated changes
GarethCabournDavies Jan 27, 2026
8827a5a
copilot siuggestions / yaml should supposedly have this at the start …
GarethCabournDavies Jan 27, 2026
b5c309f
use actions for single source of truth
GarethCabournDavies Jan 27, 2026
3e6d068
add shell to defaults action
GarethCabournDavies Jan 27, 2026
9f09386
add shell to other action runs
GarethCabournDavies Jan 27, 2026
309e836
Merge branch 'gwastro:master' into ci_single_source_of_truth
GarethCabournDavies Jan 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/actions/defaults/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
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
shell: bash

outputs:
python_version:
description: "Python version string"
value: ${{ steps.set.outputs.python_version }}
24 changes: 24 additions & 0 deletions .github/actions/install-htcondor-pegasus/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Install HTCondor and Pegasus
description: "Composite action to install HTCondor and Pegasus on Ubuntu runners."
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
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
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
sudo apt-get -o Acquire::Retries=3 update
sudo apt-get -o Acquire::Retries=3 install -y pegasus=5.1.1-1+ubuntu24
16 changes: 16 additions & 0 deletions .github/actions/install-system-deps/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
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
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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that here I have included a few things which weren't used everywhere, but I don think it is too expensive to run these install as well?

79 changes: 79 additions & 0 deletions .github/actions/populate-caches/action.yml
Original file line number Diff line number Diff line change
@@ -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 }}
25 changes: 8 additions & 17 deletions .github/workflows/bank-compress-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,17 @@ jobs:
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: '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*
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
Expand Down
52 changes: 11 additions & 41 deletions .github/workflows/basic-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,67 +13,37 @@ 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']
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The - in GitHub variables can sometimes be misconstrued as negation, so underscores are safer

test-type: [unittest, search, docs]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
- 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 }}
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: 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
- 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'
if: matrix.test-type == 'docs' && matrix.python_version == '3.12'
uses: actions/upload-artifact@v4
with:
name: documentation-page
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/check_code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ jobs:
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: 3.11
python-version: ${{ steps.defaults.outputs.python_version }}
- name: Install flake8
run: pip install flake8
- name: Checking executables for unused imports
Expand Down
25 changes: 8 additions & 17 deletions .github/workflows/inference-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,17 @@ jobs:
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: '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*
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
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/mac-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
max-parallel: 4
matrix:
os: [macos-latest]
python-version:
python_version:
- '3.11'
- '3.12'
- '3.13'
Expand All @@ -32,16 +32,16 @@ jobs:
# increment to reset cache
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ matrix.python-version}}-${{ env.CACHE_NUMBER }}
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 }}
python-version: ${{ matrix.python_version }}

- name: Conda info
run: conda info --all
Expand Down
25 changes: 8 additions & 17 deletions .github/workflows/search-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,17 @@ jobs:
PEGASUS_METRICS: 'false'
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: '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*
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
Expand Down
Loading
Loading