From 4b3b90cc1732e2669ad9ab8db1a952418e19dfcc Mon Sep 17 00:00:00 2001 From: Jan Kowalleck Date: Sun, 4 Jul 2021 21:59:35 +0200 Subject: [PATCH] reverted parts of #607 since pyp-tools 6.2 support "skip-extras" --- .github/workflows/test-python-package.yaml | 4 +- .../workflows/test-python-plugin-example.yaml | 2 +- python-package/bin/requirements_bump.sh | 2 +- python-package/requirements/build.txt | 4 +- python-package/requirements/constraints.txt | 3 + python-package/requirements/dev.txt | 53 ++++++++++-------- python-package/requirements/style.txt | 26 +++++---- python-package/requirements/tests.txt | 20 +++---- python-package/requirements/tox.txt | 10 ++-- python-package/tox.ini | 13 +++-- .../bin/requirements_bump.sh | 3 +- python-plugin-example/requirements/dev.in | 2 + python-plugin-example/requirements/dev.txt | 55 +++++++++++-------- python-plugin-example/requirements/style.in | 2 + python-plugin-example/requirements/style.txt | 26 +++++---- python-plugin-example/requirements/tests.in | 2 + python-plugin-example/requirements/tests.txt | 16 +++--- python-plugin-example/requirements/tox.in | 2 + python-plugin-example/requirements/tox.txt | 10 ++-- python-plugin-example/tox.ini | 12 ++-- 20 files changed, 151 insertions(+), 116 deletions(-) diff --git a/.github/workflows/test-python-package.yaml b/.github/workflows/test-python-package.yaml index 4c709fc6a..616ce5130 100644 --- a/.github/workflows/test-python-package.yaml +++ b/.github/workflows/test-python-package.yaml @@ -121,7 +121,7 @@ jobs: - name: Install dependencies run: | python -m pip install -U wheel setuptools pip - python -m pip install -r requirements/tox.txt + python -m pip install tox -c requirements/tox.txt - name: Test ${{ env.project-directory }} id: tests run: @@ -219,7 +219,7 @@ jobs: - name: Install dependencies run: | python -m pip install -U wheel setuptools pip - python -m pip install -r requirements/tests.txt -r requirements/tox.txt + python -m pip install coverage tox -c requirements/tests.txt -c requirements/tox.txt - name: Merge pytest-reports run: python -m tox -r -e pytests_merge - name: Merge coverage diff --git a/.github/workflows/test-python-plugin-example.yaml b/.github/workflows/test-python-plugin-example.yaml index 51cb169e7..5abf8866f 100644 --- a/.github/workflows/test-python-plugin-example.yaml +++ b/.github/workflows/test-python-plugin-example.yaml @@ -192,7 +192,7 @@ jobs: - name: Install dependencies run: | python -m pip install -U wheel setuptools pip - python -m pip install -r requirements/tests.txt -r requirements/tox.txt + python -m pip install coverage tox -c requirements/tests.txt -c requirements/tox.txt - name: Merge pytest-reports run: python -m tox -r -e pytests_merge - name: Merge pytest-coverage diff --git a/python-package/bin/requirements_bump.sh b/python-package/bin/requirements_bump.sh index a8b575c60..92c61ab26 100755 --- a/python-package/bin/requirements_bump.sh +++ b/python-package/bin/requirements_bump.sh @@ -9,4 +9,4 @@ cd "$(dirname "$(dirname "$0")")" find "${REQUIREMENTS_DIR}" -type f -name '*.in' \ -exec echo 'precessing {}' \; \ - -exec pip-compile -qUr --header --annotate {} \; + -exec pip-compile -qUr --strip-extras --header --annotate {} \; diff --git a/python-package/requirements/build.txt b/python-package/requirements/build.txt index 8a50bfb53..10518a33a 100644 --- a/python-package/requirements/build.txt +++ b/python-package/requirements/build.txt @@ -1,8 +1,8 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.9 # To update, run: # -# pip-compile requirements/build.in +# pip-compile --strip-extras requirements/build.in # pep517==0.10.0 # via -r requirements/build.in diff --git a/python-package/requirements/constraints.txt b/python-package/requirements/constraints.txt index 7d039406f..9694db61c 100644 --- a/python-package/requirements/constraints.txt +++ b/python-package/requirements/constraints.txt @@ -12,3 +12,6 @@ setuptools >= 41.0 # for CLI: click >= 7.1 , < 8.0 + +# constraint from certain issues during testing + mypy < 0.900 # mypy introduced a lot of new stuff that was not incorporated into this project diff --git a/python-package/requirements/dev.txt b/python-package/requirements/dev.txt index ebd9845d3..25de3e2a9 100644 --- a/python-package/requirements/dev.txt +++ b/python-package/requirements/dev.txt @@ -1,8 +1,8 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.9 # To update, run: # -# pip-compile requirements/dev.in +# pip-compile --strip-extras requirements/dev.in # appdirs==1.4.4 # via virtualenv @@ -16,16 +16,24 @@ click==7.1.2 # via # -c requirements/constraints.txt # pip-tools -coverage[toml]==5.5 +coverage==5.5 # via # -r requirements/tests.in # pytest-cov -distlib==0.3.1 +distlib==0.3.2 # via virtualenv filelock==3.0.12 # via # tox # virtualenv +flake8==3.9.2 + # via + # -r requirements/style.in + # flake8-annotations + # flake8-bugbear + # flake8-isort + # flake8-polyfill + # flake8-use-fstring flake8-annotations==2.6.2 # via -r requirements/style.in flake8-bugbear==21.4.3 @@ -36,31 +44,25 @@ flake8-polyfill==1.0.2 # via pep8-naming flake8-use-fstring==1.1 # via -r requirements/style.in -flake8==3.9.2 - # via - # -r requirements/style.in - # flake8-annotations - # flake8-bugbear - # flake8-isort - # flake8-polyfill - # flake8-use-fstring future==0.18.2 # via junitparser iniconfig==1.1.1 # via pytest -isort==5.8.0 +isort==5.9.1 # via # -r requirements/dev.in # flake8-isort -junitparser==2.0.0 +junitparser==2.1.1 # via -r requirements/tests.in mccabe==0.6.1 # via flake8 +mypy==0.812 + # via + # -c requirements/constraints.txt + # -r requirements/style.in mypy-extensions==0.4.3 # via mypy -mypy==0.812 - # via -r requirements/style.in -packaging==20.9 +packaging==21.0 # via # pytest # tox @@ -68,7 +70,7 @@ pep517==0.10.0 # via pip-tools pep8-naming==0.11.1 # via -r requirements/style.in -pip-tools==6.1.0 +pip-tools==6.2.0 # via -r requirements/dev.in pluggy==0.13.1 # via @@ -86,15 +88,15 @@ pyflakes==2.3.1 # via flake8 pyparsing==2.4.7 # via packaging -pytest-cov==2.12.0 - # via -r requirements/tests.in -pytest-mock==3.6.1 - # via -r requirements/tests.in pytest==6.2.4 # via # -r requirements/tests.in # pytest-cov # pytest-mock +pytest-cov==2.12.1 + # via -r requirements/tests.in +pytest-mock==3.6.1 + # via -r requirements/tests.in six==1.16.0 # via # tox @@ -104,9 +106,9 @@ testfixtures==6.17.1 toml==0.10.2 # via # autopep8 - # coverage # pep517 # pytest + # pytest-cov # tox tox==3.23.1 # via -r requirements/tox.in @@ -114,8 +116,11 @@ typed-ast==1.4.3 # via mypy typing-extensions==3.10.0.0 # via mypy -virtualenv==20.4.6 +virtualenv==20.4.7 # via tox +wheel==0.36.2 + # via pip-tools # The following packages are considered to be unsafe in a requirements file: # pip +# setuptools diff --git a/python-package/requirements/style.txt b/python-package/requirements/style.txt index cb9c24b4b..6f032f3ba 100644 --- a/python-package/requirements/style.txt +++ b/python-package/requirements/style.txt @@ -1,11 +1,18 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.9 # To update, run: # -# pip-compile requirements/style.in +# pip-compile --strip-extras requirements/style.in # attrs==21.2.0 # via flake8-bugbear +flake8==3.9.2 + # via + # -r requirements/style.in + # flake8-annotations + # flake8-bugbear + # flake8-isort + # flake8-use-fstring flake8-annotations==2.6.2 # via -r requirements/style.in flake8-bugbear==21.4.3 @@ -16,21 +23,16 @@ flake8-polyfill==1.0.2 # via pep8-naming flake8-use-fstring==1.1 # via -r requirements/style.in -flake8==3.9.2 - # via - # -r requirements/style.in - # flake8-annotations - # flake8-bugbear - # flake8-isort - # flake8-use-fstring -isort==5.8.0 +isort==5.9.1 # via flake8-isort mccabe==0.6.1 # via flake8 +mypy==0.812 + # via + # -c requirements/constraints.txt + # -r requirements/style.in mypy-extensions==0.4.3 # via mypy -mypy==0.812 - # via -r requirements/style.in pep8-naming==0.11.1 # via -r requirements/style.in pycodestyle==2.7.0 diff --git a/python-package/requirements/tests.txt b/python-package/requirements/tests.txt index 391c53421..916554407 100644 --- a/python-package/requirements/tests.txt +++ b/python-package/requirements/tests.txt @@ -1,12 +1,12 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.9 # To update, run: # -# pip-compile requirements/tests.in +# pip-compile --strip-extras requirements/tests.in # attrs==21.2.0 # via pytest -coverage[toml]==5.5 +coverage==5.5 # via # -r requirements/tests.in # pytest-cov @@ -14,9 +14,9 @@ future==0.18.2 # via junitparser iniconfig==1.1.1 # via pytest -junitparser==2.0.0 +junitparser==2.1.1 # via -r requirements/tests.in -packaging==20.9 +packaging==21.0 # via pytest pluggy==0.13.1 # via pytest @@ -24,16 +24,16 @@ py==1.10.0 # via pytest pyparsing==2.4.7 # via packaging -pytest-cov==2.12.0 - # via -r requirements/tests.in -pytest-mock==3.6.1 - # via -r requirements/tests.in pytest==6.2.4 # via # -r requirements/tests.in # pytest-cov # pytest-mock +pytest-cov==2.12.1 + # via -r requirements/tests.in +pytest-mock==3.6.1 + # via -r requirements/tests.in toml==0.10.2 # via - # coverage # pytest + # pytest-cov diff --git a/python-package/requirements/tox.txt b/python-package/requirements/tox.txt index 79df18765..94c6b67e4 100644 --- a/python-package/requirements/tox.txt +++ b/python-package/requirements/tox.txt @@ -1,18 +1,18 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.9 # To update, run: # -# pip-compile requirements/tox.in +# pip-compile --strip-extras requirements/tox.in # appdirs==1.4.4 # via virtualenv -distlib==0.3.1 +distlib==0.3.2 # via virtualenv filelock==3.0.12 # via # tox # virtualenv -packaging==20.9 +packaging==21.0 # via tox pluggy==0.13.1 # via tox @@ -28,5 +28,5 @@ toml==0.10.2 # via tox tox==3.23.1 # via -r requirements/tox.in -virtualenv==20.4.6 +virtualenv==20.4.7 # via tox diff --git a/python-package/tox.ini b/python-package/tox.ini index 4e23cca2a..bbcf5d9a6 100644 --- a/python-package/tox.ini +++ b/python-package/tox.ini @@ -22,6 +22,7 @@ download = False depends = tests_start deps = -r requirements/tests.txt + -c requirements/dev.txt setenv = NP_TESTLOG_NAME = {env:NP_TESTLOG_NAME:}_{envname} extras = @@ -36,12 +37,13 @@ commands = depends = skip_install = True deps = - -r requirements/tests.txt + coverage + -c requirements/dev.txt setenv = NP_TESTLOG_NAME = commands = {envpython} -m coverage erase - {envpython} -c 'import shutil; shutil.rmtree("reports", True);' + {envpython} -c 'import shutil; shutil.rmtree("reports", True)' [testenv:coverage_report] depends = @@ -49,7 +51,8 @@ depends = py{39, 38,37,36} skip_install = True deps = - -r requirements/tests.txt + coverage + -c requirements/dev.txt setenv = NP_TESTLOG_NAME = commands = @@ -63,6 +66,7 @@ depends = skip_install = True deps = junitparser + -c requirements/dev.txt setenv = NP_TESTLOG_NAME = commands = @@ -74,6 +78,7 @@ skip_install = True deps = -r requirements/style.txt -r requirements/tests.txt # to analyse tests + -c requirements/dev.txt setenv = NP_TESTLOG_NAME = commands = @@ -96,7 +101,7 @@ setenv = NP_TESTLOG_NAME = NP_DIST_DIR = {env:NP_DIST_DIR:dist} commands = - {envpython} -c 'import shutil; shutil.rmtree("build", True); shutil.rmtree("{env:NP_DIST_DIR}", True);' + {envpython} -c 'import shutil; shutil.rmtree("build", True); shutil.rmtree("{env:NP_DIST_DIR}", True)' {envpython} -m pep517.build --source --binary --out-dir {env:NP_DIST_DIR} . [testenv:install] diff --git a/python-plugin-example/bin/requirements_bump.sh b/python-plugin-example/bin/requirements_bump.sh index f748a59e3..92c61ab26 100755 --- a/python-plugin-example/bin/requirements_bump.sh +++ b/python-plugin-example/bin/requirements_bump.sh @@ -9,5 +9,4 @@ cd "$(dirname "$(dirname "$0")")" find "${REQUIREMENTS_DIR}" -type f -name '*.in' \ -exec echo 'precessing {}' \; \ - -exec pip-compile -qUr --header --annotate {} \; - + -exec pip-compile -qUr --strip-extras --header --annotate {} \; diff --git a/python-plugin-example/requirements/dev.in b/python-plugin-example/requirements/dev.in index 97a036e26..fe24d83de 100644 --- a/python-plugin-example/requirements/dev.in +++ b/python-plugin-example/requirements/dev.in @@ -4,3 +4,5 @@ pip-tools >= 5.3 isort >= 5.0 autopep8 >= 1.5 + +-c ../../python-package/requirements/constraints.txt diff --git a/python-plugin-example/requirements/dev.txt b/python-plugin-example/requirements/dev.txt index 4f34b2b41..417375f8c 100644 --- a/python-plugin-example/requirements/dev.txt +++ b/python-plugin-example/requirements/dev.txt @@ -1,8 +1,8 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.9 # To update, run: # -# pip-compile requirements/dev.in +# pip-compile --strip-extras requirements/dev.in # appdirs==1.4.4 # via virtualenv @@ -12,18 +12,28 @@ attrs==21.2.0 # pytest autopep8==1.5.7 # via -r requirements/dev.in -click==8.0.1 - # via pip-tools -coverage[toml]==5.5 +click==7.1.2 + # via + # -c requirements/../../python-package/requirements/constraints.txt + # pip-tools +coverage==5.5 # via # -r requirements/tests.in # pytest-cov -distlib==0.3.1 +distlib==0.3.2 # via virtualenv filelock==3.0.12 # via # tox # virtualenv +flake8==3.9.2 + # via + # -r requirements/style.in + # flake8-annotations + # flake8-bugbear + # flake8-isort + # flake8-polyfill + # flake8-use-fstring flake8-annotations==2.6.2 # via -r requirements/style.in flake8-bugbear==21.4.3 @@ -34,31 +44,25 @@ flake8-polyfill==1.0.2 # via pep8-naming flake8-use-fstring==1.1 # via -r requirements/style.in -flake8==3.9.2 - # via - # -r requirements/style.in - # flake8-annotations - # flake8-bugbear - # flake8-isort - # flake8-polyfill - # flake8-use-fstring future==0.18.2 # via junitparser iniconfig==1.1.1 # via pytest -isort==5.8.0 +isort==5.9.1 # via # -r requirements/dev.in # flake8-isort -junitparser==2.0.0 +junitparser==2.1.1 # via -r requirements/tests.in mccabe==0.6.1 # via flake8 +mypy==0.812 + # via + # -c requirements/../../python-package/requirements/constraints.txt + # -r requirements/style.in mypy-extensions==0.4.3 # via mypy -mypy==0.812 - # via -r requirements/style.in -packaging==20.9 +packaging==21.0 # via # pytest # tox @@ -66,7 +70,7 @@ pep517==0.10.0 # via pip-tools pep8-naming==0.11.1 # via -r requirements/style.in -pip-tools==6.1.0 +pip-tools==6.2.0 # via -r requirements/dev.in pluggy==0.13.1 # via @@ -84,12 +88,12 @@ pyflakes==2.3.1 # via flake8 pyparsing==2.4.7 # via packaging -pytest-cov==2.12.0 - # via -r requirements/tests.in pytest==6.2.4 # via # -r requirements/tests.in # pytest-cov +pytest-cov==2.12.1 + # via -r requirements/tests.in six==1.16.0 # via # tox @@ -99,9 +103,9 @@ testfixtures==6.17.1 toml==0.10.2 # via # autopep8 - # coverage # pep517 # pytest + # pytest-cov # tox tox==3.23.1 # via -r requirements/tox.in @@ -109,8 +113,11 @@ typed-ast==1.4.3 # via mypy typing-extensions==3.10.0.0 # via mypy -virtualenv==20.4.6 +virtualenv==20.4.7 # via tox +wheel==0.36.2 + # via pip-tools # The following packages are considered to be unsafe in a requirements file: # pip +# setuptools diff --git a/python-plugin-example/requirements/style.in b/python-plugin-example/requirements/style.in index bd7f19bdd..7f5c3fed9 100644 --- a/python-plugin-example/requirements/style.in +++ b/python-plugin-example/requirements/style.in @@ -11,3 +11,5 @@ pep8-naming >= 0.9 mypy >= 0.761 # pylint >= 2.5 + +-c ../../python-package/requirements/constraints.txt diff --git a/python-plugin-example/requirements/style.txt b/python-plugin-example/requirements/style.txt index cb9c24b4b..daf621eb4 100644 --- a/python-plugin-example/requirements/style.txt +++ b/python-plugin-example/requirements/style.txt @@ -1,11 +1,18 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.9 # To update, run: # -# pip-compile requirements/style.in +# pip-compile --strip-extras requirements/style.in # attrs==21.2.0 # via flake8-bugbear +flake8==3.9.2 + # via + # -r requirements/style.in + # flake8-annotations + # flake8-bugbear + # flake8-isort + # flake8-use-fstring flake8-annotations==2.6.2 # via -r requirements/style.in flake8-bugbear==21.4.3 @@ -16,21 +23,16 @@ flake8-polyfill==1.0.2 # via pep8-naming flake8-use-fstring==1.1 # via -r requirements/style.in -flake8==3.9.2 - # via - # -r requirements/style.in - # flake8-annotations - # flake8-bugbear - # flake8-isort - # flake8-use-fstring -isort==5.8.0 +isort==5.9.1 # via flake8-isort mccabe==0.6.1 # via flake8 +mypy==0.812 + # via + # -c requirements/../../python-package/requirements/constraints.txt + # -r requirements/style.in mypy-extensions==0.4.3 # via mypy -mypy==0.812 - # via -r requirements/style.in pep8-naming==0.11.1 # via -r requirements/style.in pycodestyle==2.7.0 diff --git a/python-plugin-example/requirements/tests.in b/python-plugin-example/requirements/tests.in index e6baa22df..9a5b76ec1 100644 --- a/python-plugin-example/requirements/tests.in +++ b/python-plugin-example/requirements/tests.in @@ -2,3 +2,5 @@ coverage >= 5.0 junitparser >= 1.5 pytest >= 6.0 pytest-cov >= 2.10 + +-c ../../python-package/requirements/constraints.txt diff --git a/python-plugin-example/requirements/tests.txt b/python-plugin-example/requirements/tests.txt index 06792e203..4f3e9b8e4 100644 --- a/python-plugin-example/requirements/tests.txt +++ b/python-plugin-example/requirements/tests.txt @@ -1,12 +1,12 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.9 # To update, run: # -# pip-compile requirements/tests.in +# pip-compile --strip-extras requirements/tests.in # attrs==21.2.0 # via pytest -coverage[toml]==5.5 +coverage==5.5 # via # -r requirements/tests.in # pytest-cov @@ -14,9 +14,9 @@ future==0.18.2 # via junitparser iniconfig==1.1.1 # via pytest -junitparser==2.0.0 +junitparser==2.1.1 # via -r requirements/tests.in -packaging==20.9 +packaging==21.0 # via pytest pluggy==0.13.1 # via pytest @@ -24,13 +24,13 @@ py==1.10.0 # via pytest pyparsing==2.4.7 # via packaging -pytest-cov==2.12.0 - # via -r requirements/tests.in pytest==6.2.4 # via # -r requirements/tests.in # pytest-cov +pytest-cov==2.12.1 + # via -r requirements/tests.in toml==0.10.2 # via - # coverage # pytest + # pytest-cov diff --git a/python-plugin-example/requirements/tox.in b/python-plugin-example/requirements/tox.in index 41e87ec99..ffc880701 100644 --- a/python-plugin-example/requirements/tox.in +++ b/python-plugin-example/requirements/tox.in @@ -1 +1,3 @@ tox >= 3.14 + +-c ../../python-package/requirements/constraints.txt diff --git a/python-plugin-example/requirements/tox.txt b/python-plugin-example/requirements/tox.txt index 79df18765..94c6b67e4 100644 --- a/python-plugin-example/requirements/tox.txt +++ b/python-plugin-example/requirements/tox.txt @@ -1,18 +1,18 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.9 # To update, run: # -# pip-compile requirements/tox.in +# pip-compile --strip-extras requirements/tox.in # appdirs==1.4.4 # via virtualenv -distlib==0.3.1 +distlib==0.3.2 # via virtualenv filelock==3.0.12 # via # tox # virtualenv -packaging==20.9 +packaging==21.0 # via tox pluggy==0.13.1 # via tox @@ -28,5 +28,5 @@ toml==0.10.2 # via tox tox==3.23.1 # via -r requirements/tox.in -virtualenv==20.4.6 +virtualenv==20.4.7 # via tox diff --git a/python-plugin-example/tox.ini b/python-plugin-example/tox.ini index aed994b97..1b39fe492 100644 --- a/python-plugin-example/tox.ini +++ b/python-plugin-example/tox.ini @@ -22,10 +22,11 @@ download = False depends = tests_start deps = -r requirements/tests.txt + -c requirements/dev.txt commands = # !!! specialties for running in this dev env. Remove them when adopting for a real-world plugin. # get the current in-dev version of nichtparasoup - {envpython} -m pip install -q -U {toxinidir}/../python-package + {envpython} -m pip install -q -U --use-feature=in-tree-build {toxinidir}/../python-package -c requirements/dev.txt {envpython} -m pytest \ --cov --cov-append --cov-report='' \ --junit-xml=reports/pytests/{envname}.xml -o junit_suite_name={envname} \ @@ -35,7 +36,8 @@ commands = depends = skip_install = True deps = - -r requirements/tests.txt + coverage + -c requirements/dev.txt commands = {envpython} -m coverage erase {envpython} -c 'import shutil; shutil.rmtree("reports", True);' @@ -46,7 +48,8 @@ depends = py{39,38,37,36} skip_install = True deps = - -r requirements/tests.txt + coverage + -c requirements/dev.txt commands = {envpython} -m coverage xml {envpython} -m coverage report @@ -58,6 +61,7 @@ depends = skip_install = True deps = junitparser + -c requirements/dev.txt commands = {envpython} -m junitparser merge --glob reports/pytests/*.xml reports/pytests.xml @@ -71,5 +75,5 @@ commands = # !!! specialties for running in this dev env. Remove them when adopting for a real-world plugin. # get the current in-dev version of nichtparasoup {envpython} -m flake8 - {envpython} -m pip install -q -U {toxinidir}/../python-package # -c requirements/dev.txt + {envpython} -m pip install --use-feature=in-tree-build -U {toxinidir}/../python-package -c requirements/dev.txt {envpython} -m mypy