Skip to content

Commit cda25ed

Browse files
authored
Merge pull request #1427 from rdmorganiser/2.4.0
RDMO 2.4.0 🎆
2 parents 79917de + 8c4e727 commit cda25ed

173 files changed

Lines changed: 5342 additions & 5027 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.

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ updates:
3030
patterns:
3131
- django*
3232
- drf*
33+
cooldown:
34+
default-days: 7
3335
- package-ecosystem: github-actions
3436
directory: /
3537
schedule:
@@ -44,6 +46,8 @@ updates:
4446
github-actions:
4547
patterns:
4648
- '*'
49+
cooldown:
50+
default-days: 7
4751
- package-ecosystem: npm
4852
directory: /
4953
schedule:
@@ -82,3 +86,5 @@ updates:
8286
dependency-type: production
8387
dev-dependencies:
8488
dependency-type: development
89+
cooldown:
90+
default-days: 7

.github/workflows/ci.yml

Lines changed: 41 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -27,88 +27,48 @@ env:
2727
PYTHONDONTWRITEBYTECODE: 1
2828
FORCE_COLOR: 1 # colored output by pytest etc.
2929

30+
permissions: {}
31+
3032
jobs:
3133

3234
build-wheel:
3335
name: Build python wheel
3436
runs-on: ubuntu-24.04
3537
steps:
36-
- uses: actions/checkout@v4
37-
# update the version
38-
- name: Get short commit SHA
39-
run: |
40-
if [ "${{ github.event_name }}" = "pull_request" ]; then
41-
SHA="${{ github.event.pull_request.head.sha }}"
42-
else
43-
SHA="${{ github.sha }}"
44-
fi
45-
echo "SHA=$(git rev-parse --short $SHA)" >> $GITHUB_ENV
46-
- name: Get current version (MAJOR.MINOR.PATCH)
47-
id: current-version
48-
run: echo "current_version=$(grep -Po '(?<=__version__ = ")[\d\w.]+(?=")' rdmo/__init__.py)" >> $GITHUB_OUTPUT
49-
- name: Generate new version (current version + SHA)
50-
id: new-version
51-
run: echo "new_version=${{ steps.current-version.outputs.current_version }}+$SHA" >> $GITHUB_OUTPUT
52-
- name: Update version in rdmo/__init__.py
53-
run: |
54-
sed -i "s/__version__ = .*/__version__ = \"${{ steps.new-version.outputs.new_version }}\"/" rdmo/__init__.py
38+
- uses: actions/checkout@v6
39+
with:
40+
persist-credentials: false
41+
fetch-depth: 0 # important for setuptools_scm
5542
# build the webpack bundle
56-
- uses: actions/setup-node@v4
43+
- uses: actions/setup-node@v6
5744
with:
5845
node-version: 22
5946
cache: npm
6047
- run: npm ci && npm run build:dist
61-
# build the wheel
62-
- uses: actions/setup-python@v5
63-
with:
64-
python-version: '3.13'
65-
cache: pip
66-
- run: |
67-
python -m pip install --upgrade pip build[uv] twine
68-
python -m pip --version
69-
- name: Build the wheel
70-
run: python -m build --installer=uv
71-
- name: Check the metadata of wheel and sdist
72-
run: python -m twine check --strict dist/*
73-
- name: Install package from built wheel
74-
run: python -m pip install --no-compile dist/rdmo*.whl # do not create __pycache__/*.pyc files
75-
- name: Write info to step summary
76-
run: |
77-
{
78-
echo -e "# ✓ Wheel successfully built (v${{ steps.new-version.outputs.new_version }})\n\n"
79-
echo '<details><summary>Information about installed wheel</summary>'
80-
echo -e "\n\`\`\`console"
81-
echo "$ python -m pip show --files --verbose rdmo"
82-
python -m pip show --files --verbose rdmo
83-
echo -e "\`\`\`\n</details>"
84-
} >> $GITHUB_STEP_SUMMARY
85-
- name: Upload wheel as artifact
86-
uses: actions/upload-artifact@v4
87-
with:
88-
name: wheel
89-
path: dist/rdmo*.whl
90-
if-no-files-found: error
91-
retention-days: 30
48+
- name: Build and inspect package
49+
uses: hynek/build-and-inspect-python-package@efb823f52190ad02594531168b7a2d5790e66516 # v2.14.0
9250

9351
test:
9452
name: "Test (Python: ${{ matrix.python-version }}, DB: ${{ matrix.db-backend }})"
9553
needs: build-wheel
9654
runs-on: ubuntu-24.04
9755
strategy:
9856
matrix:
99-
python-version: ['3.9', '3.13']
57+
python-version: ['3.10', '3.13']
10058
db-backend: [mysql, postgres]
10159
steps:
102-
- uses: actions/checkout@v4
60+
- uses: actions/checkout@v6
61+
with:
62+
persist-credentials: false
10363
- name: Set up Python ${{ matrix.python-version }}
104-
uses: actions/setup-python@v5
64+
uses: actions/setup-python@v6
10565
with:
10666
python-version: ${{ matrix.python-version }}
10767
cache: pip
10868
- name: Download wheel
109-
uses: actions/download-artifact@v4
69+
uses: actions/download-artifact@v6
11070
with:
111-
name: wheel
71+
name: Packages
11272
path: dist
11373
- name: Install Dependencies
11474
run: |
@@ -141,10 +101,12 @@ jobs:
141101
env:
142102
GITHUB_DB_BACKEND: ${{ matrix.db-backend }}
143103
- name: Upload coverage data to coveralls.io
144-
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
104+
uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2.3.7
145105
with:
146106
flag-name: '${{ matrix.db-backend }}: ${{ matrix.python-version }}'
147107
parallel: true
108+
fail-on-error: false
109+
allow-empty: true
148110

149111
test-e2e:
150112
name: "End-to-end Test (Python: ${{ matrix.python-version }}, DB: ${{ matrix.db-backend }})"
@@ -155,16 +117,18 @@ jobs:
155117
python-version: ['3.13']
156118
db-backend: [postgres]
157119
steps:
158-
- uses: actions/checkout@v4
120+
- uses: actions/checkout@v6
121+
with:
122+
persist-credentials: false
159123
- name: Set up Python ${{ matrix.python-version }}
160-
uses: actions/setup-python@v5
124+
uses: actions/setup-python@v6
161125
with:
162126
python-version: ${{ matrix.python-version }}
163127
cache: pip
164128
- name: Download wheel
165-
uses: actions/download-artifact@v4
129+
uses: actions/download-artifact@v6
166130
with:
167-
name: wheel
131+
name: Packages
168132
path: dist
169133
- name: Install Dependencies
170134
run: |
@@ -190,7 +154,7 @@ jobs:
190154
env:
191155
DJANGO_DEBUG: True
192156
GITHUB_DB_BACKEND: ${{ matrix.db-backend }}
193-
- uses: actions/upload-artifact@v4
157+
- uses: actions/upload-artifact@v5
194158
with:
195159
name: screenshots
196160
path: screenshots/**/*.png
@@ -202,9 +166,10 @@ jobs:
202166
runs-on: ubuntu-24.04
203167
steps:
204168
- name: Run Coveralls finish
205-
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
169+
uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2.3.7
206170
with:
207171
parallel-finished: true
172+
fail-on-error: false
208173

209174
dev-setup:
210175
# Ref: structlog (MIT licensed) <https://github.com/hynek/structlog/blob/main/.github/workflows/ci.yml>
@@ -214,8 +179,10 @@ jobs:
214179
matrix:
215180
os: [ubuntu-latest, windows-latest, macos-latest]
216181
steps:
217-
- uses: actions/checkout@v4
218-
- uses: actions/setup-python@v5
182+
- uses: actions/checkout@v6
183+
with:
184+
persist-credentials: false
185+
- uses: actions/setup-python@v6
219186
with:
220187
python-version: "3.13"
221188
cache: pip
@@ -227,24 +194,26 @@ jobs:
227194
needs: build-wheel
228195
runs-on: ubuntu-24.04
229196
steps:
230-
- uses: actions/checkout@v4
231-
- uses: actions/setup-python@v5
197+
- uses: actions/checkout@v6
198+
with:
199+
persist-credentials: false
200+
- uses: actions/setup-python@v6
232201
with:
233202
python-version: "3.13"
234203
cache: pip
235204
- name: Download wheel
236-
uses: actions/download-artifact@v4
205+
uses: actions/download-artifact@v6
237206
with:
238-
name: wheel
207+
name: Packages
239208
path: dist
240209
- name: Install os requirements for python-ldap
241210
run: sudo apt-get update && sudo apt-get install --yes libldap2-dev libsasl2-dev
242211
- run: python -m pip install --upgrade pip
243212
- name: Install rdmo wheel with all optional dependency groups
244-
run: python -m pip install --no-compile "$(ls dist/*.whl)[allauth,ci,dev,gunicorn,ldap,mysql,postgres,pytest]"
213+
run: python -m pip install --no-compile "$(ls dist/*.whl)[all]"
245214
- name: Verify installed packages have compatible dependencies
246215
run: python -m pip check
247-
- uses: actions/setup-node@v4
216+
- uses: actions/setup-node@v6
248217
with:
249218
node-version: 22
250219
cache: npm
@@ -286,6 +255,6 @@ jobs:
286255
- dependencies
287256
runs-on: ubuntu-24.04
288257
steps:
289-
- uses: re-actors/alls-green@release/v1
258+
- uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
290259
with:
291260
jobs: ${{ toJSON(needs) }}

.pre-commit-config.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repos:
99
hooks:
1010
- id: check-hooks-apply
1111
- repo: https://github.com/pre-commit/pre-commit-hooks
12-
rev: v5.0.0
12+
rev: v6.0.0
1313
hooks:
1414
- id: check-ast
1515
- id: check-json
@@ -22,12 +22,12 @@ repos:
2222
exclude: \.dot$
2323
- id: debug-statements
2424
- repo: https://github.com/astral-sh/ruff-pre-commit
25-
rev: v0.11.12
25+
rev: v0.14.7
2626
hooks:
27-
- id: ruff
27+
- id: ruff-check
2828
args: [--fix, --exit-non-zero-on-fix]
2929
- repo: https://github.com/pre-commit/mirrors-eslint
30-
rev: v9.28.0
30+
rev: v9.39.1
3131
hooks:
3232
- id: eslint
3333
args: [--fix, --color]
@@ -36,7 +36,7 @@ repos:
3636
- eslint-plugin-react@7.37.0
3737
- react@18.3.1
3838
- repo: https://github.com/crate-ci/typos
39-
rev: v1
39+
rev: v1.40.0
4040
hooks:
4141
- id: typos
4242
exclude: |
@@ -49,6 +49,11 @@ repos:
4949
testing/.*.json|
5050
testing/.*.xml
5151
)$
52+
- repo: https://github.com/zizmorcore/zizmor-pre-commit
53+
rev: v1.18.0
54+
hooks:
55+
- id: zizmor
56+
args: [--fix, --offline]
5257
ci:
5358
autoupdate_schedule: monthly
5459
autofix_prs: false

