Skip to content

Commit

Permalink
Merge branch 'release/0.3.2' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvw committed Dec 14, 2023
2 parents 013a437 + e02a386 commit 45a6385
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 52 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11']
django-version: ['4.1', '4.2', 'dev']
python-version: ['3.11', '3.12']
django-version: ['4.2', '5.0', 'dev']

exclude:
- python-version: '3.10'
- python-version: '3.12'
django-version: '4.2'
- python-version: '3.11'
django-version: 'dev'
services:
mysql:
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ See also:
.. |pypi| image:: https://img.shields.io/pypi/v/edc-qol.svg
:target: https://pypi.python.org/pypi/edc-qol

.. |actions| image:: https://github.com/clinicedc/edc-qol/workflows/build/badge.svg?branch=develop
:target: https://github.com/clinicedc/edc-qol/actions?query=workflow:build
.. |actions| image:: https://github.com/clinicedc/edc-qol/actions/workflows/build.yml/badge.svg
:target: https://github.com/clinicedc/edc-qol/actions/workflows/build.yml

.. |codecov| image:: https://codecov.io/gh/clinicedc/edc-qol/branch/develop/graph/badge.svg
:target: https://codecov.io/gh/clinicedc/edc-qol
Expand Down
11 changes: 6 additions & 5 deletions edc_qol/migrations/0004_icecapa_historicalicecapa.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
# Generated by Django 4.1.7 on 2023-04-25 15:46

import uuid

import _socket
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django_audit_fields.fields.hostname_modification_field
import django_audit_fields.fields.userfield
import django_audit_fields.fields.uuid_auto_field
import django_audit_fields.models.audit_model_mixin
import django_revision.revision_field
import edc_sites.model_mixins
import edc_sites.models
import edc_utils.date
import simple_history.models
import uuid
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):
Expand Down Expand Up @@ -213,7 +214,7 @@ class Migration(migrations.Migration):
"default_permissions": ("add", "change", "delete", "view", "export", "import"),
},
managers=[
("on_site", edc_sites.model_mixins.CurrentSiteManager()),
("on_site", edc_sites.models.CurrentSiteManager()),
],
),
migrations.CreateModel(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Generated by Django 4.2.1 on 2023-07-05 02:16

from django.db import migrations
import django.db.models.manager
import edc_sites.model_mixins
import edc_sites.models
from django.db import migrations


class Migration(migrations.Migration):
Expand Down Expand Up @@ -68,21 +68,21 @@ class Migration(migrations.Migration):
migrations.AlterModelManagers(
name="eq5d3l",
managers=[
("on_site", edc_sites.model_mixins.CurrentSiteManager()),
("on_site", edc_sites.models.CurrentSiteManager()),
("objects", django.db.models.manager.Manager()),
],
),
migrations.AlterModelManagers(
name="icecapa",
managers=[
("on_site", edc_sites.model_mixins.CurrentSiteManager()),
("on_site", edc_sites.models.CurrentSiteManager()),
("objects", django.db.models.manager.Manager()),
],
),
migrations.AlterModelManagers(
name="sf12",
managers=[
("on_site", edc_sites.model_mixins.CurrentSiteManager()),
("on_site", edc_sites.models.CurrentSiteManager()),
("objects", django.db.models.manager.Manager()),
],
),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Generated by Django 4.2.1 on 2023-07-07 19:32

from django.db import migrations
import django.db.models.manager
import edc_sites.model_mixins
import edc_sites.models
from django.db import migrations


class Migration(migrations.Migration):
Expand All @@ -15,21 +15,21 @@ class Migration(migrations.Migration):
name="eq5d3l",
managers=[
("objects", django.db.models.manager.Manager()),
("on_site", edc_sites.model_mixins.CurrentSiteManager()),
("on_site", edc_sites.models.CurrentSiteManager()),
],
),
migrations.AlterModelManagers(
name="icecapa",
managers=[
("objects", django.db.models.manager.Manager()),
("on_site", edc_sites.model_mixins.CurrentSiteManager()),
("on_site", edc_sites.models.CurrentSiteManager()),
],
),
migrations.AlterModelManagers(
name="sf12",
managers=[
("objects", django.db.models.manager.Manager()),
("on_site", edc_sites.model_mixins.CurrentSiteManager()),
("on_site", edc_sites.models.CurrentSiteManager()),
],
),
]
2 changes: 1 addition & 1 deletion edc_qol/models/icecapa.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django.db import models
from edc_identifier.model_mixins import UniqueSubjectIdentifierFieldMixin
from edc_model.models import BaseUuidModel, HistoricalRecords
from edc_sites.model_mixins import CurrentSiteManager, SiteModelMixin
from edc_sites.models import CurrentSiteManager, SiteModelMixin
from edc_utils import get_utcnow

