Skip to content

Commit ab58568

Browse files
authored
merge v1.2.3 release
2 parents 732a426 + cb857bd commit ab58568

Some content is hidden

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

52 files changed

+472
-355
lines changed

.github/ISSUE_TEMPLATE/release_cleanup.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ assignees: 'mikkonie'
1111

1212
TBA
1313

14+
## Documentation
15+
16+
TBA
17+
1418
## Issues to Add in CHANGELOG
1519

1620
TBA

CHANGELOG.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,35 @@ Changelog for the **SODAR Core** Django app package. Loosely follows the
55
`Keep a Changelog <http://keepachangelog.com/en/1.0.0/>`_ guidelines.
66

77

8+
v1.2.3 (2025-09-26)
9+
===================
10+
11+
Added
12+
-----
13+
14+
- **General**
15+
- Documentation section in ``release_cleanup.md`` issue template (#1776)
16+
- **Projectroles**
17+
- ``get_sodar_constant()`` common template tag (#1772)
18+
19+
Changed
20+
-------
21+
22+
- **General**
23+
- Update ``test.py`` settings hardcoding (#1768)
24+
25+
Fixed
26+
-----
27+
28+
- **General**
29+
- Type hint issues (#1769)
30+
- UI tests failing with ``ENABLE_LDAP=0`` and ``ENABLE_OIDC=1`` (#1767)
31+
- **Projectroles**
32+
- ``_modal.html`` close button padding (#1764)
33+
- Uncaught exception in ``ProjectForm`` with empty ``title`` field (#1778)
34+
- ``ProjectCreateView`` fields not correctly displayed on field error reload (#1770)
35+
36+
837
v1.2.2 (2025-09-17)
938
===================
1039

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ and breaking changes are possible.
117117

118118
.. code-block:: console
119119
120-
pip install django-sodar-core==1.2.2
120+
pip install django-sodar-core==1.2.3
121121
122122
For installing a development version you can point your dependency to a specific
123123
commit ID in GitHub. Note that these versions may not be stable.

adminalerts/plugins.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,21 @@
22

33
from typing import Optional
44

5+
from django.contrib.auth import get_user_model
56
from django.urls import reverse
67
from django.utils import timezone
78

89
# Projectroles dependency
9-
from projectroles.models import SODARUser, SODAR_CONSTANTS
10+
from projectroles.models import SODAR_CONSTANTS
1011
from projectroles.plugins import SiteAppPluginPoint, PluginAppSettingDef
1112

1213
from adminalerts.models import AdminAlert
1314
from adminalerts.urls import urlpatterns
1415

1516

17+
User = get_user_model()
18+
19+
1620
# SODAR constants
1721
APP_SETTING_SCOPE_USER = SODAR_CONSTANTS['APP_SETTING_SCOPE_USER']
1822
APP_SETTING_TYPE_BOOLEAN = SODAR_CONSTANTS['APP_SETTING_TYPE_BOOLEAN']
@@ -71,7 +75,7 @@ def get_statistics(self) -> dict:
7175
}
7276
}
7377

74-
def get_messages(self, user: Optional[SODARUser] = None) -> list[dict]:
78+
def get_messages(self, user: Optional[User] = None) -> list[dict]:
7579
"""
7680
Return a list of messages to be shown to users.
7781

adminalerts/tests/test_models.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
"""Tests for models in the adminalerts app"""
22

3+
from django.contrib.auth import get_user_model
34
from django.forms.models import model_to_dict
45
from django.utils import timezone
56

67
from test_plus.test import TestCase
78

8-
# Projectroles dependency
9-
from projectroles.models import SODARUser
10-
119
from adminalerts.models import AdminAlert
1210

1311

12+
User = get_user_model()
13+
14+
1415
class AdminAlertMixin:
1516
"""Helper mixin for AdminAlert creation"""
1617

1718
@classmethod
1819
def make_alert(
1920
cls,
2021
message: str,
21-
user: SODARUser,
22+
user: User,
2223
description: str,
2324
active: bool = True,
2425
require_auth: bool = True,

appalerts/api.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,17 @@
22

33
from typing import Optional
44

5+
from django.contrib.auth import get_user_model
6+
57
from djangoplugins.models import Plugin
68

79
from appalerts.models import AppAlert, ALERT_LEVELS
810

911
# Projectroles dependency
10-
from projectroles.models import Project, SODARUser
12+
from projectroles.models import Project
13+
14+
15+
User = get_user_model()
1116

1217

1318
class AppAlertAPI:
@@ -27,7 +32,7 @@ def add_alert(
2732
cls,
2833
app_name: str,
2934
alert_name: str,
30-
user: SODARUser,
35+
user: User,
3136
message: str,
3237
level: str = 'INFO',
3338
url: Optional[str] = None,
@@ -72,7 +77,7 @@ def add_alerts(
7277
cls,
7378
app_name: str,
7479
alert_name: str,
75-
users: list[SODARUser],
80+
users: list[User],
7681
message: str,
7782
level: str = 'INFO',
7883
url: Optional[str] = None,

appalerts/tests/test_models.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,24 @@
22

33
from typing import Optional
44

5+
from django.contrib.auth import get_user_model
56
from django.core.exceptions import ValidationError
67
from django.forms.models import model_to_dict
78
from django.urls import reverse
89

9-
from djangoplugins.models import Plugin, PluginPoint
10+
from djangoplugins.models import Plugin
1011
from test_plus.test import TestCase
1112

1213
# Projectroles dependency
13-
from projectroles.models import Project, SODARUser, SODAR_CONSTANTS
14+
from projectroles.models import Project, SODAR_CONSTANTS
1415
from projectroles.tests.test_models import ProjectMixin
1516

1617
from appalerts.models import AppAlert
1718

1819

20+
User = get_user_model()
21+
22+
1923
# SODAR constants
2024
PROJECT_TYPE_PROJECT = SODAR_CONSTANTS['PROJECT_TYPE_PROJECT']
2125

@@ -32,9 +36,9 @@ class AppAlertMixin:
3236
@classmethod
3337
def make_app_alert(
3438
cls,
35-
app_plugin: Optional[PluginPoint] = None,
39+
app_plugin: Optional[Plugin] = None,
3640
alert_name: str = ALERT_NAME,
37-
user: Optional[SODARUser] = None,
41+
user: Optional[User] = None,
3842
message: str = ALERT_MSG,
3943
level: str = ALERT_LEVEL,
4044
active: bool = True,

codemeta.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@
4040
],
4141
"identifier": "https://doi.org/10.5281/zenodo.4269346",
4242
"codeRepository": "https://github.com/bihealth/sodar-core",
43-
"datePublished": "2025-09-17",
44-
"dateModified": "2025-09-17",
43+
"datePublished": "2025-09-26",
44+
"dateModified": "2025-09-26",
4545
"dateCreated": "2019-06-26",
4646
"description": "SODAR Core: A Django-based framework for scientific data management and analysis web apps",
4747
"keywords": "Python, Django, scientific data managmenent, software library",
4848
"license": "MIT",
4949
"title": "SODAR Core",
50-
"version": "v1.2.2"
50+
"version": "v1.2.3"
5151
}

config/settings/base.py

Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"""
1010

1111
import environ
12-
import itertools
1312
import os
1413

1514
from projectroles.constants import get_sodar_constants
@@ -412,12 +411,9 @@
412411
AUTH_LDAP_DOMAIN_PRINTABLE = env.str(
413412
'AUTH_LDAP_DOMAIN_PRINTABLE', AUTH_LDAP_USERNAME_DOMAIN
414413
)
415-
AUTHENTICATION_BACKENDS = tuple(
416-
itertools.chain(
417-
('projectroles.auth_backends.PrimaryLDAPBackend',),
418-
AUTHENTICATION_BACKENDS,
419-
)
420-
)
414+
AUTHENTICATION_BACKENDS = [
415+
'projectroles.auth_backends.PrimaryLDAPBackend'
416+
] + AUTHENTICATION_BACKENDS
421417

422418
# Secondary LDAP server (optional)
423419
if ENABLE_LDAP_SECONDARY:
@@ -448,12 +444,9 @@
448444
AUTH_LDAP2_DOMAIN_PRINTABLE = env.str(
449445
'AUTH_LDAP2_DOMAIN_PRINTABLE', AUTH_LDAP2_USERNAME_DOMAIN
450446
)
451-
AUTHENTICATION_BACKENDS = tuple(
452-
itertools.chain(
453-
('projectroles.auth_backends.SecondaryLDAPBackend',),
454-
AUTHENTICATION_BACKENDS,
455-
)
456-
)
447+
AUTHENTICATION_BACKENDS = [
448+
'projectroles.auth_backends.SecondaryLDAPBackend'
449+
] + AUTHENTICATION_BACKENDS
457450

458451

459452
# OpenID Connect (OIDC) configuration
@@ -462,12 +455,9 @@
462455
ENABLE_OIDC = env.bool('ENABLE_OIDC', False)
463456

464457
if ENABLE_OIDC:
465-
AUTHENTICATION_BACKENDS = tuple(
466-
itertools.chain(
467-
('social_core.backends.open_id_connect.OpenIdConnectAuth',),
468-
AUTHENTICATION_BACKENDS,
469-
)
470-
)
458+
AUTHENTICATION_BACKENDS = [
459+
'social_core.backends.open_id_connect.OpenIdConnectAuth'
460+
] + AUTHENTICATION_BACKENDS
471461
TEMPLATES[0]['OPTIONS']['context_processors'] += [
472462
'social_django.context_processors.backends',
473463
'social_django.context_processors.login_redirect',
@@ -684,13 +674,16 @@ def set_logging(level=None):
684674
MIDDLEWARE += ['projectroles.middleware.ProfilerMiddleware']
685675

686676

687-
# Bgjobs app settings
688-
BGJOBS_PAGINATION = env.int('BGJOBS_PAGINATION', 15)
677+
# Adminalerts app settings
678+
ADMINALERTS_PAGINATION = env.int('ADMINALERTS_PAGINATION', 15)
689679

690680

691-
# Timeline app settings
692-
TIMELINE_PAGINATION = env.int('TIMELINE_PAGINATION', 15)
693-
TIMELINE_SEARCH_LIMIT = env.int('TIMELINE_SEARCH_LIMIT', 250)
681+
# Appalerts app settings
682+
APPALERTS_STATUS_INTERVAL = env.int('APPALERTS_STATUS_INTERVAL', 5)
683+
684+
685+
# Bgjobs app settings
686+
BGJOBS_PAGINATION = env.int('BGJOBS_PAGINATION', 15)
694687

695688

696689
# Filesfolders app settings
@@ -710,12 +703,9 @@ def set_logging(level=None):
710703
)
711704

712705

713-
# Adminalerts app settings
714-
ADMINALERTS_PAGINATION = env.int('ADMINALERTS_PAGINATION', 15)
715-
716-
717-
# Appalerts app settings
718-
APPALERTS_STATUS_INTERVAL = env.int('APPALERTS_STATUS_INTERVAL', 5)
706+
# Timeline app settings
707+
TIMELINE_PAGINATION = env.int('TIMELINE_PAGINATION', 15)
708+
TIMELINE_SEARCH_LIMIT = env.int('TIMELINE_SEARCH_LIMIT', 250)
719709

720710

721711
# Tokens app settings

0 commit comments

Comments
 (0)