Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 64 additions & 23 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,63 +1,104 @@
repo:
- ./*

- changed-files:
- any-glob-to-any-file:
- './*'

examples:
- examples/**/*
- changed-files:
- any-glob-to-any-file:
- 'examples/**/*'

tests:
- arc/**/*Tests.py
- changed-files:
- any-glob-to-any-file:
- 'arc/**/*Tests.py'

'Module: Conformers':
- arc/species/conformers.py
- changed-files:
- any-glob-to-any-file:
- 'arc/species/conformers.py'

'Module: Mapping':
- arc/mapping/*
- changed-files:
- any-glob-to-any-file:
- 'arc/mapping/*'

'Module: Converter':
- arc/species/converter.py
- changed-files:
- any-glob-to-any-file:
- 'arc/species/converter.py'

'Module: Job':
- arc/job/job.py
- changed-files:
- any-glob-to-any-file:
- 'arc/job/job.py'

'Module: Local':
- arc/job/local.py
- changed-files:
- any-glob-to-any-file:
- 'arc/job/local.py'

'Module: Main':
- arc/main.py
- changed-files:
- any-glob-to-any-file:
- 'arc/main.py'

'Module: Parser':
- arc/parser.py
- changed-files:
- any-glob-to-any-file:
- 'arc/parser.py'

'Module: Plotter':
- arc/plotter.py
- changed-files:
- any-glob-to-any-file:
- 'arc/plotter.py'

'Module: Processor':
- arc/processor.py
- changed-files:
- any-glob-to-any-file:
- 'arc/processor.py'

'Module: Reaction':
- arc/reaction.py
- changed-files:
- any-glob-to-any-file:
- 'arc/reaction.py'

'Module: rmgdb':
- arc/rmgdb.py
- changed-files:
- any-glob-to-any-file:
- 'arc/rmgdb.py'

'Module: Scheduler':
- arc/scheduler.py
- changed-files:
- any-glob-to-any-file:
- 'arc/scheduler.py'

'Module: Species':
- arc/species/species.py
- changed-files:
- any-glob-to-any-file:
- 'arc/species/species.py'

'Module: SSH':
- arc/job/ssh.py
- changed-files:
- any-glob-to-any-file:
- 'arc/job/ssh.py'

'Module: trsh':
- arc/job/trsh.py
- changed-files:
- any-glob-to-any-file:
- 'arc/job/trsh.py'

'Module: Utils':
- arc/job/utils/**/*
- changed-files:
- any-glob-to-any-file:
- 'arc/job/utils/**/*'

'Module docs':
- arc/docs/**/*
- changed-files:
- any-glob-to-any-file:
- 'arc/docs/**/*'

