Skip to content

Commit

Permalink
Various template default updates (ethereum#74)
Browse files Browse the repository at this point in the history
* bump versions in dependencies and ci builds

* move tox to [dev] per issue ethereum#34

* move RTD deps pointer into .readthedocs.yml

* unpin flake8 add flake8-bugbear to lint deps
  • Loading branch information
pacrob committed May 1, 2023
1 parent 180777d commit ffd6ad8
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 25 deletions.
41 changes: 31 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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-core:
py311-lint:
<<: *common
docker:
- image: cimg/python:3.11
environment:
TOXENV: py311-core
pypy3-core:
TOXENV: py311-lint
py311-core:
<<: *common
docker:
- image: pypy
- image: cimg/python:3.11
environment:
TOXENV: pypy3-core
TOXENV: py311-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
5 changes: 4 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ version: 2

python:
install:
- requirements: requirements-docs.txt
- method: pip
path: .
extra_requirements:
- doc
1 change: 0 additions & 1 deletion requirements-docs.txt

This file was deleted.

12 changes: 6 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

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",
],
Expand All @@ -26,6 +26,7 @@
"dev": [
"bumpversion>=0.5.3",
"pytest-watch>=4.1.0",
"tox>=3.18.0",
"wheel",
"twine",
"ipython",
Expand Down Expand Up @@ -79,6 +80,5 @@
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: PyPy",
],
)
22 changes: 15 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -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]
Expand All @@ -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

Expand All @@ -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}

0 comments on commit ffd6ad8

Please sign in to comment.