-
Notifications
You must be signed in to change notification settings - Fork 5
157 lines (137 loc) · 4.28 KB
/
Copy pathci.yml
File metadata and controls
157 lines (137 loc) · 4.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
name: CI
on:
push:
branches: [main, refactor_namer, tests]
pull_request:
branches: ["**"]
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