Skip to content

Commit 41fc6bd

Browse files
authored
Merge pull request #281 from CCPBioSim/173-refactor-levels
Refactor workflow to DAG architecture with expanded testing, CI modernisation, and validated numerical equivalence
2 parents 12880e8 + c1ec477 commit 41fc6bd

File tree

171 files changed

+16351
-11417
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+16351
-11417
lines changed

.github/CONTRIBUTING.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This guide explains how to set up your environment, make changes, and submit the
1010

1111
## Getting Started
1212

13-
Before contributing, please review the [Developer Guide](https://codeentropy.readthedocs.io/en/latest/developer_guide.html).
13+
Before contributing, please review the [Developer Guide](https://codeentropy.readthedocs.io/en/latest/developer_guide.html).
1414
It covers CodeEntropy’s architecture, setup instructions, and contribution workflow.
1515

1616
If you’re new to the project, we also recommend:
@@ -23,19 +23,19 @@ If you’re new to the project, we also recommend:
2323

2424
When you’re ready to submit your work:
2525

26-
1. **Push your branch** to GitHub.
27-
2. **Open a [pull request](https://help.github.com/articles/using-pull-requests/)** against the `main` branch.
26+
1. **Push your branch** to GitHub.
27+
2. **Open a [pull request](https://help.github.com/articles/using-pull-requests/)** against the `main` branch.
2828
3. **Fill out the PR template**, including:
29-
- A concise summary of what your PR does
30-
- A list of all changes introduced
31-
- Details on how these changes affect the repository (features, tests, documentation, etc.)
29+
- A concise summary of what your PR does
30+
- A list of all changes introduced
31+
- Details on how these changes affect the repository (features, tests, documentation, etc.)
3232
4. **Verify before submission**:
33-
- All tests pass
34-
- Pre-commit checks succeed
35-
- Documentation is updated where applicable
33+
- All tests pass
34+
- Pre-commit checks succeed
35+
- Documentation is updated where applicable
3636
5. **Review process**:
37-
- Your PR will be reviewed by the core development team.
38-
- At least **one approval** is required before merging.
37+
- Your PR will be reviewed by the core development team.
38+
- At least **one approval** is required before merging.
3939

4040
We aim to provide constructive feedback quickly and appreciate your patience during the review process.
4141

@@ -45,12 +45,12 @@ We aim to provide constructive feedback quickly and appreciate your patience dur
4545

4646
Found a bug or have a feature request?
4747

48-
1. **Open a new issue** on GitHub.
49-
2. Provide a **clear and descriptive title**.
48+
1. **Open a new issue** on GitHub.
49+
2. Provide a **clear and descriptive title**.
5050
3. Include:
51-
- Steps to reproduce the issue (if applicable)
52-
- Expected vs. actual behavior
53-
- Relevant logs, screenshots, or input files
51+
- Steps to reproduce the issue (if applicable)
52+
- Expected vs. actual behavior
53+
- Relevant logs, screenshots, or input files
5454

5555
Well-documented issues help us address problems faster and keep CodeEntropy stable and robust.
5656

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ assignees: ''
1212

1313
---
1414

15-
## To Reproduce
15+
## To Reproduce
1616
<!-- Provide the YAML configuration and the exact CLI command that reproduces the issue. -->
1717

1818
### YAML configuration
19-
<!-- Paste the YAML file or the smallest excerpt that reproduces the issue.
19+
<!-- Paste the YAML file or the smallest excerpt that reproduces the issue.
2020
Remove unrelated fields to make it minimal. -->
2121
```yaml
2222
# Paste the YAML snippet here
@@ -46,7 +46,7 @@ Remove unrelated fields to make it minimal. -->
4646
- Python Version:
4747
- Package list:
4848
- If using conda, run: `conda list > packages.txt` and paste the contents here.
49-
49+
5050
``` bash
5151
# Paste packages.txt here
5252
```

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
<!-- List all the changes introduced in this PR. -->
66
### Change 1 <!-- Rename Change 1 to reflect change title -->:
77
- <!-- Bullet point the changes in update 1. -->
8-
-
8+
-
99

1010
### Change 2 <!-- Rename Change 2 to reflect change title -->:
1111
- <!-- Bullet point the changes in update 2. -->
12-
-
12+
-
1313

1414
### Change 3 <!-- Rename Change 3 to reflect change title -->:
1515
- <!-- Bullet point the changes in update 3. -->
16-
-
16+
-
1717

1818
## Impact
1919
- <!-- Bullet point the expected impact this PR will have on the codebase. -->
20-
-
20+
-

.github/renovate.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
"automerge": false
1919
}
2020
]
21-
}
21+
}

.github/workflows/daily.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CodeEntropy Daily
2+
3+
on:
4+
schedule:
5+
- cron: '0 8 * * 1-5'
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: daily-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
unit:
14+
name: Unit (${{ matrix.os }}, ${{ matrix.python-version }})
15+
runs-on: ${{ matrix.os }}
16+
timeout-minutes: 30
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os: [ubuntu-24.04, macos-15, windows-2025]
21+
python-version: ["3.12", "3.13", "3.14"]
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
25+
26+
- name: Set up Python ${{ matrix.python-version }}
27+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
cache: pip
31+
32+
- name: Install (testing)
33+
run: |
34+
python -m pip install --upgrade pip
35+
python -m pip install -e .[testing]
36+
37+
- name: Pytest (unit) • ${{ matrix.os }} • py${{ matrix.python-version }}
38+
run: python -m pytest tests/unit -q

.github/workflows/mdanalysis-compatibility-failure.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/workflows/mdanalysis-compatibility.yaml

Lines changed: 0 additions & 49 deletions
This file was deleted.

.github/workflows/pr.yaml

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
name: CodeEntropy CI
2+
3+
on:
4+
pull_request:
5+
6+
concurrency:
7+
group: pr-${{ github.ref }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
unit:
12+
name: Unit
13+
runs-on: ${{ matrix.os }}
14+
timeout-minutes: 25
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
os: [ubuntu-24.04, macos-15, windows-2025]
19+
python-version: ["3.12", "3.13", "3.14"]
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
23+
24+
- name: Set up Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
cache: pip
29+
30+
- name: Install testing dependencies
31+
run: |
32+
python -m pip install --upgrade pip
33+
python -m pip install -e .[testing]
34+
35+
- name: Pytest (unit) • ${{ matrix.os }}, ${{ matrix.python-version }}
36+
run: python -m pytest tests/unit -q
37+
38+
regression-quick:
39+
name: Regression (quick)
40+
needs: unit
41+
runs-on: ubuntu-24.04
42+
timeout-minutes: 35
43+
steps:
44+
- name: Checkout
45+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
46+
47+
- name: Set up Python 3.14
48+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
49+
with:
50+
python-version: "3.14"
51+
cache: pip
52+
53+
- name: Cache testdata
54+
uses: actions/cache@v4
55+
with:
56+
path: .testdata
57+
key: codeentropy-testdata-v1-${{ runner.os }}-py3.14
58+
59+
- name: Install (testing)
60+
run: |
61+
python -m pip install --upgrade pip
62+
python -m pip install -e .[testing]
63+
64+
- name: Pytest (regression quick)
65+
run: python -m pytest tests/regression -q
66+
67+
- name: Upload artifacts (failure)
68+
if: failure()
69+
uses: actions/upload-artifact@v4
70+
with:
71+
name: quick-regression-failure
72+
path: |
73+
.testdata/**
74+
tests/regression/**/.pytest_cache/**
75+
/tmp/pytest-of-*/pytest-*/**/config.yaml
76+
/tmp/pytest-of-*/pytest-*/**/codeentropy_stdout.txt
77+
/tmp/pytest-of-*/pytest-*/**/codeentropy_stderr.txt
78+
/tmp/pytest-of-*/pytest-*/**/codeentropy_output.json
79+
80+
docs:
81+
name: Docs
82+
runs-on: ubuntu-24.04
83+
timeout-minutes: 25
84+
steps:
85+
- name: Checkout
86+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
87+
88+
- name: Set up Python 3.14
89+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
90+
with:
91+
python-version: "3.14"
92+
cache: pip
93+
94+
- name: Install (docs)
95+
run: |
96+
python -m pip install --upgrade pip
97+
python -m pip install -e .[docs]
98+
99+
- name: Build docs
100+
run: |
101+
cd docs
102+
make
103+
104+
pre-commit:
105+
name: Pre-commit
106+
runs-on: ubuntu-24.04
107+
timeout-minutes: 15
108+
steps:
109+
- name: Checkout
110+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
111+
112+
- name: Set up Python 3.14
113+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
114+
with:
115+
python-version: "3.14"
116+
cache: pip
117+
118+
- name: Install (pre-commit)
119+
run: |
120+
python -m pip install --upgrade pip
121+
python -m pip install -e .[pre-commit]
122+
123+
- name: Run pre-commit
124+
shell: bash
125+
run: |
126+
pre-commit install
127+
pre-commit run --all-files || {
128+
git status --short
129+
git diff
130+
exit 1
131+
}
132+
133+
coverage:
134+
name: Coverage
135+
needs: unit
136+
runs-on: ubuntu-24.04
137+
timeout-minutes: 30
138+
steps:
139+
- name: Checkout repo
140+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
141+
142+
- name: Set up Python 3.14
143+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
144+
with:
145+
python-version: "3.14"
146+
cache: pip
147+
148+
- name: Install (testing)
149+
run: |
150+
python -m pip install --upgrade pip
151+
python -m pip install -e .[testing]
152+
153+
- name: Run unit test suite with coverage
154+
run: |
155+
pytest tests/unit \
156+
--cov CodeEntropy \
157+
--cov-report term-missing \
158+
--cov-report xml \
159+
-q
160+
161+
- name: Upload to Coveralls
162+
uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e
163+
with:
164+
github-token: ${{ secrets.GITHUB_TOKEN }}
165+
file: coverage.xml
166+
fail-on-error: false

0 commit comments

Comments
 (0)