Skip to content
Draft
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
25 changes: 22 additions & 3 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,30 @@ 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

# ── ensure ase is installed (the danagroup channel can cause the
# conda solver to silently drop ase from the environment)
- 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}

# ── 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 +71,11 @@ jobs:
run: micromamba install -y -n arc_env -c conda-forge libgfortran=3
shell: micromamba-shell {0}

# ── verify critical imports ─────────────────────────────────
- name: Verify arc imports
run: python -c "import ase; print('ase OK'); from arc.common import VERSION; print(f'ARC {VERSION}')"
shell: micromamba-shell {0}

# ── build HTML docs ─────────────────────────────────────────
- name: Set env vars & Build docs
run: |
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ RUN micromamba run -n rmg_env bash -c "\
"

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 -f environment.yml && \
micromamba install -y -v -n arc_env -c conda-forge pytest && \
micromamba clean --all -f -y

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
16 changes: 16 additions & 0 deletions arc/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
import glob
import os
import sys

# Ensure BABEL_LIBDIR and BABEL_DATADIR are set before any openbabel import.
# The danagroup conda build doesn't configure these paths automatically.
_prefix = os.environ.get('CONDA_PREFIX', sys.prefix)
if not os.environ.get('BABEL_LIBDIR'):
_ob_dirs = glob.glob(os.path.join(_prefix, 'lib', 'openbabel', '*'))
if _ob_dirs and os.path.isdir(_ob_dirs[0]):
os.environ['BABEL_LIBDIR'] = _ob_dirs[0]
if not os.environ.get('BABEL_DATADIR'):
_ob_data = glob.glob(os.path.join(_prefix, 'share', 'openbabel', '*'))
if _ob_data and os.path.isdir(_ob_data[0]):
os.environ['BABEL_DATADIR'] = _ob_data[0]

import arc.exceptions
import arc.main
from arc.main import ARC
Expand Down
9 changes: 3 additions & 6 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 @@ -39,16 +37,15 @@ def sum_time_delta(timedelta_list: List[datetime.timedelta]) -> datetime.timedel
result += timedelta
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