Skip to content

Commit

Permalink
Merge branch 'release/0.3.46'
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanWillitts committed Apr 26, 2023
2 parents a5e47a0 + 5b36c3e commit 8fc0570
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 25 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ on: [push, pull_request]

jobs:
build:
name: build (Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }})
name: build (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest

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']

services:
mysql:
Expand All @@ -31,20 +30,19 @@ jobs:
sudo apt-get -y update
sudo apt-get install libcups2-dev wamerican
- uses: actions/checkout@v2

- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
echo "dir=$(pip cache dir)" >>$GITHUB_OUTPUT
- name: Cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key:
Expand All @@ -64,7 +62,7 @@ jobs:
env:
DJANGO: ${{ matrix.django-version }}

- name: Upload coverage
uses: codecov/codecov-action@v1
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
name: Python ${{ matrix.python-version }}
12 changes: 9 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
exclude: tests/etc/user-*

repos:
- repo: https://github.com/PyCQA/bandit
rev: 1.7.5
Expand All @@ -9,10 +10,10 @@ repos:
- "-x *test*.py"

- repo: https://github.com/psf/black
rev: 23.1.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 Down Expand Up @@ -40,8 +41,13 @@ repos:
- id: debug-statements
- id: detect-private-key

- repo: https://github.com/rstcheck/rstcheck
rev: v6.1.2
hooks:
- id: rstcheck

- repo: https://github.com/adrienverge/yamllint
rev: v1.30.0
rev: v1.31.0
hooks:
- id: yamllint
args:
Expand Down
5 changes: 5 additions & 0 deletions edc_constants/disease_constants.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
ANAEMIA = "anaemia"
BACTERAEMIA = "bacteraemia"
BACTERAEMIA_SEPSIS = "bacteraemia_sepsis"
BACTERIAL_PNEUMONIA = "bacterial_pneumonia"
Expand All @@ -10,7 +11,11 @@
CRYPTOCOCCAL_MENINGITIS = "cm"
DIARRHOEAL_WASTING = "diarrhoeal_wasting"
FOCAL_NEUROLOGIC_DEFICIT_OTHER = "focal_neurologic_deficit_other"
NEUTROPAENIA = "neutropaenia"
PNEUMONIA = "pneumonia"
RENAL_IMPAIRMENT = "renal_impairment"
SEPSIS = "sepsis"
TB_EXTRAPULMONARY = "tb_extrapulmonary"
TB_PULMONARY = "tb_pulmonary"
THERAPEUTIC_LP = "therapeutic_lp"
THROMBOCYTOPENIA = "thrombocytopenia"
17 changes: 10 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ 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]
Expand All @@ -27,21 +27,23 @@ source = ["edc_constants"]
show_missing = true
skip_covered = true
omit = ["requirements.txt"]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
]

[tool.tox]
legacy_tox_ini = """
[tox]
envlist =
lint
isolated_build = true
[gh-actions]
python =
3.8: py38
3.9: py39, lint
3.10: py310
3.10: py310, lint
3.11: py311, lint
[testenv]
deps =
Expand All @@ -50,6 +52,7 @@ deps =
commands =
pip install -U pip
pip --version
pip freeze
[testenv:lint]
deps = -r https://raw.githubusercontent.com/clinicedc/edc/develop/requirements.tests/lint.txt
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 choices constants, 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 8fc0570

Please sign in to comment.