Various template default updates (#74)

* bump versions in dependencies and ci builds

* move tox to [dev] per issue #34

* move RTD deps pointer into .readthedocs.yml

* unpin flake8 add flake8-bugbear to lint deps
This commit is contained in:
Paul Robinson
2023-04-10 11:10:15 -06:00
committed by pacrob
parent 180777d7db
commit ffd6ad8b9f
5 changed files with 57 additions and 26 deletions

View File

@ -39,60 +39,81 @@ jobs:
docs:
<<: *common
docker:
- image: cimg/python:3.7
- image: cimg/python:3.8
environment:
TOXENV: docs
lint:
py37-lint:
<<: *common
docker:
- image: cimg/python:3.7
environment:
TOXENV: lint
TOXENV: py37-lint
py37-core:
<<: *common
docker:
- image: cimg/python:3.7
environment:
TOXENV: py37-core
py38-lint:
<<: *common
docker:
- image: cimg/python:3.8
environment:
TOXENV: py38-lint
py38-core:
<<: *common
docker:
- image: cimg/python:3.8
environment:
TOXENV: py38-core
py39-lint:
<<: *common
docker:
- image: cimg/python:3.9
environment:
TOXENV: py39-lint
py39-core:
<<: *common
docker:
- image: cimg/python:3.9
environment:
TOXENV: py39-core
py310-lint:
<<: *common
docker:
- image: cimg/python:3.10
environment:
TOXENV: py310-lint
py310-core:
<<: *common
docker:
- image: cimg/python:3.10
environment:
TOXENV: py310-core
py311-lint:
<<: *common
docker:
- image: cimg/python:3.11
environment:
TOXENV: py311-lint
py311-core:
<<: *common
docker:
- image: cimg/python:3.11
environment:
TOXENV: py311-core
pypy3-core:
<<: *common
docker:
- image: pypy
environment:
TOXENV: pypy3-core
workflows:
version: 2
test:
jobs:
- docs
- lint
- py37-lint
- py38-lint
- py39-lint
- py310-lint
- py311-lint
- py37-core
- py38-core
- py39-core
- py310-core
- py311-core
- pypy3-core

View File

@ -2,4 +2,7 @@ version: 2
python:
install:
- requirements: requirements-docs.txt
- method: pip
path: .
extra_requirements:
- doc

View File

@ -1 +0,0 @@
<PYPI_NAME>[doc]

View File

@ -7,14 +7,14 @@ from setuptools import (
extras_require = {
"test": [
"pytest>=6.2.5",
"pytest-xdist>=2.4.0,<3",
"tox==3.14.6",
"pytest>=7.0.0",
"pytest-xdist>=2.4.0",
],
"lint": [
"flake8==3.7.9",
"flake8>=5.0.0",
"flake8-bugbear>=22.0.0",
"isort>=5.10.1",
"mypy==0.770",
"mypy==0.971",
"pydocstyle>=5.0.0",
"black>=22",
],
@ -26,6 +26,7 @@ extras_require = {
"dev": [
"bumpversion>=0.5.3",
"pytest-watch>=4.1.0",
"tox>=3.18.0",
"wheel",
"twine",
"ipython",
@ -79,6 +80,5 @@ setup(
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: PyPy",
],
)

22
tox.ini
View File

@ -1,7 +1,7 @@
[tox]
envlist=
py{37,38,39,310,311,py3}-core
lint
py{37,38,39,310,311}-core
py{37,38,39,310,311}-lint
docs
[isort]
@ -14,7 +14,7 @@ multi_line_output=3
profile=black
[flake8]
max-line-length= 100
max-line-length= 88
exclude= venv*,.tox,docs,build
extend-ignore= E203
@ -30,19 +30,27 @@ basepython =
py39: python3.9
py310: python3.10
py311: python3.11
pypy3: pypy3
extras=
test
docs: doc
whitelist_externals=make
allowlist_externals=make
[testenv:lint]
[common-lint]
basepython=python
extras=lint
whitelist_externals=black
allowlist_externals=black
commands=
mypy -p <MODULE_NAME> --config-file {toxinidir}/mypy.ini
flake8 {toxinidir}/<MODULE_NAME> {toxinidir}/tests
isort --check-only --diff {toxinidir}/<MODULE_NAME> {toxinidir}/tests
pydocstyle --explain {toxinidir}/<MODULE_NAME> {toxinidir}/tests
black --check {toxinidir}/<MODULE_NAME> {toxinidir}/docs {toxinidir}/tests {toxinidir}/setup.py
[testenv:lint]
basepython: python
extras: {[common-lint]extras}
commands: {[common-lint]commands}
[testenv:py{37,38,39,310,311}-lint]
extras: {[common-lint]extras}
commands: {[common-lint]commands}