Skip to content

Commit

Permalink
Merge branch 'release/0.1.11' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvw committed May 24, 2023
2 parents 1e6b041 + 9dacafd commit 89ddffb
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 38 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,20 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10']
django-version: ['3.2', '4.0', '4.1', 'dev']
python-version: ['3.10', '3.11']
django-version: ['4.1', '4.2', 'dev']
exclude:
- python-version: '3.10'
django-version: 'dev'
services:
mysql:
image: mysql:latest
env:
MYSQL_DATABASE: mysql
MYSQL_ROOT_PASSWORD: mysql
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- name: Install pycups and words dependency
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ exclude: tests/etc/user-*

repos:
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
rev: 1.7.5
hooks:
- id: bandit
args:
- "-x *test*.py"

- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.3.0
hooks:
- id: black
language_version: python3.9
language_version: python3.10

- repo: https://github.com/pycqa/flake8
rev: 6.0.0
Expand All @@ -23,7 +23,7 @@ repos:
- "--config=setup.cfg"

- repo: https://github.com/PyCQA/isort
rev: 5.11.4
rev: 5.12.0
hooks:
- id: isort

Expand All @@ -42,7 +42,7 @@ repos:
- id: detect-private-key

- repo: https://github.com/adrienverge/yamllint
rev: v1.29.0
rev: v1.31.0
hooks:
- id: yamllint
args:
Expand Down
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

1 change: 0 additions & 1 deletion edc_vitals/model_mixins/blood_pressure_model_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class SimpleBloodPressureModelMixin(models.Model):

sys_blood_pressure = SystolicPressureField(
null=True,
blank=True,
Expand Down
1 change: 0 additions & 1 deletion edc_vitals/model_mixins/weight_height_bmi_model_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class WeightHeightBmiModelMixin(models.Model):

lower_bmi_value = 5.0

upper_bmi_value = 60.0
Expand Down
2 changes: 0 additions & 2 deletions edc_vitals/models/fields/blood_pressure.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@


class SystolicPressureField(models.IntegerField):

description = "Systolic pressure"

def __init__(self, *args, verbose_name=None, **kwargs):
Expand All @@ -21,7 +20,6 @@ def deconstruct(self):


class DiastolicPressureField(models.IntegerField):

description = "Diastolic pressure"

def __init__(self, *args, verbose_name=None, **kwargs):
Expand Down
1 change: 0 additions & 1 deletion edc_vitals/models/fields/heart_rate.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@


class HeartRateField(models.IntegerField):

description = "Heart rate in BPM"

def __init__(self, *args, **kwargs):
Expand Down
1 change: 0 additions & 1 deletion edc_vitals/models/fields/height.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@


class HeightField(models.DecimalField):

description = "Height in cm"

def __init__(self, *args, **kwargs):
Expand Down
1 change: 0 additions & 1 deletion edc_vitals/models/fields/respiratory_rate.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@


class RespiratoryRateField(models.IntegerField):

description = "Respiratory rate in breaths/min"

def __init__(self, *args, **kwargs):
Expand Down
1 change: 0 additions & 1 deletion edc_vitals/models/fields/temperature.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@


class TemperatureField(models.DecimalField):

description = "Temperature in degrees Celsius"

def __init__(self, *args, **kwargs):
Expand Down
1 change: 0 additions & 1 deletion edc_vitals/models/fields/waist_circumference.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@


class WaistCircumferenceField(models.DecimalField):

description = "Waist circumference"

def __init__(self, *args, **kwargs):
Expand Down
1 change: 0 additions & 1 deletion edc_vitals/models/fields/weight.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@


class WeightField(models.DecimalField):

description = "Weight in Kg"

def __init__(self, *args, **kwargs):
Expand Down
4 changes: 0 additions & 4 deletions edc_vitals/tests/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@ class BloodPressure(BloodPressureModelMixin, models.Model):


class HeartRate(models.Model):

heart_rate = HeartRateField(
null=True,
blank=True,
)


class RespiratoryRate(models.Model):

respiratory_rate = RespiratoryRateField(
null=True,
blank=True,
Expand All @@ -34,15 +32,13 @@ class SimpleBloodPressure(SimpleBloodPressureModelMixin, models.Model):


class Temperature(models.Model):

temperature = TemperatureField(
null=True,
blank=True,
)


class WeightHeightBmi(WeightHeightBmiModelMixin, models.Model):

report_datetime = models.DateTimeField(default=get_utcnow)

dob = models.DateField(null=True)
24 changes: 13 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ write_to = "_version.py"

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

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

[tool.coverage.run]
parallel = true
parallel = false
branch = true
source = ["edc_vitals"]

Expand All @@ -27,27 +27,30 @@ source = ["edc_vitals"]
show_missing = true
skip_covered = true
omit = ["requirements.txt"]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
]

[tool.tox]
legacy_tox_ini = """
[tox]
envlist =
py{38,39,310}-dj{32,40,41,dev},
py{310}-dj{41,42},
py{311}-dj{41,42,dev},
lint
isolated_build = true
[gh-actions]
python =
3.8: py38
3.9: py39, lint
3.10: py310
3.11: py311, lint
[gh-actions:env]
DJANGO =
3.2: dj32, lint
4.0: dj40
4.1: dj41
4.2: dj42, lint
dev: djdev
[testenv]
Expand All @@ -56,13 +59,12 @@ deps =
-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
dj32: Django>=3.2,<3.3
dj40: Django>=4.0,<4.1
dj41: Django>=4.1,<4.2
dj42: Django>=4.2,<5.0
djdev: https://github.com/django/django/tarball/main
commands =
pip install -U pip
pip install -U pip coverage[toml]
pip --version
pip freeze
coverage run -a runtests.py
Expand Down
7 changes: 2 additions & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,17 @@ keywords = django edc vitals, clinicedc, clinical trials
classifiers=
Environment :: Web Environment
Framework :: Django
Framework :: Django :: 3.2
Framework :: Django :: 4.0
Framework :: Django :: 4.1
Intended Audience :: Developers
Intended Audience :: Science/Research
Operating System :: OS Independent
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
License :: OSI Approved :: GNU General Public License v3 (GPLv3)


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

0 comments on commit 89ddffb

Please sign in to comment.