mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
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:
@ -39,60 +39,81 @@ jobs:
|
|||||||
docs:
|
docs:
|
||||||
<<: *common
|
<<: *common
|
||||||
docker:
|
docker:
|
||||||
- image: cimg/python:3.7
|
- image: cimg/python:3.8
|
||||||
environment:
|
environment:
|
||||||
TOXENV: docs
|
TOXENV: docs
|
||||||
lint:
|
py37-lint:
|
||||||
<<: *common
|
<<: *common
|
||||||
docker:
|
docker:
|
||||||
- image: cimg/python:3.7
|
- image: cimg/python:3.7
|
||||||
environment:
|
environment:
|
||||||
TOXENV: lint
|
TOXENV: py37-lint
|
||||||
py37-core:
|
py37-core:
|
||||||
<<: *common
|
<<: *common
|
||||||
docker:
|
docker:
|
||||||
- image: cimg/python:3.7
|
- image: cimg/python:3.7
|
||||||
environment:
|
environment:
|
||||||
TOXENV: py37-core
|
TOXENV: py37-core
|
||||||
|
py38-lint:
|
||||||
|
<<: *common
|
||||||
|
docker:
|
||||||
|
- image: cimg/python:3.8
|
||||||
|
environment:
|
||||||
|
TOXENV: py38-lint
|
||||||
py38-core:
|
py38-core:
|
||||||
<<: *common
|
<<: *common
|
||||||
docker:
|
docker:
|
||||||
- image: cimg/python:3.8
|
- image: cimg/python:3.8
|
||||||
environment:
|
environment:
|
||||||
TOXENV: py38-core
|
TOXENV: py38-core
|
||||||
|
py39-lint:
|
||||||
|
<<: *common
|
||||||
|
docker:
|
||||||
|
- image: cimg/python:3.9
|
||||||
|
environment:
|
||||||
|
TOXENV: py39-lint
|
||||||
py39-core:
|
py39-core:
|
||||||
<<: *common
|
<<: *common
|
||||||
docker:
|
docker:
|
||||||
- image: cimg/python:3.9
|
- image: cimg/python:3.9
|
||||||
environment:
|
environment:
|
||||||
TOXENV: py39-core
|
TOXENV: py39-core
|
||||||
|
py310-lint:
|
||||||
|
<<: *common
|
||||||
|
docker:
|
||||||
|
- image: cimg/python:3.10
|
||||||
|
environment:
|
||||||
|
TOXENV: py310-lint
|
||||||
py310-core:
|
py310-core:
|
||||||
<<: *common
|
<<: *common
|
||||||
docker:
|
docker:
|
||||||
- image: cimg/python:3.10
|
- image: cimg/python:3.10
|
||||||
environment:
|
environment:
|
||||||
TOXENV: py310-core
|
TOXENV: py310-core
|
||||||
|
py311-lint:
|
||||||
|
<<: *common
|
||||||
|
docker:
|
||||||
|
- image: cimg/python:3.11
|
||||||
|
environment:
|
||||||
|
TOXENV: py311-lint
|
||||||
py311-core:
|
py311-core:
|
||||||
<<: *common
|
<<: *common
|
||||||
docker:
|
docker:
|
||||||
- image: cimg/python:3.11
|
- image: cimg/python:3.11
|
||||||
environment:
|
environment:
|
||||||
TOXENV: py311-core
|
TOXENV: py311-core
|
||||||
pypy3-core:
|
|
||||||
<<: *common
|
|
||||||
docker:
|
|
||||||
- image: pypy
|
|
||||||
environment:
|
|
||||||
TOXENV: pypy3-core
|
|
||||||
workflows:
|
workflows:
|
||||||
version: 2
|
version: 2
|
||||||
test:
|
test:
|
||||||
jobs:
|
jobs:
|
||||||
- docs
|
- docs
|
||||||
- lint
|
- py37-lint
|
||||||
|
- py38-lint
|
||||||
|
- py39-lint
|
||||||
|
- py310-lint
|
||||||
|
- py311-lint
|
||||||
- py37-core
|
- py37-core
|
||||||
- py38-core
|
- py38-core
|
||||||
- py39-core
|
- py39-core
|
||||||
- py310-core
|
- py310-core
|
||||||
- py311-core
|
- py311-core
|
||||||
- pypy3-core
|
|
||||||
|
|||||||
@ -2,4 +2,7 @@ version: 2
|
|||||||
|
|
||||||
python:
|
python:
|
||||||
install:
|
install:
|
||||||
- requirements: requirements-docs.txt
|
- method: pip
|
||||||
|
path: .
|
||||||
|
extra_requirements:
|
||||||
|
- doc
|
||||||
|
|||||||
@ -1 +0,0 @@
|
|||||||
<PYPI_NAME>[doc]
|
|
||||||
12
setup.py
12
setup.py
@ -7,14 +7,14 @@ from setuptools import (
|
|||||||
|
|
||||||
extras_require = {
|
extras_require = {
|
||||||
"test": [
|
"test": [
|
||||||
"pytest>=6.2.5",
|
"pytest>=7.0.0",
|
||||||
"pytest-xdist>=2.4.0,<3",
|
"pytest-xdist>=2.4.0",
|
||||||
"tox==3.14.6",
|
|
||||||
],
|
],
|
||||||
"lint": [
|
"lint": [
|
||||||
"flake8==3.7.9",
|
"flake8>=5.0.0",
|
||||||
|
"flake8-bugbear>=22.0.0",
|
||||||
"isort>=5.10.1",
|
"isort>=5.10.1",
|
||||||
"mypy==0.770",
|
"mypy==0.971",
|
||||||
"pydocstyle>=5.0.0",
|
"pydocstyle>=5.0.0",
|
||||||
"black>=22",
|
"black>=22",
|
||||||
],
|
],
|
||||||
@ -26,6 +26,7 @@ extras_require = {
|
|||||||
"dev": [
|
"dev": [
|
||||||
"bumpversion>=0.5.3",
|
"bumpversion>=0.5.3",
|
||||||
"pytest-watch>=4.1.0",
|
"pytest-watch>=4.1.0",
|
||||||
|
"tox>=3.18.0",
|
||||||
"wheel",
|
"wheel",
|
||||||
"twine",
|
"twine",
|
||||||
"ipython",
|
"ipython",
|
||||||
@ -79,6 +80,5 @@ setup(
|
|||||||
"Programming Language :: Python :: 3.9",
|
"Programming Language :: Python :: 3.9",
|
||||||
"Programming Language :: Python :: 3.10",
|
"Programming Language :: Python :: 3.10",
|
||||||
"Programming Language :: Python :: 3.11",
|
"Programming Language :: Python :: 3.11",
|
||||||
"Programming Language :: Python :: Implementation :: PyPy",
|
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|||||||
22
tox.ini
22
tox.ini
@ -1,7 +1,7 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist=
|
envlist=
|
||||||
py{37,38,39,310,311,py3}-core
|
py{37,38,39,310,311}-core
|
||||||
lint
|
py{37,38,39,310,311}-lint
|
||||||
docs
|
docs
|
||||||
|
|
||||||
[isort]
|
[isort]
|
||||||
@ -14,7 +14,7 @@ multi_line_output=3
|
|||||||
profile=black
|
profile=black
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
max-line-length= 100
|
max-line-length= 88
|
||||||
exclude= venv*,.tox,docs,build
|
exclude= venv*,.tox,docs,build
|
||||||
extend-ignore= E203
|
extend-ignore= E203
|
||||||
|
|
||||||
@ -30,19 +30,27 @@ basepython =
|
|||||||
py39: python3.9
|
py39: python3.9
|
||||||
py310: python3.10
|
py310: python3.10
|
||||||
py311: python3.11
|
py311: python3.11
|
||||||
pypy3: pypy3
|
|
||||||
extras=
|
extras=
|
||||||
test
|
test
|
||||||
docs: doc
|
docs: doc
|
||||||
whitelist_externals=make
|
allowlist_externals=make
|
||||||
|
|
||||||
[testenv:lint]
|
[common-lint]
|
||||||
basepython=python
|
basepython=python
|
||||||
extras=lint
|
extras=lint
|
||||||
whitelist_externals=black
|
allowlist_externals=black
|
||||||
commands=
|
commands=
|
||||||
mypy -p <MODULE_NAME> --config-file {toxinidir}/mypy.ini
|
mypy -p <MODULE_NAME> --config-file {toxinidir}/mypy.ini
|
||||||
flake8 {toxinidir}/<MODULE_NAME> {toxinidir}/tests
|
flake8 {toxinidir}/<MODULE_NAME> {toxinidir}/tests
|
||||||
isort --check-only --diff {toxinidir}/<MODULE_NAME> {toxinidir}/tests
|
isort --check-only --diff {toxinidir}/<MODULE_NAME> {toxinidir}/tests
|
||||||
pydocstyle --explain {toxinidir}/<MODULE_NAME> {toxinidir}/tests
|
pydocstyle --explain {toxinidir}/<MODULE_NAME> {toxinidir}/tests
|
||||||
black --check {toxinidir}/<MODULE_NAME> {toxinidir}/docs {toxinidir}/tests {toxinidir}/setup.py
|
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}
|
||||||
|
|||||||
Reference in New Issue
Block a user