Skip to content

Commit 5b6073a

Browse files
authored
Merge pull request #470 from predictive-clinical-neuroscience/dev
Release version 1.3.0
2 parents e66fe0a + 9a44f08 commit 5b6073a

129 files changed

Lines changed: 8462 additions & 14118 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
Briefly describe the bug.
12+
13+
**To Reproduce**
14+
Share a reproducible script as a Jupyter notebook (e.g., via Google Colab) (if you don't want to share your data, use our example data: `norm_data = load_fcon1000()`
15+
16+
Always copy-paste here the *error traceback* from your terminal.
17+
18+
**Expected behavior**
19+
What should have happened?
20+
21+
**Technical details**
22+
- PCNtoolkit version [e.g. V1.1.2]
23+
- Run `pip list` in the terminal and paste here the packages that you have installed in your environment
24+
- OS: [e.g. which version of Linux or MacOS]
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem?**
11+
Briefly describe the problem
12+
13+
**Describe the solution you'd like**
14+
Briefly describe the feature.
15+
16+
**To reproduce**
17+
To help maintainers review the feature faster, please provide:
18+
- a reproducible script as a Jupyter notebook (e.g., via Google Colab) (if you don't want to share your data, use our example data: norm_data = load_fcon1000()
19+
- Screenshots or recordings

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#### AI assistance
2+
3+
If you used AI to help prepare this pull request, please describe how.
4+
5+
Examples:
6+
- "I implemented the code changes myself, and Claude Sonnet 4.6 wrote the tests."
7+
- "I wrote the code, and asked GPT-5.4 to write the docstrings and comments."
8+
- "I prompted Gemini 3.1 Pro to plan and implement the code, then refined it
9+
manually until I was satisfied."
10+
11+
_If you did not use AI, you can delete this section._
12+
13+
14+
#### Reference issue (if any)
15+
16+
<!-- closes #123 -->
17+
18+
19+
#### What does this implement/fix?
20+
21+
<!-- Explain your changes. -->
22+
23+
24+
#### To reproduce
25+
26+
<!-- Add a Python script or notebook (`.ipynb`) that demonstrates the new
27+
behaviour or reproduces the bug this PR fixes. -->
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# Manually execute all tutorial notebooks and commit the results.
2+
#
3+
# Trigger: manual only.
4+
# - Open the Actions tab, select "Run Notebooks", click "Run workflow".
5+
# - Pick the branch you want to run against (e.g. your PR branch).
6+
# - Tick "Dry run" to execute notebooks without committing anything.
7+
#
8+
# The workflow stops immediately if any notebook fails.
9+
# The failing notebook name and cell error are printed in the log.
10+
# Nothing is committed unless every notebook succeeds.
11+
#
12+
# Notebook 08_cluster.ipynb is always skipped — it requires SLURM.
13+
14+
name: Run Notebooks
15+
16+
on:
17+
workflow_dispatch:
18+
inputs:
19+
dry_run:
20+
description: >
21+
Dry run — execute notebooks but do NOT commit results back.
22+
required: false
23+
type: boolean
24+
default: false
25+
26+
permissions:
27+
contents: write # required to push committed outputs back
28+
29+
jobs:
30+
run-notebooks:
31+
runs-on: ubuntu-latest
32+
33+
steps:
34+
# ── 1. Checkout ────────────────────────────────────────────
35+
- name: Checkout repository
36+
uses: actions/checkout@v4
37+
with:
38+
# persist-credentials lets the final push step use the
39+
# built-in GITHUB_TOKEN — no personal access token needed.
40+
persist-credentials: true
41+
42+
# ── 2. Python ──────────────────────────────────────────────
43+
- name: Set up Python 3.12
44+
uses: actions/setup-python@v5
45+
with:
46+
python-version: "3.12"
47+
48+
# ── 3. System dependencies ─────────────────────────────────
49+
- name: Install pandoc
50+
# pandoc is required by nbconvert --to rst, which is called
51+
# by doc/convert_notebooks.py in step 6.
52+
run: sudo apt-get install -y pandoc
53+
54+
# ── 4. Python dependencies ─────────────────────────────────
55+
- name: Install Python dependencies
56+
run: |
57+
# Install the package plus its dev extras, then add
58+
# papermill for notebook execution.
59+
pip install -e ".[dev]"
60+
pip install papermill
61+
62+
# ── 5. Execute all notebooks ───────────────────────────────
63+
- name: Execute notebooks
64+
run: |
65+
# Loop over every notebook in examples/, skipping the
66+
# cluster notebook which requires SLURM and cannot run
67+
# in a GitHub Actions environment.
68+
FAILED=0
69+
for nb in examples/*.ipynb; do
70+
if [[ "$nb" == *"08_cluster"* ]]; then
71+
echo "Skipping (SLURM-only): $nb"
72+
continue
73+
fi
74+
75+
echo "Running: $nb"
76+
77+
# papermill executes the notebook in-place and prints
78+
# the failing cell + Python traceback on error.
79+
papermill "$nb" "$nb" \
80+
--execution-timeout 3600 \
81+
--request-save-on-cell-execute \
82+
|| { echo "FAILED: $nb"; FAILED=1; break; }
83+
84+
echo "Done: $nb"
85+
done
86+
87+
# Exit with failure so GitHub Actions marks the job red
88+
# and shows the error prominently.
89+
exit $FAILED
90+
91+
# ── 6. Convert notebooks to RST ───────────────────────────
92+
- name: Convert notebooks to RST
93+
# Regenerate all RST files from the freshly executed .ipynb
94+
# files so the website outputs are up to date.
95+
run: python doc/convert_notebooks.py
96+
97+
# ── 7. Commit and push ─────────────────────────────────────
98+
- name: Commit generated outputs
99+
if: ${{ github.event.inputs.dry_run == 'false' }}
100+
run: |
101+
git config --global user.name "github-actions[bot]"
102+
git config --global user.email \
103+
"github-actions[bot]@users.noreply.github.com"
104+
105+
# Stage the executed notebooks and the generated RST files.
106+
git add examples/ doc/pages/tutorials/
107+
108+
# Commit only if there are staged changes; exit cleanly
109+
# if nothing changed (idempotent re-runs are safe).
110+
if git diff --staged --quiet; then
111+
echo "Nothing changed — no commit needed."
112+
else
113+
git commit -m \
114+
"chore: update executed notebook outputs [skip ci]"
115+
git push
116+
fi

.github/workflows/testing.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Checkout Repository
22-
uses: actions/checkout@v2
22+
uses: actions/checkout@v4
2323

2424
- name: Set up Python
25-
uses: actions/setup-python@v2
25+
uses: actions/setup-python@v5
2626
with:
2727
python-version: '3.12'
2828

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ pcntoolkit.egg-info
7272
# Overrule for github folder
7373
!.github
7474

75+
# ignore agent skills for copilot
76+
.github/skills/
77+
7578
# Dist folder
7679
dist/pcntoolkit-0.30.post2-py3.12.egg
7780
dist/*

CHANGES

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ Models estimated on earlier versions of PCNtoolkit (up until v0.39) are NOT COMP
158158
6. Fix bug with nm.predict, it is now fully in-place on the Normdata
159159
7. Fix transfer bug for HBR
160160

161+
161162
# Version 1.2.0
162163

163164
**Major changes:**
@@ -166,7 +167,6 @@ Models estimated on earlier versions of PCNtoolkit (up until v0.39) are NOT COMP
166167
3. Replace "fcntl" package with "filelock" to allow Windows support
167168
4. Update contribution guide in the website and add a troubleshooting section
168169

169-
170170
**Minor changes:**
171171
1. Add copilot-instructions.md
172172
2. Small fixes in plot_centiles_advanced and plot_centiles
@@ -175,7 +175,34 @@ Models estimated on earlier versions of PCNtoolkit (up until v0.39) are NOT COMP
175175
1. Fix MSLL computation
176176
2. Refactor logging for BLR: add warnings and errors related to optimizers and warping
177177

178+
178179
# Version 1.2.0.post1
179180

180181
**Hotfix**
181-
Fix packaging issues (no missing files or folders)
182+
Fix packaging issues (no missing files or folders)
183+
184+
185+
# Version 1.3.0
186+
187+
**Major changes:**
188+
1. Add fractional polynomials basis function
189+
2. Rename NLL (negative log-likelihood) → MLL (mean log-loss)
190+
3. Add MACE averaging (as defined in Zamanzadeh et al. (2026))
191+
4. Add kurtosis and skewness as evaluation metrics
192+
5. Add migration strategy for saved models
193+
6. Make HBR SHASHb faster by adjusting the dp parameter
194+
7. Manage matplotlib more flexibly
195+
8. Refactor BLR tutorial
196+
9. Add federated learning and evaluation metrics tutorials
197+
10. Update merge tutorial
198+
199+
**Minor changes:**
200+
1. Update contributing guidelines and add rules in github (Issue and PR templates)
201+
202+
**Bug fixes**
203+
1. Add add upper bounds for pymc, nutpie and pytensor
204+
2. Fix HBR SHASH to return mean and second moment in m1m2()
205+
3. Add h5py and h5netcdf as dependency in toml
206+
207+
208+

CITATION.cff

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
cff-version: "1.2.0"
22
message: "If you use this software, please cite it using the metadata below."
33
title: "PCNtoolkit"
4-
version: "1.2.0.post1"
5-
date-released: "2026-03-28"
4+
version: "1.3.0"
5+
date-released: "2026-05-27"
66
doi: "10.5281/zenodo.5207839"
77
authors:
88
- family-names: "de Boer"
@@ -22,17 +22,17 @@ authors:
2222
affiliation: "Donders Institute for Brain, Cognition, and Behavior"
2323
affiliation: "Radboud University Medical Center"
2424
affiliation: "King's College London"
25+
- family-names: "Tsilimparis"
26+
given-names: "Konstantinos"
27+
orcid: "https://orcid.org/0009-0008-5734-7538"
28+
affiliation: "Donders Institute for Brain, Cognition and Behaviour"
29+
affiliation: "Radboud University Medical Center"
2530
- family-names: "Kia"
2631
given-names: "Seyed Mostafa"
2732
orcid: "https://orcid.org/0000-0002-7128-814X"
2833
affiliation: "Tilburg University"
2934
affiliation: "Donders Institute for Brain, Cognition, and Behavior"
3035
affiliation: "University Medical Center Utrecht"
31-
- family-names: "Tsilimparis"
32-
given-names: "Konstantinos"
33-
orcid: "https://orcid.org/0009-0008-5734-7538"
34-
affiliation: "Donders Institute for Brain, Cognition and Behaviour"
35-
affiliation: "Radboud University Medical Center"
3636
- family-names: "Wolfers"
3737
given-names: "Thomas"
3838
- family-names: "Berthet"
@@ -59,6 +59,8 @@ authors:
5959
given-names: "Emin"
6060
- family-names: "Joshi"
6161
given-names: "Divye"
62+
- family-names: "Gaddam"
63+
given-names: "Bhumika"
6264
- family-names: "Razick"
6365
given-names: "Sabry"
6466
- family-names: "Barkema"

0 commit comments

Comments
 (0)