CHANGELOG.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,55 @@
11
# Changelog 📔
22

3+
## [RDMO 2.4.0](https://github.com/rdmorganiser/rdmo/releases/tag/2.4.0) (December 15, 2025)
4+
5+
### Main improvements ⭐
6+
7+
* Rewrite progress bar and navigation using a new `AnswerTree` class (#1346)
8+
* Allow links in select dropdown by optionset provider plugins (#1408)
9+
10+
### Breaking changes ⚠️
11+
12+
* The filtering behaviour of sites in a multisite setup for catalogs, tasks and views was changed (#1488).
13+
From now on, but only when `settings.MULTISITE = True`, a catalog that does not have any sites associated
14+
with it will not be available to **any site**. Before those catalogs were available to all sites. For non-multisite
15+
instances, this behaviour will not change. A data migration for catalogs is included in this release, so that
16+
no extra action is required when updating.
17+
* The rules `is_editor_for_current_site` and `is_reviewer_for_current_site` (which might be used in templates) were
18+
removed and the equivalent `is_editor` and `is_reviewer` can be used instead (#1431).
19+
20+
### Bug fixes 🐛
21+
22+
* Fix a bug with the autosave of checkboxes, radio buttons and additional input (#1406)
23+
* Fix a bug where text and icons overlap in the interview (#1398)
24+
* Fix datepicker date conversion in interview (#1465)
25+
* Fix a bug with legacy management permissions and disable the latter in a multisite setup (#1425)
26+
* Fix a bug with verbose name that contain a space (#1453)
27+
* Fix a bug with site availability of catalogs in a multisite setup (#1481)
28+
29+
### Translations 🌍
30+
31+
* Consistent naming of "Tabs" in every language (#1459)
32+
* Language improvements in the French localisation (#1397)
33+
* Several minor fixes (#1411, #1424)
34+
35+
### Maintenance and Dependencies 🔧
36+
37+
* Drop support for Python 3.9
38+
* Add `all` and `recommended` dependency groups
39+
* Ignore fewer `ruff` rules (`B007`, `B006`, `B018`)
40+
* Use [zizmor](https://github.com/zizmorcore/zizmor) to harden CI setup
41+
* Update `poedit` management script to work on macOS
42+
* Add checks for shibboleth setup (#1407)
43+
* Add cookies to window (#1473)
44+
* Use dynamic versioning (#1486)
45+
46+
**Milestones**:
47+
[2.3.3](https://github.com/rdmorganiser/rdmo/milestone/24?closed=1),
48+
[2.4.0](https://github.com/rdmorganiser/rdmo/milestone/21?closed=1)
49+
50+
**Commit history**: [2.3.2...2.4.0](https://github.com/rdmorganiser/rdmo/compare/2.3.2...2.4.0)
51+
52+
353
## [RDMO 2.3.2](https://github.com/rdmorganiser/rdmo/compare/2.3.1...2.3.2) (July 4, 2025)
454

555
* Improve ORCID branding display and social connections page (#1376)

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ If you decide to work on the issue yourself, please wait until you received some
3131

3232
## How to set up your development environment
3333

34-
You need [Python 3.9+](https://www.python.org/downloads).
34+
You need [Python 3.10+](https://www.python.org/downloads).
3535

3636
Install the package with development requirements:
3737

0 commit comments

Comments
 (0)