Skip to content

Commit

Permalink
Merge branch 'release/0.3.7' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvw committed May 24, 2023
2 parents 53de3a1 + 28be715 commit 9d23686
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 37 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ 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
Expand All @@ -31,20 +33,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 +65,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 }}
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,32 @@ 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.6.0
rev: 23.3.0
hooks:
- id: black
language_version: python3.9
language_version: python3.10

- repo: https://github.com/pycqa/flake8
rev: 5.0.4
rev: 6.0.0
hooks:
- id: flake8
args:
- "--config=setup.cfg"

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

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: requirements-txt-fixer
files: requirements/.*\.txt$
Expand All @@ -42,7 +42,7 @@ repos:
- id: detect-private-key

- repo: https://github.com/adrienverge/yamllint
rev: v1.27.1
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_model_fields/fields/hostname_modification_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class HostnameModificationField(CharField):

description = _("Custom field for hostname modified")

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


class InitialsField(CharField):

description = _("Custom field for a person's initials")

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


class UserField(CharField):

description = _("Custom field for user created")

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


class TestModel(BaseUuidModel):

f1 = models.CharField(max_length=10)
f2 = models.CharField(max_length=10)
f3 = models.CharField(max_length=10, null=True, blank=False)
Expand Down
22 changes: 12 additions & 10 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,27 +27,30 @@ source = ["edc_model_fields"]
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 django_webtest
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 model field class django edc 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 9d23686

Please sign in to comment.