From cef9a5bdd5876b9667115e280704fa96510382f2 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Mon, 13 Sep 2021 09:20:56 +0100 Subject: [PATCH] Remove use of pip-tools Needed-By: #47 Related: https://github.com/jazzband/pip-tools/issues/333 --- Dockerfile | 2 +- setup.cfg | 9 +++++++ test-requirements.in | 6 ----- test-requirements.txt | 59 ------------------------------------------- tox.ini | 13 ++-------- 5 files changed, 12 insertions(+), 77 deletions(-) delete mode 100644 test-requirements.in delete mode 100644 test-requirements.txt diff --git a/Dockerfile b/Dockerfile index 6183b52..11be040 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,5 +15,5 @@ COPY . /root/code/ WORKDIR /root/code/ RUN \ python3 --version && \ -python3 -m pip install . -r test-requirements.txt && \ +python3 -m pip install ".[test]" && \ python3 -m pytest diff --git a/setup.cfg b/setup.cfg index 9842e68..24af7a9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -64,6 +64,15 @@ setup_requires = # These are required in actual runtime: ; install_requires = +[options.extras_require] +test = + enrich>=1.2.5 + mock>=3.0.5 + pytest-cov>=2.7.1 + pytest-plus + pytest-xdist>=1.29.0 + pytest>=6.1.0 + [options.packages.find] where = src diff --git a/test-requirements.in b/test-requirements.in deleted file mode 100644 index 65f0495..0000000 --- a/test-requirements.in +++ /dev/null @@ -1,6 +0,0 @@ -enrich>=1.2.5 -mock>=3.0.5 -pytest-cov>=2.7.1 -pytest-plus -pytest-xdist>=1.29.0 -pytest>=6.1.0 diff --git a/test-requirements.txt b/test-requirements.txt deleted file mode 100644 index 605050c..0000000 --- a/test-requirements.txt +++ /dev/null @@ -1,59 +0,0 @@ -# -# This file is autogenerated by pip-compile -# To update, run: -# -# pip-compile --output-file=test-requirements.txt setup.cfg test-requirements.in -# -apipkg==1.5 - # via execnet -attrs==20.3.0 - # via pytest -colorama==0.4.4 - # via rich -commonmark==0.9.1 - # via rich -coverage==5.5 - # via pytest-cov -enrich==1.2.6 - # via -r test-requirements.in -execnet==1.8.0 - # via pytest-xdist -iniconfig==1.1.1 - # via pytest -mock==4.0.3 - # via -r test-requirements.in -more-itertools==8.7.0 - # via pytest-plus -packaging==20.9 - # via pytest -pluggy==0.13.1 - # via pytest -py==1.10.0 - # via - # pytest - # pytest-forked -pygments==2.8.1 - # via rich -pyparsing==2.4.7 - # via packaging -pytest-cov==2.11.1 - # via -r test-requirements.in -pytest-forked==1.3.0 - # via pytest-xdist -pytest-plus==0.2 - # via -r test-requirements.in -pytest-xdist==2.2.1 - # via -r test-requirements.in -pytest==6.2.3 - # via - # -r test-requirements.in - # pytest-cov - # pytest-forked - # pytest-plus - # pytest-xdist -rich==10.1.0 - # via enrich -toml==0.10.2 - # via pytest -typing-extensions==3.7.4.3 - # via rich diff --git a/tox.ini b/tox.ini index 140a3ae..2430848 100644 --- a/tox.ini +++ b/tox.ini @@ -31,22 +31,13 @@ setenv = PYTHONUNBUFFERED=1 commands = python -m pytest -deps = - -r test-requirements.txt +extras = + test whitelist_externals = find rm sh -[testenv:deps] -description = Update dependency lock files used for testing -deps = - # replace with version once a new release is made - # https://github.com/jazzband/pip-tools/issues/1047 - pip-tools @ git+https://github.com/jazzband/pip-tools -commands = - pip-compile -o test-requirements.txt setup.cfg test-requirements.in - [testenv:lint] description = Runs all linting tasks # temporary due to https://github.com/PyCQA/pylint/issues/3876