Skip to content

Commit

Permalink
chore: Post Django32 Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
aht007 committed Jan 19, 2022
1 parent d68399c commit 7b2cafe
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 44 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
toxenv: [django22, django30, django31, django32, quality]
toxenv: [quality, django32, django40]
steps:
- uses: actions/checkout@v1
- name: setup python
Expand All @@ -35,7 +35,7 @@ jobs:
run: tox

- name: Run Coverage
if: matrix.python-version == '3.8' && matrix.toxenv=='django22'
if: matrix.python-version == '3.8' && matrix.toxenv=='django32'
uses: codecov/codecov-action@v1
with:
flags: unittests
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ Change Log
Unreleased
--------------------

[2.0.0] - 2022-01-19
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* Drop support for Django<3.2
* Replacing ugettext with gettext to resolve RemovedInDjango40 error.

[1.5.1] - 2021-11-01
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion edx_rbac/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
Library to help managing role based access controls for django apps.
"""

__version__ = '1.5.1'
__version__ = '2.0.0'

default_app_config = 'edx_rbac.apps.EdxRbacConfig' # pylint: disable=invalid-name
2 changes: 1 addition & 1 deletion edx_rbac/admin/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""

from django import forms
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _

from edx_rbac.fields import UserFromEmailField

Expand Down
9 changes: 5 additions & 4 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ idna==3.3
# requests
imagesize==1.3.0
# via sphinx
importlib-metadata==4.10.1
# via sphinx
iniconfig==1.1.1
# via
# -r requirements/test.txt
Expand Down Expand Up @@ -225,7 +227,7 @@ six==1.16.0
# python-dateutil
snowballstemmer==2.2.0
# via sphinx
sphinx==4.3.2
sphinx==4.4.0
# via
# -r requirements/doc.in
# edx-sphinx-theme
Expand Down Expand Up @@ -270,6 +272,5 @@ urllib3==1.26.8
# requests
webencodings==0.5.1
# via bleach

# The following packages are considered to be unsafe in a requirements file:
# setuptools
zipp==3.7.0
# via importlib-metadata
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,8 @@ def is_requirement(line):
classifiers=[
'Development Status :: 3 - Alpha',
'Framework :: Django',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
'Framework :: Django :: 3.1',
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.0',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)',
'Natural Language :: English',
Expand Down
64 changes: 31 additions & 33 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py38-django{22,30,31,32},quality
envlist = py38-django{32,40},quality

[doc8]
max-line-length = 120
Expand All @@ -19,55 +19,53 @@ norecursedirs = .* docs requirements venvs

[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
-r{toxinidir}/requirements/test.txt
django32: Django>=3.2,<4.0
django40: Django>=3.3,<4.1
-r{toxinidir}/requirements/test.txt
whitelist_externals =
touch
rm
touch
rm
commands =
python -Wd -m pytest {posargs}
python -Wd -m pytest {posargs}

[testenv:docs]
setenv =
DJANGO_SETTINGS_MODULE = test_settings
PYTHONPATH = {toxinidir}
DJANGO_SETTINGS_MODULE = test_settings
PYTHONPATH = {toxinidir}
whitelist_externals =
make
rm
make
rm
deps =
-r{toxinidir}/requirements/doc.txt
-r{toxinidir}/requirements/doc.txt
commands =
doc8 --ignore-path docs/_build README.rst docs
rm -f docs/edx_rbac.rst
rm -f docs/modules.rst
make -C docs clean
make -C docs html
python setup.py check --restructuredtext --strict
doc8 --ignore-path docs/_build README.rst docs
rm -f docs/edx_rbac.rst
rm -f docs/modules.rst
make -C docs clean
make -C docs html
python setup.py check --restructuredtext --strict

[testenv:quality]
setenv =
DJANGO_SETTINGS_MODULE = test_settings
DJANGO_SETTINGS_MODULE = test_settings
whitelist_externals =
make
rm
touch
make
rm
touch
deps =
-r{toxinidir}/requirements/quality.txt
-r{toxinidir}/requirements/quality.txt
commands =
pylint edx_rbac tests test_utils manage.py setup.py
pycodestyle edx_rbac tests manage.py setup.py
pydocstyle edx_rbac tests manage.py setup.py
isort --check-only --diff tests test_utils edx_rbac manage.py setup.py test_settings.py
make selfcheck
pylint edx_rbac tests test_utils manage.py setup.py
pycodestyle edx_rbac tests manage.py setup.py
pydocstyle edx_rbac tests manage.py setup.py
isort --check-only --diff tests test_utils edx_rbac manage.py setup.py test_settings.py
make selfcheck

[testenv:pii_check]
setenv =
DJANGO_SETTINGS_MODULE = test_settings
DJANGO_SETTINGS_MODULE = test_settings
deps =
-r{toxinidir}/requirements/test.txt
-r{toxinidir}/requirements/test.txt
commands =
code_annotations django_find_annotations --config_file .pii_annotations.yml --lint --report --coverage
code_annotations django_find_annotations --config_file .pii_annotations.yml --lint --report --coverage

0 comments on commit 7b2cafe

Please sign in to comment.