Skip to content

Commit 27bc211

Browse files
committed
Merge branch 'release/0.3.34' into main
2 parents 71d4e53 + d5f96b1 commit 27bc211

File tree

5 files changed

+28
-26
lines changed

5 files changed

+28
-26
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,14 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
python-version: ['3.11']
15-
django-version: ['4.2', 'dev']
14+
python-version: ['3.11', '3.12']
15+
django-version: ['4.2', '5.0', 'dev']
16+
17+
exclude:
18+
- python-version: '3.12'
19+
django-version: '4.2'
20+
- python-version: '3.11'
21+
django-version: 'dev'
1622
services:
1723
mysql:
1824
image: mysql:latest

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ before registering your custom modeladmin class.
5656
.. |pypi| image:: https://img.shields.io/pypi/v/edc-locator.svg
5757
:target: https://pypi.python.org/pypi/edc-locator
5858

59-
.. |actions| image:: https://github.com/clinicedc/edc-locator/workflows/build/badge.svg?branch=develop
60-
:target: https://github.com/clinicedc/edc-locator/actions?query=workflow:build
59+
.. |actions| image:: https://github.com/clinicedc/edc-locator/action/workflows/build.yml/badge.svg
60+
:target: https://github.com/clinicedc/edc-locator/action/workflows/build.yml
6161

6262
.. |codecov| image:: https://codecov.io/gh/clinicedc/edc-locator/branch/develop/graph/badge.svg
6363
:target: https://codecov.io/gh/clinicedc/edc-locator

edc_locator/migrations/0032_alter_subjectlocator_managers.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Generated by Django 4.2.1 on 2023-07-07 19:32
22

3+
import edc_sites.models
34
from django.db import migrations
5+
46
import edc_locator.model_mixins.locator_model_mixin
5-
import edc_sites.model_mixins
67

78

89
class Migration(migrations.Migration):
@@ -18,7 +19,7 @@ class Migration(migrations.Migration):
1819
"objects",
1920
edc_locator.model_mixins.locator_model_mixin.LocatorManager(),
2021
),
21-
("on_site", edc_sites.model_mixins.CurrentSiteManager()),
22+
("on_site", edc_sites.models.CurrentSiteManager()),
2223
],
2324
),
2425
]

pyproject.toml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,22 @@ exclude_lines = [
3535
legacy_tox_ini = """
3636
[tox]
3737
envlist =
38-
py{311}-dj{42,dev},
38+
py{311}-dj{42,50},
39+
py{312}-dj{50,dev},
3940
lint
4041
4142
isolated_build = true
4243
4344
[gh-actions]
4445
python =
45-
3.11: py311, lint
46+
3.11: py311
47+
3.12: py312, lint
4648
4749
[gh-actions:env]
4850
DJANGO =
49-
4.2: dj42, lint
50-
dev: djdev
51+
4.2: dj42
52+
5.0: dj50
53+
dev: djdev, lint
5154
5255
[testenv]
5356
deps =
@@ -56,6 +59,7 @@ deps =
5659
-r https://raw.githubusercontent.com/clinicedc/edc/develop/requirements.tests/edc.txt
5760
-r https://raw.githubusercontent.com/clinicedc/edc/develop/requirements.tests/third_party_dev.txt
5861
dj42: Django>=4.2,<5.0
62+
dj50: Django>=5.0
5963
djdev: https://github.com/django/django/tarball/main
6064
6165
commands =

runtests.py

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
11
#!/usr/bin/env python
22
import logging
3-
import os
4-
import sys
5-
from os.path import abspath, dirname
3+
from pathlib import Path
64

7-
import django
8-
from django.conf import settings
9-
from django.test.runner import DiscoverRunner
10-
from edc_test_utils import DefaultTestSettings
5+
from edc_test_utils import DefaultTestSettings, func_main
116

127
app_name = "edc_locator"
13-
base_dir = dirname(abspath(__file__))
8+
base_dir = Path(__file__).absolute().parent
149

15-
DEFAULT_SETTINGS = DefaultTestSettings(
10+
project_settings = DefaultTestSettings(
1611
calling_file=__file__,
17-
template_dirs=[os.path.join(base_dir, app_name, "tests", "templates")],
12+
template_dirs=[str(base_dir / app_name / "tests" / "templates")],
1813
BASE_DIR=base_dir,
1914
APP_NAME=app_name,
20-
ETC_DIR=os.path.join(base_dir, app_name, "tests", "etc"),
15+
ETC_DIR=str(base_dir / app_name / "tests" / "etc"),
2116
SUBJECT_VISIT_MODEL="edc_visit_tracking.subjectvisit",
2217
INSTALLED_APPS=[
2318
"django.contrib.admin",
@@ -54,11 +49,7 @@
5449

5550

5651
def main():
57-
if not settings.configured:
58-
settings.configure(**DEFAULT_SETTINGS)
59-
django.setup()
60-
failures = DiscoverRunner(failfast=True).run_tests([f"{app_name}.tests"])
61-
sys.exit(failures)
52+
func_main(project_settings, *[f"{app_name}.tests"])
6253

6354

6455
if __name__ == "__main__":

0 commit comments

Comments
 (0)