Skip to content

Added an option to select models based on a reverse ranking #3754

Added an option to select models based on a reverse ranking

Added an option to select models based on a reverse ranking #3754

Workflow file for this run

---
name: ci
on:
pull_request:
branches: [main]
workflow_dispatch: ~
schedule:
- cron: "0 */6 * * *" # every 6 hours
jobs:
# Detect which file categories changed so downstream jobs can filter themselves.
# On non-PR events (schedule, workflow_dispatch) all outputs are forced to true.
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
contents: read
outputs:
python: ${{ github.event_name != 'pull_request' || steps.filter.outputs.python_any_changed == 'true' }}
docker: ${{ github.event_name != 'pull_request' || steps.filter.outputs.docker_any_changed == 'true' }}
steps:
- uses: actions/checkout@v5
- uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47
id: filter
with:
files_yaml: |
python:
- src/**
- tests/**
- integration_tests/**
- end-to-end_tests/**
- docs/**
- pyproject.toml
- setup.py
docker:
- Dockerfile
- src/**
- pyproject.toml
- setup.py
format:
needs: [changes]
if: needs.changes.outputs.python == 'true'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
- uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47
id: changed-files
with:
files: |
**/*.py
- name: check formatting on changed files
if: steps.changed-files.outputs.any_changed == 'true'
run: uvx ruff format --check --diff ${{ steps.changed-files.outputs.all_changed_files }}
# Full suite on Linux + Python 3.14: unit tests, coverage, integration, e2e, docs.
test-linux-py314:
needs: [changes, format]
if: needs.changes.outputs.python == 'true'
runs-on: ubuntu-latest
permissions:
contents: read
actions: read
checks: write
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y openmpi-bin libopenmpi3 libopenmpi-dev
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
- name: install haddock3 with extra dependencies
run: uv sync --extra mpi --extra dev --extra docs --extra notebooks --extra deeprank-gnn-esm
- name: install openmm
# Not a pyproject.toml extra: pdbfixer has no PyPI release and is
# installed from a direct GitHub URL
run: uv pip install openmm "pdbfixer @ https://github.com/openmm/pdbfixer/archive/refs/tags/v1.10.tar.gz"
- name: run unit tests
run: uv run pytest -x -v --random-order tests/ --cov --cov-report=
- name: generate coverage report
run: |
uv run coverage report
uv run coverage xml
- uses: codacy/codacy-coverage-reporter-action@89d6c85cfafaec52c72b6c5e8b2878d33104c699 # v1
if: github.event.pull_request.head.repo.full_name == github.repository
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ./coverage.xml
- name: run integration tests
run: uv run pytest -x -v --random-order integration_tests/
- name: run end to end tests
run: uv run pytest -x -v --random-order --no-cov end-to-end_tests/
- name: check if docs are buildable
working-directory: docs
run: uv run make html
# Run the remaining OSxPython combinations in parallel
test-matrix:
needs: [changes, format]
if: needs.changes.outputs.python == 'true'
runs-on: ${{ matrix.os }}
permissions:
contents: read
actions: read
checks: write
strategy:
matrix:
# ubuntu-latest = linux-x86_64
# ubuntu-24.04-arm = linux-aarch64
# macos-latest = macos-arm64
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest]
# Test only newest and oldest python version
# > versions in the middle are unlikely to have compatibility issues
python-version: ["3.10", "3.14"]
exclude:
# Already covered by test-linux-py314, don't run again
- os: ubuntu-latest
python-version: "3.14"
fail-fast: true
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: install system dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y openmpi-bin libopenmpi3 libopenmpi-dev
- name: install system dependencies (macOS)
if: runner.os == 'macOS'
run: brew install open-mpi
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
- name: install haddock3 with extra dependencies
run: uv sync --extra mpi --extra dev --extra docs --extra notebooks --extra deeprank-gnn-esm
- name: run unit tests
run: uv run pytest -x -v --random-order tests/
- name: run integration tests
run: uv run pytest -x -v --random-order integration_tests/
# Verify the Docker image still builds successfully (image is not pushed)
docker-build:
needs: [changes]
if: needs.changes.outputs.docker == 'true'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v5
- uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- name: build docker image
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5
with:
context: .
push: false