Skip to content

Commit aa93a5d

Browse files
committed
⬆️ [#1] -- updated to django 4.2
1 parent f63533d commit aa93a5d

File tree

5 files changed

+142
-74
lines changed

5 files changed

+142
-74
lines changed

.github/workflows/ci.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Tests and PyPI publishing
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- '*'
9+
pull_request:
10+
workflow_dispatch:
11+
12+
jobs:
13+
tests:
14+
name: Run tests Python ${{ matrix.python }}, Django ${{ matrix.django }})
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
python: ['3.8', '3.9', '3.10', '3.11']
19+
django: ['3.2', '4.1', '4.2']
20+
exclude:
21+
- python: '3.11'
22+
django: '3.2'
23+
24+
25+
steps:
26+
- uses: actions/checkout@v3
27+
- uses: actions/setup-python@v4
28+
with:
29+
python-version: ${{ matrix.python }}
30+
31+
- name: Install dependencies
32+
run: pip install tox tox-gh-actions
33+
34+
- name: Run tests
35+
run: tox
36+
env:
37+
PYTHON_VERSION: ${{ matrix.python }}
38+
DJANGO: ${{ matrix.django }}
39+
40+
- name: Publish coverage report
41+
uses: codecov/codecov-action@v3
42+
43+
type-checks:
44+
name: Run type checks on Python ${{ matrix.python }}
45+
runs-on: ubuntu-latest
46+
strategy:
47+
matrix:
48+
python: ['3.8', '3.9', '3.10', '3.11']
49+
50+
steps:
51+
- uses: actions/checkout@v3
52+
- uses: actions/setup-python@v4
53+
with:
54+
python-version: ${{ matrix.python }}
55+
56+
- name: Install dependencies
57+
run: pip install tox tox-gh-actions
58+
59+
- name: Run checks
60+
run: tox
61+
env:
62+
TYPE_CHECKING: 'true'
63+
64+
publish:
65+
name: Publish package to PyPI
66+
runs-on: ubuntu-latest
67+
needs:
68+
- tests
69+
- type-checks
70+
71+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
72+
73+
steps:
74+
- uses: actions/checkout@v3
75+
- uses: actions/setup-python@v4
76+
with:
77+
python-version: '3.10'
78+
79+
- name: Build sdist and wheel
80+
run: |
81+
pip install pip setuptools wheel --upgrade
82+
python setup.py sdist bdist_wheel
83+
84+
- name: Publish a Python distribution to PyPI
85+
uses: pypa/gh-action-pypi-publish@release/v1
86+
with:
87+
user: __token__
88+
password: ${{ secrets.PYPI_TOKEN }}
89+

.github/workflows/code-quality.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Linting and code quality
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
paths:
9+
- '**.py'
10+
- .github/workflows/code_quality.yml
11+
pull_request:
12+
paths:
13+
- '**.py'
14+
- .github/workflows/code_quality.yml
15+
workflow_dispatch:
16+
17+
jobs:
18+
linting:
19+
name: Code-quality checks
20+
runs-on: ubuntu-latest
21+
strategy:
22+
matrix:
23+
toxenv:
24+
- isort
25+
- black
26+
- flake8
27+
- docs
28+
steps:
29+
- uses: actions/checkout@v3
30+
- uses: actions/setup-python@v4
31+
with:
32+
python-version: '3.10'
33+
- name: Install dependencies
34+
run: pip install tox
35+
- run: tox
36+
env:
37+
TOXENV: ${{ matrix.toxenv }}
38+

.github/workflows/tests.yaml

Lines changed: 0 additions & 51 deletions
This file was deleted.

setup.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,17 @@ def find_version(*parts):
3838
"Development Status :: 5 - Production/Stable",
3939
"Environment :: Web Environment",
4040
"Framework :: Django",
41-
"Framework :: Django :: 1.6",
42-
"Framework :: Django :: 1.7",
43-
"Framework :: Django :: 1.8",
44-
"Framework :: Django :: 1.9",
41+
"Framework :: Django :: 3.2",
42+
"Framework :: Django :: 4.1",
43+
"Framework :: Django :: 4.2",
4544
"Intended Audience :: Developers",
4645
"License :: OSI Approved :: Apache Software License",
4746
"Operating System :: OS Independent",
4847
"Programming Language :: Python",
49-
"Programming Language :: Python :: 2.6",
50-
"Programming Language :: Python :: 2.7",
51-
"Programming Language :: Python :: 3.3",
48+
"Programming Language :: Python :: 3.8",
49+
"Programming Language :: Python :: 3.9",
50+
"Programming Language :: Python :: 3.10",
51+
"Programming Language :: Python :: 3.11",
5252
"Topic :: Internet :: WWW/HTTP",
5353
"Topic :: Software Development :: Libraries :: Python Modules",
5454
],

tox.ini

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,22 @@
11
[tox]
22
envlist=
3-
py27-django{16,17,18,19,110,111},
4-
py33-django{16,17}
5-
py35-django{18,19,110,111,20},
6-
py36-django{111,20}
7-
# py33-django-dev,
3+
py{38,39,310,311}-dj{32,41,42}-docs,
4+
py{38,39,310,311}-dj{32,41,42}-docs,
85
coverage,
9-
docs,
106

117
[testenv]
128
deps =
13-
django16: Django >= 1.6,<1.7
14-
django17: Django >= 1.7,<1.8
15-
django18: Django >= 1.8,<1.9
16-
django19: Django >= 1.9,<1.10
17-
django110: Django >= 1.10,<1.11
18-
django111: Django >= 1.11,<2.0
19-
django20: Django >= 2.0,<2.1
20-
django-dev: https://github.com/django/django/tarball/master
9+
dj32: Django~=3.2.0
10+
dj41: Django~=4.1.0
11+
dj42: Django~=4.2.0
2112
commands=
13+
pip install django
2214
python runtests.py
2315

2416
[testenv:coverage]
25-
basepython=python3.3
17+
basepython=python3.8
2618
deps=
27-
django==1.9.4
19+
django~=3.2.0
2820
coverage
2921
commands=
3022
coverage erase

0 commit comments

Comments
 (0)