Skip to content

Commit

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

exclude:
- python-version: '3.12'
django-version: '4.2'
- python-version: '3.11'
django-version: 'dev'
services:
mysql:
image: mysql:latest
Expand Down
5 changes: 3 additions & 2 deletions edc_pharmacy/migrations/0018_alter_rxrefill_managers.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Generated by Django 4.2.1 on 2023-07-07 19:32

import edc_sites.models
from django.db import migrations

import edc_pharmacy.models.rx_refill
import edc_sites.model_mixins


class Migration(migrations.Migration):
Expand All @@ -18,7 +19,7 @@ class Migration(migrations.Migration):
name="rxrefill",
managers=[
("objects", edc_pharmacy.models.rx_refill.Manager()),
("on_site", edc_sites.model_mixins.CurrentSiteManager()),
("on_site", edc_sites.models.CurrentSiteManager()),
],
),
]
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Generated by Django 4.2.7 on 2023-12-04 22:19

import uuid

import edc_sites.models
from django.db import migrations, models

import edc_pharmacy.models.rx
import edc_sites.model_mixins
import uuid


class Migration(migrations.Migration):
Expand Down Expand Up @@ -456,7 +458,7 @@ class Migration(migrations.Migration):
name="rx",
managers=[
("objects", edc_pharmacy.models.rx.Manager()),
("on_site", edc_sites.model_mixins.CurrentSiteManager()),
("on_site", edc_sites.models.CurrentSiteManager()),
],
),
migrations.RemoveIndex(
Expand Down
5 changes: 2 additions & 3 deletions edc_pharmacy/tests/tests/test_packaging.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
from dateutil.relativedelta import relativedelta
from django.test import TestCase
from django.test import TestCase, override_settings
from edc_facility import import_holidays
from edc_list_data import site_list_data
from edc_randomization.constants import ACTIVE, PLACEBO
from edc_randomization.site_randomizers import site_randomizers
from edc_randomization.tests.testcase_mixin import TestCaseMixin, all_sites
from edc_sites import add_or_update_django_sites
from edc_utils import get_utcnow

from edc_pharmacy.exceptions import InsufficientQuantityError
Expand All @@ -28,6 +27,7 @@
)


@override_settings(SITE_ID=1)
class TestPackaging(TestCaseMixin, TestCase):
import_randomization_list = True
site_names = [x.name for x in all_sites]
Expand All @@ -36,7 +36,6 @@ class TestPackaging(TestCaseMixin, TestCase):
@classmethod
def setUpTestData(cls):
import_holidays(test=True)
add_or_update_django_sites(sites=all_sites)
if cls.import_randomization_list:
randomizer_cls = site_randomizers.get("default")
randomizer_cls.import_list(
Expand Down
2 changes: 1 addition & 1 deletion edc_pharmacy/tests/tests/test_study_medication_crf.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from ..visit_schedule import visit_schedule


@override_settings(SUBJECT_CONSENT_MODEL="edc_pharmacy.subjectconsent")
@override_settings(SUBJECT_CONSENT_MODEL="edc_pharmacy.subjectconsent", SITE_ID=1)
class TestMedicationCrf(TestCase):
helper_cls = Helper

Expand Down
14 changes: 8 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,29 +35,31 @@ exclude_lines = [
legacy_tox_ini = """
[tox]
envlist =
py{311}-dj{41,42,dev},
py{311}-dj{42,50},
py{312}-dj{50,dev},
lint
isolated_build = true
[gh-actions]
python =
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
5 changes: 3 additions & 2 deletions runtests.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#!/usr/bin/env python
import logging
from os.path import abspath, dirname
from pathlib import Path

from dateutil.relativedelta import relativedelta
from edc_constants.constants import IGNORE
from edc_test_utils import DefaultTestSettings, func_main
from edc_utils import get_utcnow

app_name = "edc_pharmacy"
base_dir = dirname(abspath(__file__))
base_dir = Path(__file__).absolute().parent

project_settings = DefaultTestSettings(
calling_file=__file__,
Expand All @@ -18,6 +18,7 @@
EDC_AUTH_SKIP_AUTH_UPDATER=True,
BASE_DIR=base_dir,
APP_NAME=app_name,
EDC_SITES_REGISTER_DEFAULT=True,
EDC_PROTOCOL_STUDY_OPEN_DATETIME=(
get_utcnow().replace(microsecond=0, second=0, minute=0, hour=0)
- relativedelta(years=6)
Expand Down

0 comments on commit 6a8da2a

Please sign in to comment.