Skip to content

Commit 6018ec9

Browse files
authored
Merge pull request #164 from ReactionMechanismGenerator/migration
T3 Migration
2 parents f3dcc84 + 8317c17 commit 6018ec9

139 files changed

Lines changed: 257533 additions & 5224 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
groups:
8+
actions:
9+
patterns:
10+
- "*"

.github/labeler.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
name: T3 CI
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches: [main]
7+
types: [opened, synchronize, reopened]
8+
schedule:
9+
- cron: '0 0 * * *'
10+
11+
jobs:
12+
lint:
13+
name: Lint (ruff)
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: astral-sh/ruff-action@v3
18+
with:
19+
args: "check ."
20+
21+
build-and-test:
22+
name: Build and Test T3
23+
runs-on: ubuntu-latest
24+
defaults:
25+
run:
26+
shell: bash -el {0}
27+
28+
steps:
29+
# 1. Checkout T3 (The repo running this CI)
30+
- name: Checkout T3
31+
uses: actions/checkout@v4
32+
with:
33+
path: T3
34+
35+
# 2. Checkout ARC (Dependency)
36+
- name: Checkout ARC
37+
uses: actions/checkout@v4
38+
with:
39+
repository: ReactionMechanismGenerator/ARC
40+
ref: linear_ts
41+
path: ARC
42+
43+
# 3. Checkout RMG Database
44+
- name: Checkout RMG Database
45+
uses: actions/checkout@v4
46+
with:
47+
repository: ReactionMechanismGenerator/RMG-database
48+
path: RMG-database
49+
ref: main
50+
fetch-depth: 1
51+
52+
# 4. Checkout RMG-Py (needed at runtime for the rmg_env subprocess)
53+
- name: Checkout RMG-Py
54+
uses: actions/checkout@v4
55+
with:
56+
repository: ReactionMechanismGenerator/RMG-Py
57+
path: RMG-Py
58+
ref: xTB
59+
fetch-depth: 1
60+
61+
# 5. Clean Disk (Important for heavy conda envs)
62+
- name: Clean Ubuntu Image
63+
uses: jlumbroso/free-disk-space@main
64+
with:
65+
tool-cache: true
66+
android: true
67+
dotnet: true
68+
haskell: true
69+
large-packages: true
70+
swap-storage: true
71+
72+
# 6. Setup T3 Environment
73+
- name: Set up micromamba (t3_env)
74+
uses: mamba-org/setup-micromamba@v2
75+
with:
76+
environment-name: t3_env
77+
environment-file: T3/environment.yml
78+
cache-environment: true
79+
generate-run-shell: true
80+
81+
# 7. Setup RMG Environment (rmg_env) — required by all T3 tests that
82+
- name: Set up micromamba (rmg_env)
83+
uses: mamba-org/setup-micromamba@v2
84+
with:
85+
environment-name: rmg_env
86+
environment-file: RMG-Py/environment.yml
87+
cache-environment: true
88+
generate-run-shell: false
89+
create-args: >-
90+
--channel-priority flexible
91+
92+
# 8. Compile RMG-Py (Cython extensions, in rmg_env)
93+
- name: Compile RMG-Py
94+
shell: bash -el {0}
95+
working-directory: RMG-Py
96+
run: |
97+
micromamba run -n rmg_env make
98+
echo "PYTHONPATH=${{ github.workspace }}/RMG-Py" >> $GITHUB_ENV
99+
100+
# 9. Install & Compile ARC (Dependency, into t3_env)
101+
- name: Install and Compile ARC
102+
shell: micromamba-shell {0}
103+
working-directory: ARC
104+
run: |
105+
echo "::group::Install PyRDL (The ARC Way)"
106+
bash devtools/install_pyrdl.sh t3_env
107+
echo "::endgroup::"
108+
109+
echo "::group::Compile ARC extensions"
110+
make compile
111+
echo "::endgroup::"
112+
113+
echo "::group::Install ARC in editable mode"
114+
pip install -e .
115+
echo "::endgroup::"
116+
117+
# 9b. Install xTB into its own xtb_env (used by ARC for gfn2 jobs)
118+
- name: Install xTB
119+
shell: bash -el {0}
120+
working-directory: ARC
121+
run: bash devtools/install_xtb.sh
122+
123+
# 10. Install T3 (Self)
124+
- name: Install T3
125+
shell: micromamba-shell {0}
126+
working-directory: T3
127+
run: |
128+
pip install -e .
129+
130+
# 11. Run T3 Tests
131+
- name: Run Tests
132+
shell: micromamba-shell {0}
133+
working-directory: T3
134+
run: |
135+
echo "Running T3 Tests..."
136+
export PYTHONPATH="$PYTHONPATH:$(pwd):${{ github.workspace }}/ARC:${{ github.workspace }}/RMG-Py"
137+
export RMG_DB_PATH="${{ github.workspace }}/RMG-database"
138+
139+
# Run pytest on the T3 tests directory
140+
pytest tests/ --cov=t3 --cov-report=xml -ra -vv
141+
142+
# 9. Upload Coverage
143+
- name: Upload coverage data
144+
uses: codecov/codecov-action@v5
145+
with:
146+
token: ${{ secrets.CODECOV_TOKEN }}
147+
file: T3/coverage.xml
148+
flags: unittests
149+
name: codecov-t3
150+
fail_ci_if_error: false

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@ jobs:
2525

2626
steps:
2727
- name: Checkout repository
28-
uses: actions/checkout@v3
28+
uses: actions/checkout@v4
2929

3030
- name: Initialize CodeQL
31-
uses: github/codeql-action/init@v2
31+
uses: github/codeql-action/init@v3
3232
with:
3333
languages: ${{ matrix.language }}
3434
queries: security-and-quality
3535

3636
- name: Autobuild
37-
uses: github/codeql-action/autobuild@v2
37+
uses: github/codeql-action/autobuild@v3
3838

3939
- name: Perform CodeQL Analysis
40-
uses: github/codeql-action/analyze@v2
40+
uses: github/codeql-action/analyze@v3
4141
with:
4242
category: "/language:${{matrix.language}}"

.github/workflows/cont_int.yml

Lines changed: 0 additions & 181 deletions
This file was deleted.

0 commit comments

Comments
 (0)