-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ⬆️ Upgrades Django to 4.2 * 🚜 Refactor nox testing * ⚙️ Cleans up testing matrix * 🔥 Drop pinned requirements.txt We don't use these anyways. 🤷 * ⚙️ Adds unpinned deps --------- Co-authored-by: Jeffrey Triplett <[email protected]>
- Loading branch information
1 parent
efcfd5c
commit 8ad1fd8
Showing
5 changed files
with
43 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,29 @@ | ||
import nox | ||
|
||
DJANGO_VERSIONS = ["2.2", "3.2", "4.0", "4.1"] | ||
PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] | ||
|
||
INVALID_PYTHON_DJANGO_SESSIONS = [ | ||
("3.6", "4.0"), | ||
("3.6", "4.1"), | ||
("3.6", "4.2"), | ||
("3.7", "4.0"), | ||
("3.7", "4.1"), | ||
("3.7", "4.2"), | ||
("3.11", "3.2"), | ||
# ("3.11", "4.0"), | ||
# ("3.11", "4.1"), | ||
] | ||
|
||
|
||
@nox.session(python=PYTHON_VERSIONS, tags=["django"]) | ||
|
||
DJANGO_STABLE_VERSION = ["4.2"] | ||
DJANGO_VERSIONS = ["3.2", "4.1", "main"] | ||
|
||
PYTHON_STABLE_VERSION = ["3.11"] | ||
PYTHON_VERSIONS = ["3.8", "3.9", "3.10"] | ||
|
||
|
||
@nox.session(python=PYTHON_STABLE_VERSION, tags=["django"]) | ||
@nox.parametrize("django", DJANGO_VERSIONS) | ||
def tests(session: nox.Session, django: str) -> None: | ||
if (session.python, django) in INVALID_PYTHON_DJANGO_SESSIONS: | ||
session.skip() | ||
def test_django_version(session: nox.Session, django: str) -> None: | ||
session.install(".[test]") | ||
|
||
if django == "main": | ||
session.install("https://github.com/django/django/archive/refs/heads/main.zip") | ||
else: | ||
session.install(f"django~={django}") | ||
|
||
session.run("pytest", *session.posargs) | ||
|
||
|
||
@nox.session(python=PYTHON_VERSIONS, tags=["python"]) | ||
@nox.parametrize("django", DJANGO_STABLE_VERSION) | ||
def test_python_version(session: nox.Session, django: str) -> None: | ||
session.install(".[test]") | ||
session.install(f"django~={django}") | ||
session.run("pytest", *session.posargs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
bumpversion | ||
check-manifest | ||
Django<4.2 | ||
Django<5.0 | ||
factory-boy | ||
flake8 | ||
nox | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,144 +1,12 @@ | ||
# | ||
# This file is autogenerated by pip-compile with Python 3.10 | ||
# by the following command: | ||
# | ||
# pip-compile --resolver=backtracking | ||
# | ||
argcomplete==2.0.0 | ||
# via nox | ||
asgiref==3.6.0 | ||
# via django | ||
attrs==22.2.0 | ||
# via pytest | ||
bleach==5.0.1 | ||
# via readme-renderer | ||
build==0.10.0 | ||
# via check-manifest | ||
bump2version==1.0.1 | ||
# via bumpversion | ||
bumpversion==0.6.0 | ||
# via -r requirements.in | ||
certifi==2022.12.7 | ||
# via requests | ||
charset-normalizer==3.0.1 | ||
# via requests | ||
check-manifest==0.49 | ||
# via -r requirements.in | ||
colorlog==6.7.0 | ||
# via nox | ||
commonmark==0.9.1 | ||
# via rich | ||
coverage[toml]==7.0.5 | ||
# via pytest-cov | ||
distlib==0.3.6 | ||
# via virtualenv | ||
django==4.1.5 | ||
# via -r requirements.in | ||
docutils==0.19 | ||
# via readme-renderer | ||
factory-boy==3.2.1 | ||
# via -r requirements.in | ||
faker==16.4.0 | ||
# via factory-boy | ||
filelock==3.9.0 | ||
# via virtualenv | ||
flake8==6.0.0 | ||
# via -r requirements.in | ||
idna==3.4 | ||
# via requests | ||
importlib-metadata==6.0.0 | ||
# via | ||
# keyring | ||
# twine | ||
iniconfig==2.0.0 | ||
# via pytest | ||
jaraco-classes==3.2.3 | ||
# via keyring | ||
keyring==23.13.1 | ||
# via twine | ||
mccabe==0.7.0 | ||
# via flake8 | ||
more-itertools==9.0.0 | ||
# via jaraco-classes | ||
nox==2022.11.21 | ||
# via -r requirements.in | ||
packaging==23.0 | ||
# via | ||
# build | ||
# nox | ||
# pytest | ||
pkginfo==1.9.6 | ||
# via twine | ||
platformdirs==2.6.2 | ||
# via virtualenv | ||
pluggy==1.0.0 | ||
# via pytest | ||
py==1.11.0 | ||
# via pytest | ||
pycodestyle==2.10.0 | ||
# via flake8 | ||
pyflakes==3.0.1 | ||
# via | ||
# -r requirements.in | ||
# flake8 | ||
pygments==2.14.0 | ||
# via | ||
# readme-renderer | ||
# rich | ||
pyproject-hooks==1.0.0 | ||
# via build | ||
pytest==6.2.5 | ||
# via | ||
# -r requirements.in | ||
# pytest-cov | ||
# pytest-django | ||
# pytest-pythonpath | ||
pytest-cov==4.0.0 | ||
# via -r requirements.in | ||
pytest-django==4.5.2 | ||
# via -r requirements.in | ||
pytest-pythonpath==0.7.4 | ||
# via -r requirements.in | ||
python-dateutil==2.8.2 | ||
# via faker | ||
readme-renderer==37.3 | ||
# via twine | ||
requests==2.28.2 | ||
# via | ||
# requests-toolbelt | ||
# twine | ||
requests-toolbelt==0.10.1 | ||
# via twine | ||
rfc3986==2.0.0 | ||
# via twine | ||
rich==13.1.0 | ||
# via twine | ||
six==1.16.0 | ||
# via | ||
# bleach | ||
# python-dateutil | ||
sqlparse==0.4.3 | ||
# via django | ||
toml==0.10.2 | ||
# via pytest | ||
tomli==2.0.1 | ||
# via | ||
# build | ||
# check-manifest | ||
# coverage | ||
# pyproject-hooks | ||
twine==4.0.2 | ||
# via -r requirements.in | ||
urllib3==1.26.14 | ||
# via | ||
# requests | ||
# twine | ||
virtualenv==20.17.1 | ||
# via nox | ||
webencodings==0.5.1 | ||
# via bleach | ||
zipp==3.11.0 | ||
# via importlib-metadata | ||
|
||
# The following packages are considered to be unsafe in a requirements file: | ||
# setuptools | ||
bumpversion | ||
check-manifest | ||
Django<5.0 | ||
factory-boy | ||
flake8 | ||
nox | ||
pyflakes | ||
pytest | ||
pytest-cov | ||
pytest-django | ||
pytest-pythonpath | ||
twine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,23 +9,19 @@ author = Frank Wiles | |
author_email = [email protected] | ||
license = BSD-3-Clause | ||
license_file = LICENSE.txt | ||
classifiers = | ||
classifiers = | ||
Development Status :: 5 - Production/Stable | ||
Environment :: Web Environment | ||
Framework :: Django | ||
Framework :: Django :: 2.2 | ||
Framework :: Django :: 3.0 | ||
Framework :: Django :: 3.1 | ||
Framework :: Django :: 3.2 | ||
Framework :: Django :: 4.0 | ||
Framework :: Django :: 4.1 | ||
Framework :: Django :: 4.2 | ||
Framework :: Pytest | ||
Intended Audience :: Developers | ||
License :: OSI Approved :: BSD License | ||
Operating System :: OS Independent | ||
Programming Language :: Python :: 3 | ||
Programming Language :: Python :: 3 :: Only | ||
Programming Language :: Python :: 3.6 | ||
Programming Language :: Python :: 3.7 | ||
Programming Language :: Python :: 3.8 | ||
Programming Language :: Python :: 3.9 | ||
|
@@ -40,8 +36,8 @@ zip_safe = False | |
tests_require = django-friendship[test] | ||
|
||
[options.extras_require] | ||
test = | ||
black==21.7b0 | ||
test = | ||
black | ||
pytest | ||
pytest-django | ||
pytest-cov | ||
|
@@ -54,8 +50,9 @@ universal = 1 | |
[flake8] | ||
ignore = E203, E501, W503 | ||
select = C,E,F,W,B,B950 | ||
exclude = | ||
exclude = | ||
.git, | ||
.nox, | ||
.tox, | ||
docs, | ||
*migrations*, | ||
|