Skip to content

Commit

Permalink
chore: Post Django32 Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
edx-requirements-bot authored and aht007 committed Jan 18, 2022
1 parent 38c796f commit a7d75af
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 57 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [master]
pull_request:
branches:
- '**'
- '**'

jobs:
tests:
Expand All @@ -14,12 +14,9 @@ jobs:
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
toxenv: [django22-celery44-drflatest, django22-celery44-drf312, django22-celery50-drflatest,
django22-celery50-drf312, django30-celery44-drflatest, django30-celery44-drf312,
django30-celery50-drflatest, django30-celery50-drf312, django31-celery44-drflatest,
django31-celery44-drf312, django31-celery50-drflatest, django31-celery50-drf312,
django32-celery44-drflatest, django32-celery44-drf312, django32-celery50-drflatest,
django32-celery50-drf312, quality, docs]
toxenv: [django32-celery44-drflatest, django32-celery44-drf312, django32-celery50-drflatest,
django32-celery50-drf312,django40-celery44-drflatest, django40-celery44-drf312,
django40-celery50-drflatest, django40-celery50-drf312, quality, docs]

steps:
- uses: actions/checkout@v2
Expand All @@ -39,7 +36,7 @@ jobs:
run: tox

- name: Run coverage
if: matrix.python-version == '3.8' && matrix.toxenv == 'django22-celery44-drf312'
if: matrix.python-version == '3.8' && matrix.toxenv == 'django32-celery44-drf312'
uses: codecov/codecov-action@v1
with:
flags: unittests
Expand Down
2 changes: 1 addition & 1 deletion requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ idna==3.3
# via requests
imagesize==1.3.0
# via sphinx
importlib-metadata==4.10.0
importlib-metadata==4.10.1
# via
# keyring
# sphinx
Expand Down
2 changes: 1 addition & 1 deletion test_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
URLs for user_tasks test suite.
"""

from django.conf.urls import url
from django.urls import url
from django.contrib import admin

from user_tasks.urls import urlpatterns
Expand Down
88 changes: 43 additions & 45 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,54 +1,52 @@
[tox]
envlist = py38-django{22,30,31,32}-celery{44,50}-drf{312,latest},quality,docs
envlist = py38-django{32,40}-celery{44,50}-drf{312,latest},quality,docs

[testenv]
deps =
django22: Django>=2.2,<2.3
django30: Django>=3.0,<3.1
django31: Django>=3.1,<3.2
django32: Django>=3.2,<3.3
drf312: djangorestframework>=3.12,<3.13
drflatest: djangorestframework
celery44: -r{toxinidir}/requirements/celery44.txt
celery50: -r{toxinidir}/requirements/celery50.txt
-r{toxinidir}/requirements/test.txt
commands =
python -Wd -m pytest {posargs}
deps =
django32: Django>=3.2,<4.0
django40: Django>=4.0,<4.1
drf312: djangorestframework>=3.12,<3.13
drflatest: djangorestframework
celery44: -r{toxinidir}/requirements/celery44.txt
celery50: -r{toxinidir}/requirements/celery50.txt
-r{toxinidir}/requirements/test.txt
commands =
python -Wd -m pytest {posargs}

[testenv:docs]
allowlist_externals =
make
rm
deps =
-r{toxinidir}/requirements/doc.txt
commands =
doc8 --ignore-path docs/_build --ignore-path docs/rest_api.rst README.rst docs
rm -f docs/user_tasks.rst
rm -f docs/modules.rst
make -C docs clean
make -C docs html
python setup.py sdist bdist_wheel
twine check dist/*
allowlist_externals =
make
rm
deps =
-r{toxinidir}/requirements/doc.txt
commands =
doc8 --ignore-path docs/_build --ignore-path docs/rest_api.rst README.rst docs
rm -f docs/user_tasks.rst
rm -f docs/modules.rst
make -C docs clean
make -C docs html
python setup.py sdist bdist_wheel
twine check dist/*

[testenv:quality]
setenv=
setenv =
DJANGO_SETTINGS_MODULE=test_settings
allowlist_externals =
make
rm
touch
deps =
-r{toxinidir}/requirements/doc.txt
-r{toxinidir}/requirements/quality.txt
-r{toxinidir}/requirements/test.txt
commands =
touch tests/__init__.py
pylint user_tasks
pylint tests
pylint schema
rm tests/__init__.py
pycodestyle schema tests user_tasks
pydocstyle schema tests user_tasks
isort --check-only --diff --recursive schema tests user_tasks manage.py setup.py test_settings.py
make help
allowlist_externals =
make
rm
touch
deps =
-r{toxinidir}/requirements/doc.txt
-r{toxinidir}/requirements/quality.txt
-r{toxinidir}/requirements/test.txt
commands =
touch tests/__init__.py
pylint user_tasks
pylint tests
pylint schema
rm tests/__init__.py
pycodestyle schema tests user_tasks
pydocstyle schema tests user_tasks
isort --check-only --diff --recursive schema tests user_tasks manage.py setup.py test_settings.py
make help

3 changes: 2 additions & 1 deletion user_tasks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@

# This signal is emitted when a user task reaches any final state:
# SUCCEEDED, FAILED, or CANCELED
user_task_stopped = Signal(providing_args=['status']) # pylint: disable=invalid-name
# providing_args = ['status']
user_task_stopped = Signal() # pylint: disable=invalid-name
2 changes: 1 addition & 1 deletion user_tasks/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from django.db.models import Q
from django.db.models.expressions import F
from django.utils.timezone import now
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _

from model_utils.models import TimeStampedModel

Expand Down

0 comments on commit a7d75af

Please sign in to comment.