'Module Functional':
- functional/*

- changed-files:
- any-glob-to-any-file:
- 'functional/*'
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

steps:
- name: Checkout ARC
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
path: ARC

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v6

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
push:
branches:
- main
paths:
- "Dockerfile"
- ".github/workflows/docker_build.yml"
pull_request:
branches:
- main
Expand All @@ -18,6 +15,9 @@ on:
types: [opened, synchronize, reopened, ready_for_review]
#workflow_dispatch: # Add this line to enable manual trigger

env:
BUILDKIT_PROGRESS: plain

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -34,16 +34,16 @@ jobs:
swap-storage: true

- name: Checkout
uses: actions/checkout@v5.0.0
uses: actions/checkout@v6

- name: Set up Buildx
uses: docker/setup-buildx-action@v3.11.1
uses: docker/setup-buildx-action@v4.0.0

# ----- PR and non-main branch steps -----
# For PRs: Build image but do not push and run smoke tests
- name: Build Docker Image (No Push)
if: github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref != 'refs/heads/main')
uses: docker/build-push-action@v6.18.0
uses: docker/build-push-action@v7.0.0
with:
context: .
file: ./Dockerfile
Expand All @@ -63,7 +63,7 @@ jobs:
# For pushes to main: Build, run smoke tests, and push to Docker Hub
- name: Build test stage (main)
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: docker/build-push-action@v6.18.0
uses: docker/build-push-action@v7.0.0
with:
context: .
file: ./Dockerfile
Expand All @@ -87,7 +87,7 @@ jobs:

- name: Build final and push (main)
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: docker/build-push-action@v6.18.0
uses: docker/build-push-action@v7.0.0
with:
context: .
file: ./Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
# ── clone ARC repo ───────────────────────────────────────────
- name: Checkout ARC
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
repository: ReactionMechanismGenerator/ARC
path: ARC
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/labeler@v2
- uses: actions/labeler@v6
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
14 changes: 7 additions & 7 deletions .github/workflows/update-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ jobs:
steps:
# ────────── source repo ──────────
- name: Checkout ARC
uses: actions/checkout@v4
uses: actions/checkout@v6

# ────────── AutoTST ──────────
- name: Cache AutoTST
id: cache-autotst
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: AutoTST
key: ${{ runner.os }}-autotst-main
restore-keys: |
${{ runner.os }}-autotst-
- name: Checkout AutoTST
if: steps.cache-autotst.outputs.cache-hit != 'true'
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
repository: ReactionMechanismGenerator/AutoTST
path: AutoTST
Expand All @@ -42,15 +42,15 @@ jobs:
# ────────── TS‑GCN ──────────
- name: Cache TS-GCN
id: cache-tsgcn
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: TS-GCN
key: ${{ runner.os }}-tsgcn-main
restore-keys: |
${{ runner.os }}-tsgcn-
- name: Checkout TS-GCN
if: steps.cache-tsgcn.outputs.cache-hit != 'true'
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
repository: ReactionMechanismGenerator/TS-GCN
path: TS-GCN
Expand All @@ -60,15 +60,15 @@ jobs:
# ────────── KinBot ──────────
- name: Cache KinBot
id: cache-kinbot
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: KinBot
key: ${{ runner.os }}-kinbot-2.0.6
restore-keys: |
${{ runner.os }}-kinbot-
- name: Checkout KinBot 2.0.6
if: steps.cache-kinbot.outputs.cache-hit != 'true'
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
repository: zadorlab/KinBot
path: KinBot
Expand Down
34 changes: 20 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# The parent image is the base image that the Dockerfile builds upon.
# The RMG installation instructions suggest Anaconda for installation by source, however, we use micromamba for the Docker image due to its smaller size and less overhead.
# Installation of ARC will also be done in this stage.
FROM --platform=linux/amd64 mambaorg/micromamba:2.2-ubuntu24.04 AS builder

Check warning on line 5 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

# Set ARGS
ARG RMG_PY_BRANCH=main
Expand Down Expand Up @@ -35,32 +35,38 @@

# Switch directory to Code and RMG clone
WORKDIR /home/mambauser/Code
RUN git clone --branch ${RMG_PY_BRANCH} https://github.com/ReactionMechanismGenerator/RMG-Py.git && \
git clone --branch ${RMG_DATABASE_BRANCH} https://github.com/ReactionMechanismGenerator/RMG-database.git && \
git clone --branch ${ARC_BRANCH} https://github.com/ReactionMechanismGenerator/ARC.git

# Create RMG-Py environment
RUN micromamba create -y -n rmg_env -f /home/mambauser/Code/RMG-Py/environment.yml && \
micromamba run -n rmg_env micromamba install -y -c conda-forge pyjuliacall conda && \
micromamba clean --all --yes && \
micromamba run -n rmg_env make -C /home/mambauser/Code/RMG-Py -j"$(nproc)" && \
micromamba run -n rmg_env bash -c "\
RUN git clone --depth 1 --branch ${RMG_PY_BRANCH} https://github.com/ReactionMechanismGenerator/RMG-Py.git && \
git clone --depth 1 --branch ${RMG_DATABASE_BRANCH} https://github.com/ReactionMechanismGenerator/RMG-database.git && \
git clone --depth 1 --branch ${ARC_BRANCH} https://github.com/ReactionMechanismGenerator/ARC.git

# Create RMG-Py environment (split into separate layers for GHA cache)
# Pin python=3.9 to drastically reduce solver search space
RUN micromamba create -y -v -n rmg_env python=3.9 -f /home/mambauser/Code/RMG-Py/environment.yml && \
micromamba run -n rmg_env micromamba install -y -v -c conda-forge pyjuliacall conda && \
micromamba clean --all --yes

RUN micromamba run -n rmg_env make -C /home/mambauser/Code/RMG-Py -j"$(nproc)"

RUN micromamba run -n rmg_env bash -c "\
cd /home/mambauser/Code/RMG-Py && \
export RMS_INSTALLER=continuous && \
export RMS_BRANCH=for_rmg && \
source install_rms.sh \
"

WORKDIR /home/mambauser/Code/ARC
RUN micromamba create -y -n arc_env -f environment.yml --channel-priority flexible && \
micromamba install -y -n arc_env -c conda-forge pytest && \
micromamba clean --all -f -y && \
micromamba run -n arc_env bash -euxo pipefail -c \
RUN micromamba create -y -v -n arc_env python=3.12 -f environment.yml && \
micromamba install -y -v -n arc_env -c conda-forge pytest && \
micromamba clean --all -f -y

RUN micromamba run -n arc_env bash -euxo pipefail -c \
"make compile && bash ./devtools/install_pyrdl.sh" && \
micromamba clean --all --yes

# Stage 2: Final image
# The final image is based on the same micromamba image, but we copy over the installed RMG and ARC from the builder stage.
# This keeps the final image size smaller and avoids unnecessary layers.
FROM --platform=linux/amd64 mambaorg/micromamba:2.2-ubuntu24.04

Check warning on line 69 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

ENV MAMBA_ROOT_PREFIX=/opt/conda
ENV PATH=$MAMBA_ROOT_PREFIX/bin:/home/mambauser/.juliaup/bin:/home/mambauser/Code/RMG-Py:/home/mambauser/Code/ARC:$PATH
Expand Down
Loading