Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.0 dev fix req tox #607

Merged
merged 2 commits into from
May 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test-python-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install -U wheel setuptools pip
python -m pip install tox -c requirements/tox.txt
python -m pip install -r requirements/tox.txt
- name: Test ${{ env.project-directory }}
id: tests
run:
Expand Down Expand Up @@ -219,7 +219,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install -U wheel setuptools pip
python -m pip install coverage tox -c requirements/tests.txt -c requirements/tox.txt
python -m pip install -r requirements/tests.txt -r requirements/tox.txt
- name: Merge pytest-reports
run: python -m tox -r -e pytests_merge
- name: Merge coverage
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-python-plugin-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install -U wheel setuptools pip
python -m pip install coverage tox -c requirements/tests.txt -c requirements/tox.txt
python -m pip install -r requirements/tests.txt -r requirements/tox.txt
- name: Merge pytest-reports
run: python -m tox -r -e pytests_merge
- name: Merge pytest-coverage
Expand Down
2 changes: 2 additions & 0 deletions python-package/requirements/build.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ pep517
setuptools
wheel
pip

-c constraints.txt
14 changes: 14 additions & 0 deletions python-package/requirements/constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# constraints from the package itself:
# set as `install_requires`

typing-extensions >= 3.7.4 ; python_version < '3.8'
# for ConfigFiles:
ruamel.yaml >= 0.16
yamale >= 3.0
# for WebServer:
werkzeug >= 1.0 , < 2.0
mako >= 1.1
# for PluginsSupport:
setuptools >= 41.0
# for CLI:
click >= 7.1 , < 8.0
3 changes: 3 additions & 0 deletions python-package/requirements/dev.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
-r style.in
-r tests.in
-r tox.in

pip-tools >= 5.3
isort >= 5.0
autopep8 >= 1.5

-c constraints.txt
11 changes: 7 additions & 4 deletions python-package/requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ attrs==21.2.0
autopep8==1.5.7
# via -r requirements/dev.in
click==7.1.2
# via pip-tools
coverage==5.5
# via
# -c requirements/constraints.txt
# pip-tools
coverage[toml]==5.5
# via
# -r requirements/tests.in
# pytest-cov
Expand Down Expand Up @@ -84,7 +86,7 @@ pyflakes==2.3.1
# via flake8
pyparsing==2.4.7
# via packaging
pytest-cov==2.11.1
pytest-cov==2.12.0
# via -r requirements/tests.in
pytest-mock==3.6.1
# via -r requirements/tests.in
Expand All @@ -102,14 +104,15 @@ testfixtures==6.17.1
toml==0.10.2
# via
# autopep8
# coverage
# pep517
# pytest
# tox
tox==3.23.1
# via -r requirements/tox.in
typed-ast==1.4.3
# via mypy
typing-extensions==3.7.4.3
typing-extensions==3.10.0.0
# via mypy
virtualenv==20.4.6
# via tox
Expand Down
2 changes: 2 additions & 0 deletions python-package/requirements/style.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ pep8-naming >= 0.9
mypy >= 0.761

# pylint >= 2.5

-c constraints.txt
2 changes: 1 addition & 1 deletion python-package/requirements/style.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ testfixtures==6.17.1
# via flake8-isort
typed-ast==1.4.3
# via mypy
typing-extensions==3.7.4.3
typing-extensions==3.10.0.0
# via mypy
1 change: 1 addition & 0 deletions python-package/requirements/tests.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ pytest >= 6.0
pytest-cov >= 2.10
pytest-mock >= 3.3

-c constraints.txt
8 changes: 5 additions & 3 deletions python-package/requirements/tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
attrs==21.2.0
# via pytest
coverage==5.5
coverage[toml]==5.5
# via
# -r requirements/tests.in
# pytest-cov
Expand All @@ -24,7 +24,7 @@ py==1.10.0
# via pytest
pyparsing==2.4.7
# via packaging
pytest-cov==2.11.1
pytest-cov==2.12.0
# via -r requirements/tests.in
pytest-mock==3.6.1
# via -r requirements/tests.in
Expand All @@ -34,4 +34,6 @@ pytest==6.2.4
# pytest-cov
# pytest-mock
toml==0.10.2
# via pytest
# via
# coverage
# pytest
2 changes: 2 additions & 0 deletions python-package/requirements/tox.in
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
tox >= 3.14

