Skip to content

Commit

Permalink
Merge pull request #111 from openedx/jenkins/cleanup-python-code-5532980
Browse files Browse the repository at this point in the history
chore: Post Django32 Cleanup
  • Loading branch information
aht007 authored Jan 20, 2022
2 parents c3efd49 + 8a64986 commit 539edec
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 80 deletions.
66 changes: 33 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
name: Python CI

on:
push:
branches: [master]
pull_request:
branches:
- '**'
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, django30, django31, django32, quality, docs]
run_tests:
name: tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
toxenv: [quality, docs, django32, django40]

steps:
- uses: actions/checkout@v1
- name: setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v1
- name: setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install pip
run: pip install -r requirements/pip.txt
- name: Install pip
run: pip install -r requirements/pip.txt

- name: Install Dependencies
run: pip install -r requirements/ci.txt
- name: Install Dependencies
run: pip install -r requirements/ci.txt

- name: Run Tests
env:
TOXENV: ${{ matrix.toxenv }}
run: tox
- name: Run Tests
env:
TOXENV: ${{ matrix.toxenv }}
run: tox

- name: Run coverage
if: matrix.python-version == '3.8' && matrix.toxenv == 'django22'
uses: codecov/codecov-action@v1
with:
flags: unittests
fail_ci_if_error: true
- name: Run coverage
if: matrix.python-version == '3.8' && matrix.toxenv == 'django32'
uses: codecov/codecov-action@v1
with:
flags: unittests
fail_ci_if_error: true
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ Unreleased
~~~~~~~~~~
*

[1.2.0] - 2022-01-19
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Removed Django22, 30, 31 support
* Added Support for Django40

[1.1.1] - 2021-08-24
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Replacing jsonfield2 with jsonfield as the former is merged back into the latter one.
Expand Down
2 changes: 1 addition & 1 deletion celery_utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
Code to support working with celery.
"""

__version__ = '1.1.1'
__version__ = '1.2.0'

default_app_config = 'celery_utils.apps.CeleryUtilsConfig' # pylint: disable=invalid-name
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,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 :: Apache Software License',
'Natural Language :: English',
Expand Down
84 changes: 41 additions & 43 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py38-celery{50}-django{22,30,31,32}
envlist = py38-celery{50}-django{32,40},quality,docs

[doc8]
ignore = D001
Expand All @@ -18,50 +18,48 @@ addopts = --cov celery_utils --cov-report term-missing --cov-report xml
norecursedirs = .* docs requirements

[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
celery50: -r{toxinidir}/requirements/celery50.txt
-r{toxinidir}/requirements/test.txt
commands =
py.test tests/ celery_utils/ {posargs}
deps =
django32: Django>=3.2,<4.0
django40: Django>=4.0,<4.1
celery50: -r{toxinidir}/requirements/celery50.txt
-r{toxinidir}/requirements/test.txt
commands =
py.test tests/ celery_utils/ {posargs}

[testenv:docs]
setenv =
DJANGO_SETTINGS_MODULE = test_settings
PYTHONPATH = {toxinidir}
whitelist_externals =
make
rm
deps =
-r{toxinidir}/requirements/doc.txt
commands =
doc8 --ignore-path docs/_build README.rst docs
rm -f docs/celery_utils.rst
rm -f docs/modules.rst
make -C docs clean
make -C docs html
python setup.py check --restructuredtext --strict
setenv =
DJANGO_SETTINGS_MODULE = test_settings
PYTHONPATH = {toxinidir}
whitelist_externals =
make
rm
deps =
-r{toxinidir}/requirements/doc.txt
commands =
doc8 --ignore-path docs/_build README.rst docs
rm -f docs/celery_utils.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
whitelist_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 celery_utils tests test_utils
rm tests/__init__.py
pycodestyle celery_utils tests
pydocstyle celery_utils tests
isort --check-only tests test_utils celery_utils manage.py setup.py test_settings.py
make help
setenv =
DJANGO_SETTINGS_MODULE = test_settings
whitelist_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 celery_utils tests test_utils
rm tests/__init__.py
pycodestyle celery_utils tests
pydocstyle celery_utils tests
isort --check-only tests test_utils celery_utils manage.py setup.py test_settings.py
make help

0 comments on commit 539edec

Please sign in to comment.