Skip to content
Open
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
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ jobs:
env:
ARC_COVERAGE: 1
CYTHON_TRACE: 1
# Use ctrace so Cython.Coverage plugin works on Python 3.14+
# (SysMonitor doesn't support Cython file tracers yet;
# remove once Cython ships sys.monitoring support)
COVERAGE_CORE: ctrace
run: |
echo "Running Unit Tests..."
export PYTHONPATH="${{ github.workspace }}/AutoTST:${{ github.workspace }}/KinBot:$PYTHONPATH"
Expand All @@ -110,6 +114,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
20 changes: 17 additions & 3 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,24 @@ 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
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)"

run: make compile -C ARC -j"$(nproc)"
shell: micromamba-shell {0}

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

# ── minimal TeX for png‑math in Sphinx ──────────────────────
- name: System TeX tools
Expand All @@ -57,6 +65,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 -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
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