Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
a2177f5
tests(regression): consolidate config folders to pure system folder s…
harryswift01 Mar 27, 2026
50dfaae
tests(regression): replace hardcoded system list with auto-discovered…
harryswift01 Mar 27, 2026
a6944c0
tests(regression): use correct file path location for config file
harryswift01 Mar 27, 2026
c625c63
tests(regression): remove current baseline configurations to reduce f…
harryswift01 Mar 27, 2026
a6379e3
tests(regression): support baseline generation and missing baseline h…
harryswift01 Mar 27, 2026
ebd2973
tests(regression): add additioanl test cases for regression tests
harryswift01 Mar 27, 2026
2a4383f
tests(regression): include all config files
harryswift01 Mar 27, 2026
9d999b5
tests(regression): ensure all functions have google style docstrings
harryswift01 Mar 27, 2026
50ce325
chore(pre-commit): ensure pre-commit is applied
harryswift01 Mar 27, 2026
a82e254
tests(unit): update config paths within unit tests from regression up…
harryswift01 Mar 27, 2026
06853f4
tests(regression): use correct file name for dna examples
harryswift01 Mar 27, 2026
c9c7e05
tests(regression): add dna regression test into the baselines
harryswift01 Mar 27, 2026
9667ae3
tests(regression): update `benzaldehyde/selection_subset.yaml` to inc…
harryswift01 Mar 30, 2026
fd43daa
tests(regression): update `benzene/selection_subset.yaml` to include …
harryswift01 Mar 30, 2026
ca40b4e
tests(regression): update "cyclohexane/selection_subset.yaml` to incl…
harryswift01 Mar 30, 2026
0b25cfb
tests(regression): add additional test configurations for DNA example
harryswift01 Mar 30, 2026
91c393d
tests(regression): update `ethyl-acetate/selection_subset.yaml` to in…
harryswift01 Mar 30, 2026
0c61c98
tests(regression): add temperature perameter in `methane/axes_off.yam…
harryswift01 Mar 30, 2026
e40ea6f
tests(regression): update `methane/selection_subset.yaml` to include …
harryswift01 Mar 30, 2026
4bbae02
tests(regression): update `methanol/selection_subset.yaml` to include…
harryswift01 Mar 30, 2026
365a64f
tests(regression): update `octonol/selection_subset.yaml` to include …
harryswift01 Mar 30, 2026
5e93bb2
tests(regression): update `water/selection_subset.yaml` to include co…
harryswift01 Mar 30, 2026
dd91317
tests(regression): add configuration file for no waterEntropy within …
harryswift01 Mar 30, 2026
a288688
tests(regression): add grouping by each as a confiuration file for ea…
harryswift01 Mar 30, 2026
2cafee0
tests(regression): add `combined_forcetorque` configuration file for …
harryswift01 Mar 30, 2026
9fd07bf
chore(gitignore): update path to regression baseline output files
harryswift01 Mar 30, 2026
87a97b1
tests(regression): add all DNA regression baseline results
harryswift01 Mar 30, 2026
02e49c8
tests(regression): ensure `kcal_force_units` is enabled on all liquids
harryswift01 Mar 30, 2026
be46d82
tests(regression): fix file path for `configs/benzene/rad.yaml`
harryswift01 Mar 30, 2026
2ad971f
tests(regression): update `regression.cases.py` to allow fast and slo…
harryswift01 Mar 31, 2026
01c1f88
tests(regression): update regression testing config files
harryswift01 Mar 31, 2026
4d39e9a
ci(workflows): update `weekly-regression.yaml` workflow to run regres…
harryswift01 Mar 31, 2026
40e8a36
tests(regression): update all regression baseline results
harryswift01 Mar 31, 2026
537fefb
tests(regression): update `regression/configs/benzene/grouping_each.y…
harryswift01 Apr 1, 2026
954cd3b
tests(regression): speed up PR regression tests with fast-only select…
harryswift01 Apr 1, 2026
42f2fc6
ci: parallelise pytest execution and optimise regression workflows
harryswift01 Apr 1, 2026
e91dac1
ci: move configuration to pyproject.toml and remove pytest.ini
harryswift01 Apr 1, 2026
489bd66
tests: update `project.toml` to use parallel flag correctly
harryswift01 Apr 1, 2026
07d4016
docs: udpdate `developer_guide.rst` to use correct pytest flags
harryswift01 Apr 1, 2026
054b3fc
ci: parallelize regression tests per system using dynamic matrix
harryswift01 Apr 1, 2026
54884c6
fix(regression): correctly extract system name from pytest parametriz…
harryswift01 Apr 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
8 changes: 5 additions & 3 deletions .github/workflows/daily.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@ concurrency:

