Skip to content

Commit

Permalink
Merge branch 'release/0.3.10' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvw committed Dec 15, 2023
2 parents bb1b8d8 + f4cfe0f commit 5c920f0
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 27 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 @@ -9,8 +9,8 @@ Model field classes for clinicedc/edc projects
.. |pypi| image:: https://img.shields.io/pypi/v/edc-model-fields.svg
:target: https://pypi.python.org/pypi/edc-model-fields

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

.. |coverage| image:: https://coveralls.io/repos/github/clinicedc/edc-model-fields/badge.svg?branch=develop
:target: https://coveralls.io/github/clinicedc/edc-model-fields?branch=develop
16 changes: 8 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,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
20 changes: 5 additions & 15 deletions runtests.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
#!/usr/bin/env python
import logging
import os
import sys
from os.path import abspath, dirname
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

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

DEFAULT_SETTINGS = DefaultTestSettings(
project_settings = DefaultTestSettings(
calling_file=__file__,
template_dirs=[os.path.join(base_dir, app_name, "tests", "templates")],
BASE_DIR=base_dir,
APP_NAME=app_name,
SUBJECT_VISIT_MODEL="edc_visit_tracking.subjectvisit",
Expand Down Expand Up @@ -54,11 +48,7 @@


def main():
if not settings.configured:
settings.configure(**DEFAULT_SETTINGS)
django.setup()
failures = DiscoverRunner(failfast=True).run_tests([f"{app_name}.tests"])
sys.exit(failures)
func_main(project_settings, f"{app_name}.tests")


if __name__ == "__main__":
Expand Down

0 comments on commit 5c920f0

Please sign in to comment.