Skip to content

Commit

Permalink
Merge branch 'release/0.3.65' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvw committed Dec 13, 2023
2 parents dbd2b4f + e59a6e7 commit 9a8fc83
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 31 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
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ The AE action items are not registered by default. To register, in the root of y
.. |pypi| image:: https://img.shields.io/pypi/v/edc-adverse-event.svg
:target: https://pypi.python.org/pypi/edc-adverse-event

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

.. |codecov| image:: https://codecov.io/gh/clinicedc/edc-adverse-event/branch/develop/graph/badge.svg
:target: https://codecov.io/gh/clinicedc/edc-adverse-event
Expand Down
4 changes: 2 additions & 2 deletions edc_adverse_event/tests/tests/test_ae_and_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
from edc_list_data.site_list_data import site_list_data
from edc_ltfu.constants import LOST_TO_FOLLOWUP
from edc_registration.models import RegisteredSubject
from edc_registration.utils import RegisteredSubjectDoesNotExist
from edc_reportable import GRADE5
from edc_sites.valid_site_for_subject_or_raise import InvalidSubjectError
from edc_utils import get_utcnow
from edc_visit_schedule.utils import OnScheduleError
from model_bakery import baker
Expand Down Expand Up @@ -53,7 +53,7 @@ def test_subject_identifier(self):
)

self.assertRaises(
InvalidSubjectError,
RegisteredSubjectDoesNotExist,
baker.make_recipe,
"adverse_event_app.aeinitial",
subject_identifier="blahblah",
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
23 changes: 7 additions & 16 deletions runtests.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
#!/usr/bin/env python
import logging
import os
import sys
from os.path import abspath, dirname
from pathlib import Path

import django
from dateutil.relativedelta import relativedelta
from django.conf import settings
from django.test.runner import DiscoverRunner
from edc_constants.constants import IGNORE
from edc_test_utils import DefaultTestSettings
from edc_test_utils import DefaultTestSettings, func_main
from edc_utils import get_utcnow

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

DEFAULT_SETTINGS = DefaultTestSettings(
project_settings = DefaultTestSettings(
calling_file=__file__,
BASE_DIR=base_dir,
APP_NAME=app_name,
ETC_DIR=os.path.join(base_dir, app_name, "tests", "etc"),
ETC_DIR=str(base_dir / app_name / "tests" / "etc"),
SUBJECT_VISIT_MODEL="adverse_event_app.subjectvisit",
ADVERSE_EVENT_APP_LABEL="adverse_event_app",
ADVERSE_EVENT_ADMIN_SITE="adverse_event_app_admin",
Expand All @@ -35,6 +30,7 @@
EDC_NAVBAR_VERIFY_ON_LOAD=IGNORE,
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 Down Expand Up @@ -75,12 +71,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
3 changes: 0 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ python_requires = >=3.11
zip_safe = False
include_package_data = True
packages = find:
install_requires =
inflect==6.0.4
pydantic<2

[options.packages.find]
exclude =
Expand Down

0 comments on commit 9a8fc83

Please sign in to comment.