From ffd6ad8b9fe4fce1ddd38d3212dca0b14b89a79e Mon Sep 17 00:00:00 2001 From: Paul Robinson <5199899+pacrob@users.noreply.github.com> Date: Mon, 10 Apr 2023 11:10:15 -0600 Subject: [PATCH] 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 --- .circleci/config.yml | 43 ++++++++++++++++++++++++++++++++----------- .readthedocs.yml | 5 ++++- requirements-docs.txt | 1 - setup.py | 12 ++++++------ tox.ini | 22 +++++++++++++++------- 5 files changed, 57 insertions(+), 26 deletions(-) delete mode 100644 requirements-docs.txt diff --git a/.circleci/config.yml b/.circleci/config.yml index db95741c..237a3f62 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 diff --git a/.readthedocs.yml b/.readthedocs.yml index ed4fab3c..959cf717 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -2,4 +2,7 @@ version: 2 python: install: - - requirements: requirements-docs.txt \ No newline at end of file + - method: pip + path: . + extra_requirements: + - doc diff --git a/requirements-docs.txt b/requirements-docs.txt deleted file mode 100644 index 1b49b744..00000000 --- a/requirements-docs.txt +++ /dev/null @@ -1 +0,0 @@ -[doc] diff --git a/setup.py b/setup.py index 04028b11..33f94256 100644 --- a/setup.py +++ b/setup.py @@ -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", ], ) diff --git a/tox.ini b/tox.ini index 23729cfc..64147d4f 100644 --- a/tox.ini +++ b/tox.ini @@ -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 --config-file {toxinidir}/mypy.ini flake8 {toxinidir}/ {toxinidir}/tests isort --check-only --diff {toxinidir}/ {toxinidir}/tests pydocstyle --explain {toxinidir}/ {toxinidir}/tests black --check {toxinidir}/ {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}