Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ['3.10', '3.13']
python-version: ['3.10', '3.14']
db-backend: [mysql, postgres]
steps:
- uses: actions/checkout@v6
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
- name: Run package status tests first
run: |
pytest rdmo/core/tests/test_package_status.py --nomigrations --verbose
if: matrix.python-version == '3.13' && matrix.db-backend == 'postgres'
if: matrix.python-version == '3.14' && matrix.db-backend == 'postgres'
- name: Run Tests
run: |
pytest -p randomly -p no:cacheprovider --cov --reuse-db --numprocesses=auto --dist=loadscope
Expand All @@ -114,7 +114,7 @@ jobs:
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ['3.13']
python-version: ['3.14']
db-backend: [postgres]
steps:
- uses: actions/checkout@v6
Expand Down Expand Up @@ -184,7 +184,7 @@ jobs:
persist-credentials: false
- uses: actions/setup-python@v6
with:
python-version: "3.13"
python-version: "3.14"
cache: pip
- run: python -Im pip install --editable .[dev]
- run: python -Ic 'import rdmo; print(rdmo.__version__)'
Expand All @@ -199,7 +199,7 @@ jobs:
persist-credentials: false
- uses: actions/setup-python@v6
with:
python-version: "3.13"
python-version: "3.14"
cache: pip
- name: Download wheel
uses: actions/download-artifact@v6
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog 📔

## [RDMO 2.5.0](https://github.com/rdmorganiser/rdmo/releases/tag/2.5.0)

**Milestone**: [2.5.0](https://github.com/rdmorganiser/rdmo/milestone/26)

**Commit history**: [2.4.0...2.5.0](https://github.com/rdmorganiser/rdmo/compare/2.4.0...2.5.0)


## [RDMO 2.4.0](https://github.com/rdmorganiser/rdmo/releases/tag/2.4.0) (December 15, 2025)

### Main improvements ⭐
Expand Down
15 changes: 6 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ requires-python = ">=3.10"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.2",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python",
Expand All @@ -31,6 +31,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
dynamic = [
"version",
Expand All @@ -41,7 +42,7 @@ dependencies = [
# in minor version updates anytime
"defusedcsv>=2.0,<4.0",
"defusedxml>=0.7.1,<1.0",
"django>=4.2,<5.0",
"django>=5.2.8,<6.0",
"django-cleanup>=8.0,<10.0",
"django-compressor>=4.4,<5.0",
"django-extensions>=3.2,<5.0",
Expand Down Expand Up @@ -79,7 +80,7 @@ allauth = [
dev = [
"pipdeptree>=2.13,<3.0",
"pre-commit>=3.4,<5.0",
"setuptools>=73,<81",
"setuptools>=73,<83",
]
gunicorn = [
"gunicorn>=23.0,<24.0",
Expand Down Expand Up @@ -203,15 +204,11 @@ markers = [
"e2e: marks tests as end-to-end tests using playwright (deselect with '-m \"not e2e\"')",
]
filterwarnings = [
# fail on RemovedInDjango50Warning exception
"error::django.utils.deprecation.RemovedInDjango50Warning",
# throw an error when using methods deprecated in the next django version
"error::django.utils.deprecation.RemovedInNextVersionWarning",

# ignore warnings raised by widget_tweaks.py
"ignore:'maxsplit' is passed as positional argument",

# ignore warnings raised from within django itself
# django/core/files/storage/__init__.py
"ignore:django.core.files.storage.get_storage_class is deprecated:django.utils.deprecation.RemovedInDjango51Warning",
]

[tool.coverage.run]
Expand Down
2 changes: 2 additions & 0 deletions rdmo/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@
},
]

MESSAGE_STORAGE = "django.contrib.messages.storage.session.SessionStorage"

COMPRESS_PRECOMPILERS = (
('text/x-scss', 'django_libsass.SassCompiler'),
)
Expand Down
15 changes: 11 additions & 4 deletions rdmo/core/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@
]

invalid_date_strings = [
("2025-02-31","day is out of range for month"),
("2025-02-31", (
"day is out of range for month", # Python 3.10
"day 31 must be in range 1..28 for month 2 in year 2025" # Python 3.14
)
),
("2025-17-02", "month must be in 1..12"),
("99/99/9999", "Invalid date format"),
("abcd-ef-gh", "Invalid date format"),
Expand Down Expand Up @@ -91,11 +95,14 @@ def test_parse_date_from_string_valid_formats(settings, locale, date_string, exp

@pytest.mark.parametrize("invalid_date, error_msg", invalid_date_strings)
def test_parse_date_from_string_invalid_formats(settings, invalid_date, error_msg):
if not isinstance(invalid_date,str):
with pytest.raises(TypeError, match=error_msg):
patterns = error_msg if isinstance(error_msg, (tuple, list)) else (error_msg,)
match = "|".join(f"(?:{pattern})" for pattern in patterns)

if not isinstance(invalid_date, str):
with pytest.raises(TypeError, match=match):
parse_date_from_string(invalid_date)
else:
with pytest.raises(ValueError,match=error_msg):
with pytest.raises(ValueError, match=match):
parse_date_from_string(invalid_date)


Expand Down
6 changes: 1 addition & 5 deletions rdmo/views/templates/views/tags/value.html
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
{% if value.file_url %}
{% include 'views/tags/value_file.html' %}
{% else %}
<span>{{ value.value_and_unit }}</span>
{% endif %}
{% if value.file_url %}{% include 'views/tags/value_file.html' %}{% else %}<span>{{ value.value_and_unit }}</span>{% endif %}
4 changes: 1 addition & 3 deletions rdmo/views/templates/views/tags/value_inline_list.html
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{% for value in values %}
{{ value.value_and_unit }}{% if not forloop.last %}; {% endif %}
{% endfor %}
{% for value in values %}{{ value.value_and_unit }}{% if not forloop.last %}; {% endif %}{% endfor %}
11 changes: 11 additions & 0 deletions testing/config/settings/base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
from warnings import filterwarnings

from django.utils.translation import gettext_lazy as _

Expand Down Expand Up @@ -110,3 +111,13 @@

PROJECT_CONTACT = True
PROJECT_CONTACT_RECIPIENTS = ['email@example.com']

# Ref: https://adamj.eu/tech/2023/12/07/django-fix-urlfield-assume-scheme-warnings
filterwarnings(
"ignore", "The FORMS_URLFIELD_ASSUME_HTTPS transitional setting is deprecated."
)
# This value will change from False to True in Django 6.0
# Refs:
# - https://docs.djangoproject.com/en/5.2/ref/settings/#forms-urlfield-assume-https
# - https://docs.djangoproject.com/en/5.2/ref/forms/fields/#django.forms.URLField.assume_scheme
FORMS_URLFIELD_ASSUME_HTTPS = True
Loading
Loading