jobs:
unit:
name: Unit (${{ matrix.os }}, ${{ matrix.python-version }})
name: Unit (${{ matrix.os }}, py${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
timeout-minutes: 30

strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-15, windows-2025]
python-version: ["3.12", "3.13", "3.14"]

steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
Expand All @@ -29,10 +31,10 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: pip

- name: Install (testing)
- name: Install testing dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[testing]

- name: Pytest (unit) • ${{ matrix.os }} • py${{ matrix.python-version }}
- name: Run unit tests
run: python -m pytest tests/unit
88 changes: 63 additions & 25 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ jobs:
matrix:
os: [ubuntu-24.04, macos-15, windows-2025]
python-version: ["3.12", "3.13", "3.14"]

steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
python-version: ${{ matrix.python-version }}
cache: pip
Expand All @@ -35,17 +36,50 @@ jobs:
- name: Pytest (unit) • ${{ matrix.os }}, ${{ matrix.python-version }}
run: python -m pytest tests/unit

discover-systems:
name: Discover regression systems
runs-on: ubuntu-24.04
outputs:
systems: ${{ steps.set-systems.outputs.systems }}

steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8

- name: Set up Python 3.14
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
python-version: "3.14"
cache: pip

- name: Install testing dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[testing]

- name: Discover systems
id: set-systems
run: |
SYSTEMS=$(python -m tests.regression.list_systems)
echo "systems=$SYSTEMS" >> $GITHUB_OUTPUT

regression-quick:
name: Regression (quick)
needs: unit
name: Regression (fast) • ${{ matrix.system }}
needs: [unit, discover-systems]
runs-on: ubuntu-24.04
timeout-minutes: 35

strategy:
fail-fast: false
matrix:
system: ${{ fromJson(needs.discover-systems.outputs.systems) }}

steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8

- name: Set up Python 3.14
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
python-version: "3.14"
cache: pip
Expand All @@ -54,28 +88,31 @@ jobs:
uses: actions/cache@v4
with:
path: .testdata
key: codeentropy-testdata-v1-${{ runner.os }}-py3.14
key: codeentropy-testdata-${{ runner.os }}-py314

- name: Install (testing)
- name: Install testing dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[testing]

- name: Pytest (regression quick)
run: python -m pytest tests/regression
- name: Run fast regression tests (per system)
run: |
python -m pytest tests/regression \
-m "not slow" \
-n auto \
--dist=loadscope \
-k "${{ matrix.system }}" \
-vv \
--durations=20

- name: Upload artifacts (failure)
if: failure()
uses: actions/upload-artifact@v4
with:
name: quick-regression-failure
name: quick-regression-failure-${{ matrix.system }}
path: |
.testdata/**
tests/regression/**/.pytest_cache/**
/tmp/pytest-of-*/pytest-*/**/config.yaml
/tmp/pytest-of-*/pytest-*/**/codeentropy_stdout.txt
/tmp/pytest-of-*/pytest-*/**/codeentropy_stderr.txt
/tmp/pytest-of-*/pytest-*/**/codeentropy_output.json
/tmp/pytest-of-*/pytest-*/**

docs:
name: Docs
Expand All @@ -93,7 +130,7 @@ jobs:
python-version: "3.14"
cache: pip

- name: Install
- name: Install docs dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[docs]
Expand All @@ -114,23 +151,23 @@ jobs:
name: Pre-commit
runs-on: ubuntu-24.04
timeout-minutes: 15

steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8

- name: Set up Python 3.14
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
python-version: "3.14"
cache: pip

- name: Install (pre-commit)
- name: Install pre-commit dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[pre-commit]

- name: Run pre-commit
shell: bash
run: |
pre-commit install
pre-commit run --all-files || {
Expand All @@ -144,8 +181,9 @@ jobs:
needs: unit
runs-on: ubuntu-24.04
timeout-minutes: 30

steps:
- name: Checkout repo
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8

- name: Set up Python 3.14
Expand All @@ -154,20 +192,20 @@ jobs:
python-version: "3.14"
cache: pip

- name: Install (testing)
- name: Install testing dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[testing]

- name: Run unit test suite with coverage
- name: Run coverage
run: |
pytest tests/unit \
--cov CodeEntropy \
--cov-report term-missing \
--cov-report xml \
-q

- name: Upload to Coveralls
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
75 changes: 57 additions & 18 deletions .github/workflows/weekly-regression.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,89 @@ name: Weekly Regression Tests

on:
schedule:
- cron: '0 8 * * 1' # Weekly Monday checks
- cron: '0 8 * * 1'
workflow_dispatch:

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

jobs:
discover:
name: Discover regression systems
runs-on: ubuntu-24.04

outputs:
systems: ${{ steps.set.outputs.systems }}

steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8

- name: Set up Python 3.14
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
python-version: "3.14"
cache: pip

- name: Install testing dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[testing]

- name: Generate system matrix
id: set
run: |
systems=$(python -m tests.regression.list_systems)
echo "systems=$systems" >> $GITHUB_OUTPUT

regression:
name: Regression tests (including slow)
name: Regression (${{ matrix.system }})
needs: discover
runs-on: ubuntu-24.04
timeout-minutes: 360

strategy:
fail-fast: false
matrix:
system: ${{ fromJson(needs.discover.outputs.systems) }}

steps:
- name: Checkout repo
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8

- name: Set up Python 3.14
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
python-version: "3.14"
cache: pip

- name: Cache regression test data downloads
- name: Cache regression test data
uses: actions/cache@v4
with:
path: .testdata
key: codeentropy-testdata-${{ runner.os }}-py314

- name: Install CodeEntropy and its testing dependencies
- name: Install testing dependencies
run: |
pip install --upgrade pip
pip install -e .[testing]
python -m pip install --upgrade pip
python -m pip install -e .[testing]

- name: Run regression test suite
run: pytest tests/regression --run-slow
- name: Run regression tests (slow, per system)
run: |
pytest tests/regression \
-k "${{ matrix.system }}" \
--run-slow \
-n auto \
--dist=loadscope \
-vv \
--durations=20

- name: Upload regression artifacts on failure
- name: Upload regression artifacts (failure)
if: failure()
uses: actions/upload-artifact@v4
with:
name: regression-failure-artifacts
name: regression-${{ matrix.system }}-artifacts
path: |
.testdata/**
tests/regression/**/.pytest_cache/**
/tmp/pytest-of-*/pytest-*/**/config.yaml
/tmp/pytest-of-*/pytest-*/**/codeentropy_stdout.txt
/tmp/pytest-of-*/pytest-*/**/codeentropy_stderr.txt
/tmp/pytest-of-*/pytest-*/**/codeentropy_output.json
/tmp/pytest-of-*/pytest-*/**
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,4 @@ job*
.testdata/

!tests/regression/baselines/
!tests/regression/baselines/*.json
!tests/regression/baselines/*/*.json
1 change: 1 addition & 0 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ requirements:
- dask >=2026.1.2,<2026.2.0
- distributed >=2026.1.2,<2026.2.0
- dask-jobqueue >=0.9,<0.10
- pytest-xdist >=3.8, <3.9

test:
imports:
Expand Down
2 changes: 1 addition & 1 deletion docs/developer_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Run regression tests excluding slow systems::

Run slow regression tests::

pytest tests/regression -m slow
pytest tests/regression --run-slow

Run tests with coverage::

Expand Down
13 changes: 12 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ Documentation = "https://codeentropy.readthedocs.io"
testing = [
"pytest>=9.0,<10.0",
"pytest-cov>=7.0,<8.0",
"pytest-sugar>=1.1,<2.0"
"pytest-sugar>=1.1,<2.0",
"pytest-xdist"
]
pre-commit = [
"pre-commit>=4.5,<5.0",
Expand All @@ -83,6 +84,16 @@ docs = [
[project.scripts]
CodeEntropy = "CodeEntropy.cli:main"

[tool.pytest.ini_options]
testpaths = ["tests"]

addopts = "-n auto -vv -ra"

markers = [
"regression: end-to-end regression tests against baselines",
"slow: long-running regression tests (20-30+ minutes)",
]

[tool.ruff]
line-length = 88
target-version = "py311"
Expand Down
5 changes: 1 addition & 4 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
"""
Empty init file in case you choose a package besides PyTest such as Nose which may look
for such a file.
"""
""" """
10 changes: 0 additions & 10 deletions tests/pytest.ini

This file was deleted.

Loading
Loading