From 9756ed5b3dc2d157673cd684f631c06199097282 Mon Sep 17 00:00:00 2001 From: Jawayria <39649635+Jawayria@users.noreply.github.com> Date: Thu, 29 Jul 2021 13:38:13 +0500 Subject: [PATCH] feat: Added support for Django 3.2 (#89) --- .github/workflows/ci.yml | 44 +++++++++++++++++++++++ .github/workflows/pypi-publish.yml | 33 ++++++++++++++++++ .travis.yml | 32 ----------------- CHANGELOG.rst | 7 ++++ Makefile | 3 +- bulk_grades/__init__.py | 2 +- requirements/base.txt | 2 +- requirements/{travis.in => ci.in} | 0 requirements/{travis.txt => ci.txt} | 8 ++--- requirements/dev.in | 2 +- requirements/dev.txt | 54 ++++++++++++++--------------- requirements/doc.txt | 18 ++-------- requirements/pii_check.txt | 4 +-- requirements/pip-tools.txt | 2 +- requirements/pip.in | 5 +++ requirements/pip.txt | 14 ++++++++ requirements/quality.txt | 4 +-- requirements/test.txt | 4 +-- setup.py | 3 ++ tox.ini | 3 +- 20 files changed, 153 insertions(+), 91 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/pypi-publish.yml delete mode 100644 .travis.yml rename requirements/{travis.in => ci.in} (100%) rename requirements/{travis.txt => ci.txt} (86%) create mode 100644 requirements/pip.in create mode 100644 requirements/pip.txt diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..2fe2c75 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,44 @@ +name: Python CI + +on: + push: + branches: [master] + pull_request: + branches: + - '**' + +jobs: + run_tests: + name: Tests + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-20.04] + python-version: ['3.8'] + toxenv: [django22-celery44, django22-celery50, django30-celery50, django31-celery50, django32-celery50, + quality, docs, pii_check] + + steps: + - uses: actions/checkout@v2 + - name: setup python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Upgrade pip + run: pip install -r requirements/pip.txt + + - name: Install Dependencies + run: pip install -r requirements/ci.txt + + - name: Run Tests + env: + TOXENV: ${{ matrix.toxenv }} + run: tox + + - name: Run Coverage + if: matrix.python-version == '3.8' && matrix.toxenv=='django22-celery44' + uses: codecov/codecov-action@v1 + with: + flags: unittests + fail_ci_if_error: true diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml new file mode 100644 index 0000000..50d307a --- /dev/null +++ b/.github/workflows/pypi-publish.yml @@ -0,0 +1,33 @@ +name: Publish package to PyPi + +on: + release: + types: [published] + +jobs: + + push: + runs-on: ubuntu-20.04 + + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: setup python + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Install pip + run: pip install -r requirements/pip.txt + + - name: Install Dependencies + run: pip install setuptools wheel + + - name: Build package + run: python setup.py sdist bdist_wheel + + - name: Publish to PyPi + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.PYPI_UPLOAD_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a907f1d..0000000 --- a/.travis.yml +++ /dev/null @@ -1,32 +0,0 @@ -language: python -dist: xenial -python: - - '3.8' -env: - - TOXENV=quality - - TOXENV=docs - - TOXENV=pii_check - - TOXENV=django22-celery44 - - TOXENV=django22-celery50 - - TOXENV=django30-celery50 - - TOXENV=django31-celery50 -cache: - - pip -before_install: - - pip install --upgrade pip -install: - - pip install -r requirements/travis.txt -script: - - tox -after_success: - - codecov -deploy: - provider: pypi - user: edx - distributions: sdist bdist_wheel - on: - tags: true - python: 3.8 - condition: $TOXENV = quality - password: - secure: fqghurmaw5AV4v5e8udqjAhAppWax9cIof2nkKjVREIxURLuaAESFHg40fvA7q6eHsvZoXf34HIoFw2s7HBMe3dtYo4i+wY4JsMYyBPUGV3koSJe3ODwlx8A1IRv2i/WCDtfoFS8jZdeu02OQ6LHbf2P+Kmv3cX5qVCUez+E9bTBniPIqMd9MdA7bN5ft6BYcQttbxvK7sPRJ7Gkv+zKQdXjMpH/v9jjK5f4rAAtqHICymDrwurU7l01964TLTyyHKnB5kZNaTVc/nLMlU1gHSnO5wS7i3BJuzpI/2rjiIIaZJgQJA3U1wj5hHm0R9X7Bo4RSDv5i9Lrf6TPhArqORf6Nk5iLbMPRCCdUV99HkbV6rGJU8DjKFxdnbyBgQlAlQ0rSl0kx2pjtgcMk4JPez/E8JTpruj/J001MvmoK8KoceCIelDDNQRrUYwPldyUv8eB5GSttmtWWXiedHZwk/iyhLknEKCK8jt2s2H4OGlxaXppBSVMRJBJ8ylUpYfFcxwIiHp7A0tYgxUBSmWxGcx0iowrVwQ2AQxzAykd07au7Yt3ge2YI3tEtm6dvHXj/fYi3iuukCv+Nj853JbGN2sfBssmpfOmJEG0ezwQgVKcc19+6RB+CH1YfBnMqR1xPB5D8+EMUHPbPI0akgfXSM1133EJ1KUoG5pSDe8h804= diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 465d784..82a4c5e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,10 +15,17 @@ Unreleased [0.8.14] - 2021-07-12 * Update csv import error message ~~~~~~~~~~ + +[0.9.0] - 2021-07-20 +~~~~~~~~~~~~~~~~~~~~ +* Added support for django 3.2 + [0.8.13] - 2021-07-12 +~~~~~~~~~~~~~~~~~~~~~ * Fix bug where we ignore repeat user in the csv import [0.8.12] - 2021-06-21 +~~~~~~~~~~~~~~~~~~~~~ * Fixed import csv to not working with multiple sections per-user override [0.8.11] - 2021-07-09 diff --git a/Makefile b/Makefile index 3ef3498..c5f648a 100644 --- a/Makefile +++ b/Makefile @@ -33,12 +33,13 @@ upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in pip install -qr requirements/pip-tools.txt # Make sure to compile files after any other files they include! + pip-compile --allow-unsafe --rebuild -o requirements/pip.txt requirements/pip.in pip-compile --upgrade -o requirements/pip-tools.txt requirements/pip-tools.in pip-compile --upgrade -o requirements/base.txt requirements/base.in pip-compile --upgrade -o requirements/test.txt requirements/test.in pip-compile --upgrade -o requirements/doc.txt requirements/doc.in pip-compile --upgrade -o requirements/quality.txt requirements/quality.in - pip-compile --upgrade -o requirements/travis.txt requirements/travis.in + pip-compile --upgrade -o requirements/ci.txt requirements/ci.in pip-compile --upgrade -o requirements/pii_check.txt requirements/pii_check.in pip-compile --upgrade -o requirements/dev.txt requirements/dev.in # Let tox control the Django,celery versions for tests diff --git a/bulk_grades/__init__.py b/bulk_grades/__init__.py index 1dac954..88f161a 100644 --- a/bulk_grades/__init__.py +++ b/bulk_grades/__init__.py @@ -2,6 +2,6 @@ Support for bulk scoring and grading. """ -__version__ = '0.8.14' +__version__ = '0.9.0' default_app_config = 'bulk_grades.apps.BulkGradesConfig' # pylint: disable=invalid-name diff --git a/requirements/base.txt b/requirements/base.txt index c82f521..8bbf5f3 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -100,7 +100,7 @@ stevedore==3.3.0 # via # edx-django-utils # edx-opaque-keys -super-csv==2.0.1 +super-csv==2.1.0 # via -r requirements/base.in urllib3==1.26.6 # via requests diff --git a/requirements/travis.in b/requirements/ci.in similarity index 100% rename from requirements/travis.in rename to requirements/ci.in diff --git a/requirements/travis.txt b/requirements/ci.txt similarity index 86% rename from requirements/travis.txt rename to requirements/ci.txt index 1290dc4..93766c4 100644 --- a/requirements/travis.txt +++ b/requirements/ci.txt @@ -11,7 +11,7 @@ certifi==2021.5.30 charset-normalizer==2.0.3 # via requests codecov==2.1.11 - # via -r requirements/travis.in + # via -r requirements/ci.in coverage==5.5 # via codecov distlib==0.3.2 @@ -24,7 +24,7 @@ idna==3.2 # via requests packaging==21.0 # via tox -platformdirs==2.0.2 +platformdirs==2.1.0 # via virtualenv pluggy==0.13.1 # via tox @@ -42,10 +42,10 @@ toml==0.10.2 # via tox tox==3.24.0 # via - # -r requirements/travis.in + # -r requirements/ci.in # tox-battery tox-battery==0.6.1 - # via -r requirements/travis.in + # via -r requirements/ci.in urllib3==1.26.6 # via requests virtualenv==20.6.0 diff --git a/requirements/dev.in b/requirements/dev.in index fa27299..275264a 100644 --- a/requirements/dev.in +++ b/requirements/dev.in @@ -3,7 +3,7 @@ -r pip-tools.txt # pip-tools and its dependencies, for managing requirements files -r quality.txt # Core and quality check dependencies --r travis.txt # tox and related dependencies +-r ci.txt # tox and related dependencies diff-cover # Changeset diff test coverage edx-i18n-tools # For i18n_tool dummy diff --git a/requirements/dev.txt b/requirements/dev.txt index b17ea6b..0a92915 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -19,7 +19,7 @@ attrs==21.2.0 # pytest backports.entry-points-selectable==1.1.0 # via - # -r requirements/travis.txt + # -r requirements/ci.txt # virtualenv billiard==3.6.4.0 # via @@ -32,15 +32,15 @@ celery==5.1.2 # edx-celeryutils certifi==2021.5.30 # via + # -r requirements/ci.txt # -r requirements/quality.txt - # -r requirements/travis.txt # requests chardet==4.0.0 # via diff-cover charset-normalizer==2.0.3 # via + # -r requirements/ci.txt # -r requirements/quality.txt - # -r requirements/travis.txt # requests click==7.1.2 # via @@ -71,16 +71,16 @@ click-repl==0.2.0 # via # -r requirements/quality.txt # celery -code-annotations==1.1.2 +code-annotations==1.2.0 # via # -r requirements/quality.txt # edx-lint codecov==2.1.11 - # via -r requirements/travis.txt + # via -r requirements/ci.txt coverage==5.5 # via + # -r requirements/ci.txt # -r requirements/quality.txt - # -r requirements/travis.txt # codecov # pytest-cov ddt==1.4.2 @@ -89,7 +89,7 @@ diff-cover==6.2.0 # via -r requirements/dev.in distlib==0.3.2 # via - # -r requirements/travis.txt + # -r requirements/ci.txt # virtualenv django==2.2.24 # via @@ -131,7 +131,7 @@ edx-django-utils==4.2.0 # via # -r requirements/quality.txt # super-csv -edx-i18n-tools==0.5.3 +edx-i18n-tools==0.7.0 # via -r requirements/dev.in edx-lint==5.0.0 # via -r requirements/quality.txt @@ -139,7 +139,7 @@ edx-opaque-keys==2.2.2 # via -r requirements/quality.txt filelock==3.0.12 # via - # -r requirements/travis.txt + # -r requirements/ci.txt # tox # virtualenv future==0.18.2 @@ -148,8 +148,8 @@ future==0.18.2 # edx-celeryutils idna==3.2 # via + # -r requirements/ci.txt # -r requirements/quality.txt - # -r requirements/travis.txt # requests inflect==5.3.0 # via jinja2-pluralize @@ -199,13 +199,11 @@ newrelic==6.4.4.161 # edx-django-utils packaging==21.0 # via + # -r requirements/ci.txt # -r requirements/quality.txt - # -r requirements/travis.txt # pytest # tox -path==16.0.0 - # via path.py -path.py==12.5.0 +path==16.2.0 # via edx-i18n-tools pbr==5.6.0 # via @@ -217,14 +215,14 @@ pep517==0.11.0 # pip-tools pip-tools==6.2.0 # via -r requirements/pip-tools.txt -platformdirs==2.0.2 +platformdirs==2.1.0 # via - # -r requirements/travis.txt + # -r requirements/ci.txt # virtualenv pluggy==0.13.1 # via + # -r requirements/ci.txt # -r requirements/quality.txt - # -r requirements/travis.txt # diff-cover # pytest # tox @@ -240,8 +238,8 @@ psutil==5.8.0 # edx-django-utils py==1.10.0 # via + # -r requirements/ci.txt # -r requirements/quality.txt - # -r requirements/travis.txt # pytest # tox pycodestyle==2.7.0 @@ -276,8 +274,8 @@ pymongo==3.12.0 # edx-opaque-keys pyparsing==2.4.7 # via + # -r requirements/ci.txt # -r requirements/quality.txt - # -r requirements/travis.txt # packaging pytest==6.2.4 # via @@ -304,8 +302,8 @@ pyyaml==5.4.1 # edx-i18n-tools requests==2.26.0 # via + # -r requirements/ci.txt # -r requirements/quality.txt - # -r requirements/travis.txt # codecov # slumber simplejson==3.17.3 @@ -314,8 +312,8 @@ simplejson==3.17.3 # super-csv six==1.16.0 # via + # -r requirements/ci.txt # -r requirements/quality.txt - # -r requirements/travis.txt # click-repl # edx-i18n-tools # edx-lint @@ -337,7 +335,7 @@ stevedore==3.3.0 # code-annotations # edx-django-utils # edx-opaque-keys -super-csv==2.0.1 +super-csv==2.1.0 # via -r requirements/quality.txt text-unidecode==1.3 # via @@ -345,26 +343,26 @@ text-unidecode==1.3 # python-slugify toml==0.10.2 # via + # -r requirements/ci.txt # -r requirements/quality.txt - # -r requirements/travis.txt # pylint # pytest # pytest-cov # tox -tomli==1.0.4 +tomli==1.1.0 # via # -r requirements/pip-tools.txt # pep517 tox==3.24.0 # via - # -r requirements/travis.txt + # -r requirements/ci.txt # tox-battery tox-battery==0.6.1 - # via -r requirements/travis.txt + # via -r requirements/ci.txt urllib3==1.26.6 # via + # -r requirements/ci.txt # -r requirements/quality.txt - # -r requirements/travis.txt # requests vine==5.0.0 # via @@ -374,7 +372,7 @@ vine==5.0.0 # kombu virtualenv==20.6.0 # via - # -r requirements/travis.txt + # -r requirements/ci.txt # tox wcwidth==0.2.5 # via diff --git a/requirements/doc.txt b/requirements/doc.txt index 5474b9e..7945404 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -31,8 +31,6 @@ certifi==2021.5.30 # via # -r requirements/test.txt # requests -cffi==1.14.6 - # via cryptography charset-normalizer==2.0.3 # via # -r requirements/test.txt @@ -58,7 +56,7 @@ click-repl==0.2.0 # via # -r requirements/test.txt # celery -code-annotations==1.1.2 +code-annotations==1.2.0 # via -r requirements/test.txt colorama==0.4.4 # via twine @@ -66,8 +64,6 @@ coverage==5.5 # via # -r requirements/test.txt # pytest-cov -cryptography==3.4.7 - # via secretstorage ddt==1.4.2 # via -r requirements/test.txt django==2.2.24 @@ -138,10 +134,6 @@ iniconfig==1.1.1 # via # -r requirements/test.txt # pytest -jeepney==0.7.0 - # via - # keyring - # secretstorage jinja2==2.11.3 # via # -c requirements/constraints.txt @@ -197,8 +189,6 @@ py==1.10.0 # via # -r requirements/test.txt # pytest -pycparser==2.20 - # via cffi pygments==2.9.0 # via # doc8 @@ -252,8 +242,6 @@ restructuredtext-lint==1.3.2 # via doc8 rfc3986==1.5.0 # via twine -secretstorage==3.3.1 - # via keyring simplejson==3.17.3 # via # -r requirements/test.txt @@ -269,7 +257,7 @@ slumber==0.7.1 # via -r requirements/test.txt snowballstemmer==2.1.0 # via sphinx -sphinx==4.1.1 +sphinx==4.1.2 # via # -r requirements/doc.in # edx-sphinx-theme @@ -296,7 +284,7 @@ stevedore==3.3.0 # doc8 # edx-django-utils # edx-opaque-keys -super-csv==2.0.1 +super-csv==2.1.0 # via -r requirements/test.txt text-unidecode==1.3 # via diff --git a/requirements/pii_check.txt b/requirements/pii_check.txt index 7fe0c59..59ae9a1 100644 --- a/requirements/pii_check.txt +++ b/requirements/pii_check.txt @@ -46,7 +46,7 @@ click-repl==0.2.0 # via # -r requirements/base.txt # celery -code-annotations==1.1.2 +code-annotations==1.2.0 # via -r requirements/pii_check.in django==2.2.24 # via @@ -165,7 +165,7 @@ stevedore==3.3.0 # code-annotations # edx-django-utils # edx-opaque-keys -super-csv==2.0.1 +super-csv==2.1.0 # via -r requirements/base.txt text-unidecode==1.3 # via python-slugify diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index d81d9b2..5dc9341 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -12,7 +12,7 @@ pep517==0.11.0 # via pip-tools pip-tools==6.2.0 # via -r requirements/pip-tools.in -tomli==1.0.4 +tomli==1.1.0 # via pep517 wheel==0.36.2 # via pip-tools diff --git a/requirements/pip.in b/requirements/pip.in new file mode 100644 index 0000000..7b68e86 --- /dev/null +++ b/requirements/pip.in @@ -0,0 +1,5 @@ +# Core dependencies for installing other packages + +pip +setuptools +wheel \ No newline at end of file diff --git a/requirements/pip.txt b/requirements/pip.txt new file mode 100644 index 0000000..3e7ecb8 --- /dev/null +++ b/requirements/pip.txt @@ -0,0 +1,14 @@ +# +# This file is autogenerated by pip-compile with python 3.8 +# To update, run: +# +# make upgrade +# +wheel==0.36.2 + # via -r requirements/pip.in + +# The following packages are considered to be unsafe in a requirements file: +pip==21.2.1 + # via -r requirements/pip.in +setuptools==57.4.0 + # via -r requirements/pip.in diff --git a/requirements/quality.txt b/requirements/quality.txt index 9ec76fe..b3fc833 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -58,7 +58,7 @@ click-repl==0.2.0 # via # -r requirements/test.txt # celery -code-annotations==1.1.2 +code-annotations==1.2.0 # via # -r requirements/test.txt # edx-lint @@ -254,7 +254,7 @@ stevedore==3.3.0 # code-annotations # edx-django-utils # edx-opaque-keys -super-csv==2.0.1 +super-csv==2.1.0 # via -r requirements/test.txt text-unidecode==1.3 # via diff --git a/requirements/test.txt b/requirements/test.txt index f3a516a..96f646a 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -45,7 +45,7 @@ click-repl==0.2.0 # via # -r requirements/base.txt # celery -code-annotations==1.1.2 +code-annotations==1.2.0 # via -r requirements/test.in coverage==5.5 # via pytest-cov @@ -186,7 +186,7 @@ stevedore==3.3.0 # code-annotations # edx-django-utils # edx-opaque-keys -super-csv==2.0.1 +super-csv==2.1.0 # via -r requirements/base.txt text-unidecode==1.3 # via python-slugify diff --git a/setup.py b/setup.py index 7860063..2799ff3 100644 --- a/setup.py +++ b/setup.py @@ -84,6 +84,9 @@ def is_requirement(line): 'Development Status :: 3 - Alpha', 'Framework :: Django', 'Framework :: Django :: 2.2', + 'Framework :: Django :: 3.0', + 'Framework :: Django :: 3.1', + 'Framework :: Django :: 3.2', 'Intended Audience :: Developers', 'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)', 'Natural Language :: English', diff --git a/tox.ini b/tox.ini index 3f76903..594b086 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py38-django{22,30,31}-celery{44,50} +envlist = py38-django{22,30,31,32}-celery{44,50} [testenv] setenv = @@ -9,6 +9,7 @@ deps = django22: Django>=2.2,<2.3 django30: Django>=3.0,<3.1 django31: Django>=3.1,<3.2 + django32: Django>=3.2,<4.0 celery44: -r{toxinidir}/requirements/celery44.txt celery50: -r{toxinidir}/requirements/celery50.txt commands =