from ..model_mixins import IcecapaModelMixin
Expand Down
25 changes: 12 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
[build-system]
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=60", "setuptools-scm>=8.0"]

[tool.setuptools_scm]
write_to = "_version.py"
version_file="_version.py"

[tool.black]
line-length = 95
target-version = ["py310"]
target-version = ["py311"]
extend-exclude = '''^(.*\/)*\b(migrations)\b($|\/.*$)'''

[tool.isort]
profile = "black"
py_version = "310"
py_version = "311"
skip = [".tox", ".eggs", "migrations"]

[tool.coverage.run]
Expand All @@ -36,31 +35,31 @@ exclude_lines = [
legacy_tox_ini = """
[tox]
envlist =
py{310}-dj{41,42},
py{311}-dj{41,42,dev},
py{311}-dj{42,50},
py{312}-dj{50,dev},
lint
isolated_build = true
[gh-actions]
python =
3.10: py310
3.11: py311, lint
3.11: py311
3.12: py312, lint
[gh-actions:env]
DJANGO =
4.1: dj41
4.2: dj42, lint
dev: djdev
4.2: dj42
5.0: dj50
dev: djdev, lint
[testenv]
deps =
-r https://raw.githubusercontent.com/clinicedc/edc/develop/requirements.tests/tox.txt
-r https://raw.githubusercontent.com/clinicedc/edc/develop/requirements.tests/test_utils.txt
-r https://raw.githubusercontent.com/clinicedc/edc/develop/requirements.tests/edc.txt
-r https://raw.githubusercontent.com/clinicedc/edc/develop/requirements.tests/third_party_dev.txt
dj41: Django>=4.1,<4.2
dj42: Django>=4.2,<5.0
dj50: Django>=5.0
djdev: https://github.com/django/django/tarball/main
commands =
Expand Down
24 changes: 9 additions & 15 deletions runtests.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
#!/usr/bin/env python
import logging
import sys
from os.path import abspath, dirname, join
from pathlib import Path

import django
from django.conf import settings
from django.test.runner import DiscoverRunner
from edc_test_utils import DefaultTestSettings
from edc_test_utils import DefaultTestSettings, func_main

base_dir = dirname(abspath(__file__))
app_name = "edc_qol"

DEFAULT_SETTINGS = DefaultTestSettings(
base_dir = Path(__file__).absolute().parent

project_settings = DefaultTestSettings(
calling_file=__file__,
BASE_DIR=base_dir,
APP_NAME=app_name,
SUBJECT_VISIT_MODEL="edc_visit_tracking.subjectvisit",
ETC_DIR=join(base_dir, app_name, "tests", "etc"),
ETC_DIR=str(base_dir / app_name / "tests" / "etc"),
EDC_AUTH_SKIP_SITE_AUTHS=True,
EDC_AUTH_SKIP_AUTH_UPDATER=True,
EDC_SITES_REGISTER_DEFAULT=True,
INSTALLED_APPS=[
"django.contrib.admin",
"django.contrib.auth",
Expand All @@ -38,6 +36,7 @@
"edc_device.apps.AppConfig",
"edc_notification.apps.AppConfig",
"edc_registration.apps.AppConfig",
"edc_visit_schedule.apps.AppConfig",
"edc_visit_tracking.apps.AppConfig",
"edc_sites.apps.AppConfig",
"edc_qol.apps.AppConfig",
Expand All @@ -47,12 +46,7 @@


def main():
if not settings.configured:
settings.configure(**DEFAULT_SETTINGS)
django.setup()
tags = [t.split("=")[1] for t in sys.argv if t.startswith("--tag")]
failures = DiscoverRunner(failfast=False, tags=tags).run_tests([f"{app_name}.tests"])
sys.exit(failures)
func_main(project_settings, *[f"{app_name}.tests"])


if __name__ == "__main__":
Expand Down
5 changes: 2 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,16 @@ keywords = django Edc EuroQol EQ-5D-3L, CRF, clinicedc, clinical trials
classifiers=
Environment :: Web Environment
Framework :: Django
Framework :: Django :: 4.1
Framework :: Django :: 4.2
Intended Audience :: Developers
Intended Audience :: Science/Research
Operating System :: OS Independent
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
License :: OSI Approved :: GNU General Public License v3 (GPLv3)


[options]
python_requires = >=3.10
python_requires = >=3.11
zip_safe = False
include_package_data = True
packages = find:
Expand Down

0 comments on commit 45a6385

Please sign in to comment.