-c constraints.txt
12 changes: 3 additions & 9 deletions python-package/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ download = False
depends = tests_start
deps =
-r requirements/tests.txt
-c requirements/dev.txt
setenv =
NP_TESTLOG_NAME = {env:NP_TESTLOG_NAME:}_{envname}
extras =
Expand All @@ -37,8 +36,7 @@ commands =
depends =
skip_install = True
deps =
coverage
-c requirements/dev.txt
-r requirements/tests.txt
setenv =
NP_TESTLOG_NAME =
commands =
Expand All @@ -51,8 +49,7 @@ depends =
py{39, 38,37,36}
skip_install = True
deps =
coverage
-c requirements/dev.txt
-r requirements/tests.txt
setenv =
NP_TESTLOG_NAME =
commands =
Expand All @@ -66,7 +63,6 @@ depends =
skip_install = True
deps =
junitparser
-c requirements/dev.txt
setenv =
NP_TESTLOG_NAME =
commands =
Expand All @@ -77,9 +73,7 @@ depends =
skip_install = True
deps =
-r requirements/style.txt
pytest # to analyse tests
pytest_mock # to analyse tests
-c requirements/dev.txt
-r requirements/tests.txt # to analyse tests
setenv =
NP_TESTLOG_NAME =
commands =
Expand Down
9 changes: 5 additions & 4 deletions python-plugin-example/requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ attrs==21.2.0
# pytest
autopep8==1.5.7
# via -r requirements/dev.in
click==7.1.2
click==8.0.1
# via pip-tools
coverage==5.5
coverage[toml]==5.5
# via
# -r requirements/tests.in
# pytest-cov
Expand Down Expand Up @@ -84,7 +84,7 @@ pyflakes==2.3.1
# via flake8
pyparsing==2.4.7
# via packaging
pytest-cov==2.11.1
pytest-cov==2.12.0
# via -r requirements/tests.in
pytest==6.2.4
# via
Expand All @@ -99,14 +99,15 @@ testfixtures==6.17.1
toml==0.10.2
# via
# autopep8
# coverage
# pep517
# pytest
# tox
tox==3.23.1
# via -r requirements/tox.in
typed-ast==1.4.3
# via mypy
typing-extensions==3.7.4.3
typing-extensions==3.10.0.0
# via mypy
virtualenv==20.4.6
# via tox
Expand Down
2 changes: 1 addition & 1 deletion python-plugin-example/requirements/style.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ testfixtures==6.17.1
# via flake8-isort
typed-ast==1.4.3
# via mypy
typing-extensions==3.7.4.3
typing-extensions==3.10.0.0
# via mypy
8 changes: 5 additions & 3 deletions python-plugin-example/requirements/tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
attrs==21.2.0
# via pytest
coverage==5.5
coverage[toml]==5.5
# via
# -r requirements/tests.in
# pytest-cov
Expand All @@ -24,11 +24,13 @@ py==1.10.0
# via pytest
pyparsing==2.4.7
# via packaging
pytest-cov==2.11.1
pytest-cov==2.12.0
# via -r requirements/tests.in
pytest==6.2.4
# via
# -r requirements/tests.in
# pytest-cov
toml==0.10.2
# via pytest
# via
# coverage
# pytest
13 changes: 4 additions & 9 deletions python-plugin-example/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ 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
Expand All @@ -36,8 +35,7 @@ commands =
depends =
skip_install = True
deps =
coverage
-c requirements/dev.txt
-r requirements/tests.txt
commands =
{envpython} -m coverage erase
{envpython} -c 'import shutil; shutil.rmtree("reports", True);'
Expand All @@ -48,8 +46,7 @@ depends =
py{39,38,37,36}
skip_install = True
deps =
coverage
-c requirements/dev.txt
-r requirements/tests.txt
commands =
{envpython} -m coverage xml
{envpython} -m coverage report
Expand All @@ -61,7 +58,6 @@ depends =
skip_install = True
deps =
junitparser
-c requirements/dev.txt
commands =
{envpython} -m junitparser merge --glob reports/pytests/*.xml reports/pytests.xml

Expand All @@ -70,11 +66,10 @@ depends =
skip_install = True
deps =
-r requirements/style.txt
pytest # to analyse tests
-c requirements/dev.txt
-r requirements/tests.txt # to analyse tests
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 -q -U {toxinidir}/../python-package # -c requirements/dev.txt
{envpython} -m mypy