Skip to content

Revert "Fix/issue 52 large backbones" #156

Revert "Fix/issue 52 large backbones"

Revert "Fix/issue 52 large backbones" #156

Workflow file for this run

name: CI
on:
push:
branches: [main,tests]
pull_request:
branches: ["**"]
types: [opened, synchronize, reopened, edited]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install ruff
run: pip install "ruff==0.15.15"
- name: Ruff check
run: ruff check src/openclatura
- name: Ruff format check
run: ruff format --check src/openclatura
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Set up JDK (for OPSIN)
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "17"
- name: Install package
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run fast tests
run: |
pytest -m "not slow and not dataset and not golden" \
--maxfail=20 \
--durations=20
rdkit-compat:
# Strict golden-output regression across RDKit versions. Detects
# naming output that drifts with the RDKit upgrade cycle (aromaticity,
# kekulisation, H-count perception). Each matrix row pins a specific
# rdkit and runs only the `golden` test.
runs-on: ubuntu-latest
needs: [lint]
strategy:
fail-fast: false
matrix:
rdkit-version:
- "2024.03.6"
- "2024.09.6"
- "2025.03.6"
- "2025.09.5"
- "2026.3.2"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- name: Install package + pinned rdkit
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
pip install --force-reinstall --no-deps "rdkit==${{ matrix.rdkit-version }}"
- name: Show installed versions
run: |
python -c "import rdkit, sys; print('python', sys.version); print('rdkit', rdkit.__version__)"
- name: Run golden corpus test
run: pytest -m golden -v --no-header -rA
docker:
needs: [lint, test, rdkit-compat]
permissions:
contents: read
packages: write
uses: ./.github/workflows/docker-image.yml
secrets: inherit
paper-evaluations:
if: github.event_name == 'pull_request' && github.base_ref == 'tests'
needs: [lint, test, rdkit-compat]
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
max-parallel: 3
matrix:
shard:
- qm9/qm9_all
- pubchem/pubchem_seed5_100000
- pubchem/pubchem_seed17_100000
- pubchem/pubchem_seed42_100000
- pubchem/pubchem_seed63_100000
- pubchem/pubchem_seed87_100000
- zinc22/zinc22_seed5_100000
- zinc22/zinc22_seed17_100000
- zinc22/zinc22_seed42_100000
- zinc22/zinc22_seed63_100000
- zinc22/zinc22_seed87_100000
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- name: Set up JDK for changed-name OPSIN checks
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "17"
- name: Install OpenClatura and regression dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Compare against the paper evaluation
run: |
python evaluations/check_regression.py \
"evaluations/results/${{ matrix.shard }}_openclatura.jsonl" \
--processes auto \
--report "regression-reports/${{ strategy.job-index }}.json"
- name: Upload discrepancy report
if: always()
uses: actions/upload-artifact@v4
with:
name: evaluation-regression-${{ strategy.job-index }}
path: regression-reports/*.json
if-no-files-found: error