Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
1fd6784
fix(tests): improve test reliability and clarify --all-extras require…
schneiderfelipe Aug 14, 2026
11d32a2
docs(contributing): document how to fetch the data submodule
schneiderfelipe Aug 14, 2026
2669685
fix(types): wire up mypy, fix its findings, drop redundant perflint
schneiderfelipe Aug 14, 2026
da3b16d
chore(hooks): add pre-commit (ruff check/format, mypy) and document i…
schneiderfelipe Aug 14, 2026
28d4c49
ci: split lint into its own job, add mypy, cancel stale runs
schneiderfelipe Aug 14, 2026
53ffccf
fix(types): broaden array-like annotations, fix get_k(tunneling=None)
schneiderfelipe Aug 14, 2026
3b0062f
fix(types): resolve mypy findings in tests/
schneiderfelipe Aug 14, 2026
a19223d
ci(hooks): run mypy over tests/ too, in both CI and pre-commit
schneiderfelipe Aug 14, 2026
29a79c6
chore: drop inert pipenv/poetry sections from .gitignore
schneiderfelipe Aug 14, 2026
76f3d66
ci(codeql): skip Autobuild, cancel stale runs, skip docs-only changes
schneiderfelipe Aug 14, 2026
07c6ae8
ci(publish): automatic, tag-triggered PyPI publishing
schneiderfelipe Aug 14, 2026
30f43c2
fix(types): get_kappa(method=None) had the same untyped-None bug as g…
schneiderfelipe Aug 14, 2026
24ecb8b
fix(types): drop redundant float | in ArrayLike parameter annotations
schneiderfelipe Aug 14, 2026
802f39c
refactor(tests): hoist loop-invariant qrrho_options out of nested loops
schneiderfelipe Aug 14, 2026
83ea521
ci: extract shared checks.yml, fix release env URL, skip docs-only CI
schneiderfelipe Aug 14, 2026
3e2aa45
feat(types): overload wigner/eckart so scalar-vs-array is inferred
schneiderfelipe Aug 21, 2026
a62861e
feat(types): overload eyring and get_k, eliminating every external ca…
schneiderfelipe Aug 21, 2026
2c99730
refactor(tests): drop now-unnecessary cast() calls in test_regression…
schneiderfelipe Aug 21, 2026
d8457bb
fix(types): correct eyring/get_k typing -- they always return ndarray
schneiderfelipe Aug 23, 2026
2fe8200
fix(types): make equilibrium_constant/eyring shape-preserving like wi…
schneiderfelipe Aug 23, 2026
420c96d
docs(doctests): replace float(...) with print(...) to normalize scala…
schneiderfelipe Aug 23, 2026
89f9afd
fix(tests): widen the remaining tight izato free-volume tolerances
schneiderfelipe Aug 23, 2026
d3d8f28
test: collapse test_enthalpy_ideal_gases's 9 tautological checks to 1
schneiderfelipe Aug 24, 2026
98f3c7c
fix(types): make eckart's scalar return match wigner's exactly
schneiderfelipe Aug 24, 2026
8bcd1ea
ci(docs): deploy docs to GitHub Pages via Actions, drop committed docs/
schneiderfelipe Aug 24, 2026
125108c
fix(ci): actually commit the rest of the docs-migration change
schneiderfelipe Aug 24, 2026
2e9b7fa
chore(lint): fix and remove 10 rules from ruff's ignore list
schneiderfelipe Aug 24, 2026
f898d6d
docs: fix staleness and structure found in a documentation/comments r…
schneiderfelipe Aug 24, 2026
12d34fc
fix(tests): revert 4 of 5 izato tolerance widenings that had no evidence
schneiderfelipe Aug 24, 2026
188679f
chore: bump version to 1.3.0
schneiderfelipe Aug 24, 2026
ec41692
ci: test only the oldest-supported and newest Python versions
schneiderfelipe Aug 25, 2026
65a9267
fix: bump data submodule to pick up regenerated .jk caches
schneiderfelipe Aug 26, 2026
a630de3
chore: trigger CI (submodule-only commit didn't fire a workflow run)
schneiderfelipe Aug 26, 2026
e83cc28
ci: add workflow_dispatch to build.yml
schneiderfelipe Aug 26, 2026
97026f0
chore: retrigger CI after GitHub Actions incident recovery
schneiderfelipe Aug 26, 2026
498b360
lint: review and enforce the newly-failing Ruff rules
schneiderfelipe Aug 26, 2026
09d8622
build: drop Python 3.11 support, raise floor to 3.12
schneiderfelipe Aug 26, 2026
fc81159
mypy: target the newest CI-tested Python, not the floor
schneiderfelipe Aug 26, 2026
78fb1b7
ci: fix required-check gap, dedupe setup steps, drop dead Autobuild
schneiderfelipe Aug 27, 2026
46660d6
fix(io): _LazyDict.__delitem__ actually deletes now
schneiderfelipe Aug 27, 2026
b9c4d03
fix(tests): stop asserting exact order among tied symmetry axes
schneiderfelipe Aug 27, 2026
ffa00b4
docs(tests): drop a hedge word from a docstring
schneiderfelipe Aug 27, 2026
2b327e8
refactor(io): subclass dict directly in _LazyDict, not MutableMapping
schneiderfelipe Aug 29, 2026
05bd0f8
fix(io): _LazyDict: UserDict, not dict -- .get()/.items() were broken
schneiderfelipe Aug 29, 2026
997b53f
Revert "setup-uv-env composite action"
schneiderfelipe Aug 29, 2026
87fbf3a
fix(tests): apply the unordered-axis-set fix to the highest-risk symm…
schneiderfelipe Aug 29, 2026
7e9e8dd
fix(coords): restore seedable, reusable RNG for Monte Carlo volumes
schneiderfelipe Sep 1, 2026
fdd0509
docs(ci): don't let the required-checks comment imply a fixed list
schneiderfelipe Sep 1, 2026
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
82 changes: 82 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Shared lint/type/test checks, callable from other workflows instead of
# copy-pasted into them. python-package.yml calls this on every push/PR;
# publish.yml calls it to re-verify the exact tagged commit before a release
# goes out. Keeping the checks in one place means those two triggers can't
# quietly drift out of sync with each other.

name: checks

on:
workflow_call:

jobs:
lint:
# Static checks (Ruff, mypy) don't depend on which Python interpreter runs
# them, only on the tool versions and the target-version/python_version
# pinned in pyproject.toml. Run them once here instead of once per entry
# in the test matrix below.
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v7
with:
submodules: true

- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
python-version: "3.14"

- name: Install dependencies
run: uv sync --all-extras

- name: Lint with Ruff
run: uv run ruff check --output-format=github .

- name: Format check with Ruff
run: uv run ruff format --check .

- name: Type check with mypy
run: uv run mypy overreact tests

test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Only the extremes of what pyproject.toml's requires-python
# actually supports (oldest) and the newest CPython release
# (newest) -- not every version in between. CPython's compatibility
# story is strongly monotonic for pure-Python code, so this catches
# nearly everything a full N-version matrix would while cutting CI
# time; the main residual risk is a version-specific bug in a
# compiled dependency (this project leans on NumPy/SciPy/JAX) on an
# untested intermediate version, which is judged an acceptable
# tradeoff here. Bump both ends as Python's own support windows move
# (https://endoflife.date/python) and pyproject.toml's requires-python
# changes.
python-version: ["3.12", "3.14"]

steps:
- uses: actions/checkout@v7
with:
submodules: true

- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
# --all-extras is required (not just recommended): it installs jax/jaxlib
# (the "fast" extra), which several doctests in overreact/simulate.py
# depend on for their expected output. See CONTRIBUTING.md.
run: uv sync --all-extras

- name: Test with pytest
run: uv run pytest --cov=. --cov-report=xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
27 changes: 11 additions & 16 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,18 @@ name: "CodeQL"
on:
push:
branches: [main]
paths-ignore: ["**.md"]
pull_request:
# The branches below must be a subset of the branches above
branches: [main]
paths-ignore: ["**.md"]
schedule:
- cron: "44 22 * * 4"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
analyze:
name: Analyze
Expand All @@ -45,26 +51,15 @@ jobs:
uses: github/codeql-action/init@v4.37.8
with:
languages: ${{ matrix.language }}
# Python is interpreted, not compiled: there's nothing for Autobuild
# to build, so skip straight to source extraction instead of running
# (and paying for) a no-op build step. Revisit this if a compiled
# language is ever added to the matrix above.
build-mode: none
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v4.37.8

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4.37.8
74 changes: 74 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Builds API docs with pdoc (see gendocs.sh) and deploys them to GitHub
# Pages via Actions -- replacing the previous setup, where a maintainer ran
# gendocs.sh locally and committed the generated docs/ folder to main.
#
# Requires Pages source to be set to "GitHub Actions" in Settings -> Pages
# -> Build and deployment -> Source (a repo admin, on GitHub; not something
# this workflow can do for itself). Already done for this repo -- if it's
# ever reset to "Deploy from a branch", this workflow will keep building
# docs successfully but the deploy step will fail (Pages stops listening
# for Actions deployments).

name: Deploy docs to Pages

on:
push:
branches: [main]
paths:
- "overreact/**"
- "README.md"
- "gendocs.sh"
- ".github/workflows/docs.yml"
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

# Pages deployments shouldn't race each other or be cancelled mid-flight by
# a newer push (unlike checks.yml/CI, where cancelling a superseded run is
# fine) -- queue them instead.
concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
# No `submodules: true` here, unlike the other workflows: pdoc only
# introspects docstrings/signatures, it never touches data/, and
# overreact/_datasets.py's module-level directory walk degrades to an
# empty dict (not an error) when data/ is absent.
- uses: actions/checkout@v7

- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
python-version: "3.14"

- name: Install dependencies
run: uv sync --all-extras

- name: Build docs
run: uv run bash gendocs.sh -o docs-build

- name: Configure Pages
uses: actions/configure-pages@v5

- name: Upload docs artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs-build

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
137 changes: 137 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
# Publishes overreact to PyPI whenever a version tag (e.g. v1.2.0) is pushed.
#
# Uses PyPI's Trusted Publishing (OIDC): no PyPI API token is stored as a
# repository secret. This requires a one-time setup on PyPI by a project
# owner, done *before* the first tag is pushed after adding this workflow:
# https://docs.pypi.org/trusted-publishers/adding-a-publisher/
# - Publisher: GitHub
# - Owner: geem-lab
# - Repository: overreact
# - Workflow name: publish.yml
# - Environment name: pypi
#
# The `pypi` environment referenced below also lets you require manual
# approval before a publish goes out -- Settings -> Environments -> pypi ->
# "Required reviewers" -- without touching this file.

name: Publish

on:
push:
tags: ["v*.*.*"]

permissions:
contents: read

jobs:
checks:
# Guard against a fork pushing a matching tag and trying to build/publish
# under this identity (trusted publishing would reject it anyway, since
# it's bound to this exact repository + workflow, but fail fast and
# quietly instead of burning CI time on a run that can't succeed).
if: github.repository == 'geem-lab/overreact'
# Re-run the exact same lint/type/test checks as python-package.yml
# (checks.yml), against the exact tagged commit: a tag can in principle
# point anywhere, so a release shouldn't only trust that *some* commit on
# main once passed CI. Sharing the workflow file instead of duplicating
# its steps here means the two can't drift out of sync.
uses: ./.github/workflows/checks.yml
secrets: inherit

build:
needs: checks
runs-on: ubuntu-latest
outputs:
version: ${{ steps.check-version.outputs.version }}

steps:
- uses: actions/checkout@v7
with:
submodules: true

- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
python-version: "3.14"

- name: Install dependencies
run: uv sync --all-extras

- name: Verify tag matches package version
# Catches the classic footgun of tagging a commit whose
# pyproject.toml version wasn't actually bumped to match, before
# a single-use, non-reusable PyPI version gets burned on it.
id: check-version
run: |
tag_version="${GITHUB_REF_NAME#v}"
pkg_version="$(uv run python -c 'import overreact; print(overreact.__version__)')"
if [ "$tag_version" != "$pkg_version" ]; then
echo "::error::tag $GITHUB_REF_NAME does not match package version $pkg_version (pyproject.toml)"
exit 1
fi
echo "version=$pkg_version" >> "$GITHUB_OUTPUT"

- name: Build sdist and wheel
run: uv build

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
if-no-files-found: error

publish:
needs: build
runs-on: ubuntu-latest
environment:
name: pypi
# needs.build.outputs.version is the tag with its leading "v" already
# stripped (e.g. "1.2.0"), matching PyPI's actual URL scheme -- unlike
# github.ref_name (e.g. "v1.2.0"), which PyPI has no page for.
url: https://pypi.org/project/overreact/${{ needs.build.outputs.version }}
permissions:
id-token: write # required for PyPI Trusted Publishing (OIDC)

steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist/

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
# No username/password/token: identity comes from OIDC + the `pypi`
# environment above. Sigstore build provenance attestations are
# generated and uploaded automatically (attestations: true default).

github-release:
needs: publish
runs-on: ubuntu-latest
permissions:
contents: write # required to create the GitHub release

steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist/

- name: Create or update GitHub release
# Upsert rather than a bare `gh release create`: past releases in
# this repo were sometimes created by hand around the same tag, and
# a hard `create` would fail outright if one already exists for
# $GITHUB_REF_NAME. Attempt create first and fall back to upload on
# failure, instead of probing with a separate `gh release view` --
# same upsert semantics, one API call short.
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create "$GITHUB_REF_NAME" \
--repo "$GITHUB_REPOSITORY" \
--title "$GITHUB_REF_NAME" \
--generate-notes \
dist/* \
|| gh release upload "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" --clobber dist/*
Loading