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
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ jobs:
env:
ARC_COVERAGE: 1
CYTHON_TRACE: 1
COVERAGE_CORE: ctrace
run: |
echo "Running Unit Tests..."
export PYTHONPATH="${{ github.workspace }}/AutoTST:${{ github.workspace }}/KinBot:$PYTHONPATH"
Expand All @@ -110,6 +111,7 @@ jobs:
env:
ARC_COVERAGE: 1
CYTHON_TRACE: 1
COVERAGE_CORE: ctrace
run: |
echo "Running Functional Tests from $(pwd)..."
export PYTHONPATH="${{ github.workspace }}/AutoTST:${{ github.workspace }}/KinBot:$PYTHONPATH"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ jobs:
push: false
load: true
tags: arc:test
build-args: |
ARC_BRANCH=${{ github.head_ref || github.ref_name }}
cache-from: type=gha
cache-to: type=gha,mode=max

Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,19 @@ jobs:
with:
environment-name: arc_env
environment-file: ARC/environment.yml
condarc: |
channels:
- conda-forge
- danagroup
cache-environment: true
cache-environment-key: py314v3-arc-env
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this intended to be set in main too?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the gh-pages workflow creates rmg_env first, which sets a condarc with only conda-forge. Without the explicit condarc on the arc_env step, the danagroup channel gets lost and openbabel can't be resolved for Py 3.14. CI doesn't need it because it only creates one env.

cache-downloads: true
generate-run-shell: true

# ── Complie ARC ──────────────────────
- name: Build ARC in arc_env
run: micromamba run -n arc_env make compile -C ARC -j"$(nproc)"

# ── Install pyrdl ──────────────────────
- name: Install pyrdl
run: micromamba run -n arc_env make install-pyrdl -C ARC -j"$(nproc)"
run: make compile -C ARC -j"$(nproc)"
shell: micromamba-shell {0}

# ── minimal TeX for png‑math in Sphinx ──────────────────────
- name: System TeX tools
Expand All @@ -57,6 +60,12 @@ jobs:
run: micromamba install -y -n arc_env -c conda-forge libgfortran=3
shell: micromamba-shell {0}

# ── ensure ase is installed (the danagroup channel and/or
# libgfortran install can cause the solver to drop ase)
- name: Ensure ase is installed
run: pip install "ase>=3.22.1" && python -c "import ase; print(f'ase {ase.__version__} OK')"
shell: micromamba-shell {0}

# ── build HTML docs ─────────────────────────────────────────
- name: Set env vars & Build docs
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ examples/

# Unit test files
.coverage
.coverage.*
testing/*
htmlcov/*
arc/testing/gcn_tst/
Expand Down
2 changes: 1 addition & 1 deletion 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 @@ -55,7 +55,7 @@
"

WORKDIR /home/mambauser/Code/ARC
RUN micromamba create -y -v -n arc_env python=3.12 -f environment.yml && \
RUN micromamba create -y -v -n arc_env python=3.14 -c conda-forge -c danagroup -f environment.yml && \
micromamba install -y -v -n arc_env -c conda-forge pytest && \
micromamba clean --all -f -y

Expand All @@ -66,7 +66,7 @@
# 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
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
DEVTOOLS_DIR := devtools

.PHONY: all help clean test test-unittests test-functional test-all \
install-all install-ci install-pyrdl install-rmg install-rmgdb install-autotst install-gcn \
install-all install-ci install-rmg install-rmgdb install-autotst install-gcn \
install-gcn-cpu install-kinbot install-sella install-xtb install-torchani install-ob \
lite check-env compile

Expand All @@ -27,7 +27,6 @@ help:
@echo "Installation:"
@echo " install Install all external dependencies"
@echo " install-ci Install all external dependencies for CI (no clean)"
@echo " install-pyrdl Install PyRDL"
@echo " install-rmg Install RMG (default: packaged, override via RMG_ARGS=...)"
@echo " install-rmgdb Install RMG-database"
@echo " install-autotst Install AutoTST"
Expand Down Expand Up @@ -73,9 +72,6 @@ install-lite:
@echo "Installing ARC's lite version (no external dependencies)..."
bash $(DEVTOOLS_DIR)/install_all.sh --no-ext --rmg-rms

install-pyrdl:
bash $(DEVTOOLS_DIR)/install_pyrdl.sh

install-rmg:
bash $(DEVTOOLS_DIR)/install_rmg.sh $(RMG_ARGS)

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[![codecov](https://codecov.io/gh/ReactionMechanismGenerator/ARC/branch/main/graph/badge.svg)](https://codecov.io/gh/ReactionMechanismGenerator/ARC)
[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)
![Release](https://img.shields.io/badge/version-1.1.0-blue.svg)
![Python](https://img.shields.io/badge/python-3.14-blue.svg)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3356849.svg)](https://doi.org/10.5281/zenodo.3356849)

<img src="https://github.com/ReactionMechanismGenerator/ARC/blob/main/logo/ARC-logo-small.jpg" alt="ARC logo" width="200"/>
Expand Down
8 changes: 3 additions & 5 deletions arc/checks/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

import datetime

from typing import List, Optional

CONFORMER_JOB_TYPES = ('conf_opt', 'conf_sp')


Expand All @@ -23,7 +21,7 @@ def is_conformer_job(job_name: str) -> bool:
return job_name.startswith(CONFORMER_JOB_TYPES)


def sum_time_delta(timedelta_list: List[datetime.timedelta]) -> datetime.timedelta:
def sum_time_delta(timedelta_list: list[datetime.timedelta]) -> datetime.timedelta:
"""
A helper function for summing datetime.timedelta objects.

Expand All @@ -40,15 +38,15 @@ def sum_time_delta(timedelta_list: List[datetime.timedelta]) -> datetime.timedel
return result


def get_i_from_job_name(job_name: str) -> Optional[int]:
def get_i_from_job_name(job_name: str) -> int | None:
"""
Get the conformer or tsg index from the job name.

Args:
job_name (str): The job name, e.g., 'conformer12' or 'tsg5'.

Returns:
Optional[int]: The corresponding conformer or tsg index.
int | None: The corresponding conformer or tsg index.
"""
i = None
for prefix in CONFORMER_JOB_TYPES:
Expand Down
Loading
Loading