Skip to content

Commit 1e0ccf7

Browse files
committed
Streamlines RMG installation in CI and docs build
Removes redundant RMG-Py and RMG-database checkouts and caching from CI and documentation build workflows. This change simplifies the setup by utilizing micromamba to manage the RMG environment, ensuring consistent and efficient installation of necessary dependencies. It now directly installs RMG via `conda` and sets the correct path for the RMG database.
1 parent 05dfe38 commit 1e0ccf7

5 files changed

Lines changed: 9 additions & 76 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -71,23 +71,6 @@ jobs:
7171
echo "::endgroup::"
7272
julia --version # Check that Julia is installed correctly
7373
74-
- name: Set RMG-Py + database in PATH and PYTHONPATH
75-
shell: micromamba-shell {0}
76-
working-directory: ARC
77-
run: |
78-
# bash devtools/install_rmg.sh
79-
echo "RMG_PY_PATH=$(realpath ../RMG-Py)" >> $GITHUB_ENV
80-
echo "RMG_DB_PATH=$(realpath ../RMG-database)" >> $GITHUB_ENV
81-
echo "PATH=$(realpath ../RMG-Py):$PATH" >> $GITHUB_ENV
82-
echo "PYTHONPATH=$(realpath ../RMG-Py):$PYTHONPATH" >> $GITHUB_ENV
83-
84-
- name: Cache RMG-Py source
85-
uses: actions/cache@v4
86-
with:
87-
path: RMG-Py
88-
key: ${{ runner.os }}-rmgpy-${{ hashFiles('ARC/devtools/install_rmg.sh') }}
89-
restore-keys: ${{ runner.os }}-rmgpy-
90-
9174
- name: Install all extras - CI
9275
shell: micromamba-shell {0}
9376
working-directory: ARC

.github/workflows/gh-pages.yml

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,34 +20,17 @@ jobs:
2020
path: ARC
2121
fetch-depth: 1
2222

23-
# ── pull RMG sources ────────────────────────────────────────
24-
- name: Checkout RMG‑Py
25-
uses: actions/checkout@v4
26-
with:
27-
repository: ReactionMechanismGenerator/RMG-Py
28-
path: RMG-Py
29-
fetch-depth: 1
30-
31-
- name: Checkout RMG‑database
32-
uses: actions/checkout@v4
33-
with:
34-
repository: ReactionMechanismGenerator/RMG-database
35-
path: RMG-database
36-
fetch-depth: 1
37-
38-
# ── build‑only env ───────────────────────────────────────────
23+
# ── rmg_env for Arkane/database availability ───────────────
3924
- name: Set up micromamba (rmg_env)
4025
uses: mamba-org/setup-micromamba@v2
4126
with:
4227
environment-name: rmg_env
43-
environment-file: RMG-Py/environment.yml
28+
create-args: >-
29+
-c rmg -c conda-forge python=3.9 numpy<2 rmg=3.3.0 connie::symmetry
4430
cache-environment: true
4531
cache-downloads: true
4632
generate-run-shell: false
4733

48-
- name: Build RMG‑Py in rmg_env
49-
run: micromamba run -n rmg_env make -C RMG-Py -j"$(nproc)"
50-
5134
# ── docs env (wrapper shell) ────────────────────────────────
5235
- name: Set up micromamba (arc_env)
5336
uses: mamba-org/setup-micromamba@v2
@@ -77,9 +60,8 @@ jobs:
7760
# ── build HTML docs ─────────────────────────────────────────
7861
- name: Set env vars & Build docs
7962
run: |
80-
export RMG_PATH="$GITHUB_WORKSPACE/RMG-Py"
81-
export RMG_DB_PATH="$GITHUB_WORKSPACE/RMG-database"
82-
export PYTHONPATH="$GITHUB_WORKSPACE/RMG-Py:$GITHUB_WORKSPACE/ARC:$PYTHONPATH"
63+
export RMG_DB_PATH="$MAMBA_ROOT_PREFIX/envs/rmg_env/share/RMG-database"
64+
export PYTHONPATH="$GITHUB_WORKSPACE/ARC:$PYTHONPATH"
8365
export PATH="$GITHUB_WORKSPACE/ARC:$PATH"
8466
make -C ARC/docs html
8567
shell: micromamba-shell {0}

.github/workflows/update-cache.yml

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -21,42 +21,6 @@ jobs:
2121
- name: Checkout ARC
2222
uses: actions/checkout@v4
2323

24-
# ────────── RMG‑Py ──────────
25-
- name: Cache RMG
26-
id: cache-rmg
27-
uses: actions/cache@v4
28-
with:
29-
path: RMG-Py
30-
key: ${{ runner.os }}-rmg-main
31-
restore-keys: |
32-
${{ runner.os }}-rmg-
33-
- name: Checkout RMG-Py
34-
if: steps.cache-rmg.outputs.cache-hit != 'true'
35-
uses: actions/checkout@v4
36-
with:
37-
repository: ReactionMechanismGenerator/RMG-Py
38-
path: RMG-Py
39-
ref: 55464c54d1fa61b531e865682df598d33718597d
40-
fetch-depth: 1
41-
42-
# ────────── RMG‑database ──────────
43-
- name: Cache RMG-database
44-
id: cache-rmg-db
45-
uses: actions/cache@v4
46-
with:
47-
path: RMG-database
48-
key: ${{ runner.os }}-rmgdb-main
49-
restore-keys: |
50-
${{ runner.os }}-rmgdb-
51-
- name: Checkout RMG-database
52-
if: steps.cache-rmg-db.outputs.cache-hit != 'true'
53-
uses: actions/checkout@v4
54-
with:
55-
repository: ReactionMechanismGenerator/RMG-database
56-
path: RMG-database
57-
ref: main
58-
fetch-depth: 1
59-
6024
# ────────── AutoTST ──────────
6125
- name: Cache AutoTST
6226
id: cache-autotst

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,6 @@ build/*
6767

6868
*.log
6969
*.xml
70+
71+
# AI Agent files
72+
AGENTS.md

devtools/install_rmg.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ if [[ "$MODE" == "source" ]]; then
129129
else
130130
echo ">>> Creating new environment: $ENV_NAME"
131131
$COMMAND_PKG env create -n "$ENV_NAME" -f environment.yml -y --strict-channel-priority
132+
fi
132133

133134
###############################################################################
134135
# COMPILE RMG

0 commit comments

Comments
 (0)