From b105c1bc15d231b0f945b1548601d27926eb65a7 Mon Sep 17 00:00:00 2001 From: Lars Date: Thu, 26 Oct 2023 00:14:58 +0200 Subject: [PATCH] Moved requirements to their dedicated folders --- .github/workflows/ci.yml | 2 +- .readthedocs.yaml | 2 +- requirements-rtd.txt => docs/requirements.txt | 0 noxfile.py | 8 ++++---- requirements-testing.txt | 6 ------ tests/requirements.txt | 5 +++++ 6 files changed, 11 insertions(+), 12 deletions(-) rename requirements-rtd.txt => docs/requirements.txt (100%) delete mode 100644 requirements-testing.txt create mode 100644 tests/requirements.txt diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ea8b30f..e3017cfd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: - name: Install dependencies run: | sudo apt -y install libzbar0 - pip install -r requirements-testing.txt + pip install -r tests/requirements.txt pip install setuptools pip install flake8 pip install mypy diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 60a9333c..b6df6cae 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -15,4 +15,4 @@ sphinx: python: install: - - requirements: requirements-rtd.txt + - requirements: docs/requirements.txt diff --git a/requirements-rtd.txt b/docs/requirements.txt similarity index 100% rename from requirements-rtd.txt rename to docs/requirements.txt diff --git a/noxfile.py b/noxfile.py index 435f414c..0e6a1e28 100644 --- a/noxfile.py +++ b/noxfile.py @@ -16,10 +16,10 @@ import shutil import nox -_PY_VERSIONS = ('2.7', '3.7', '3.8', '3.9', '3.10', '3.11', 'pypy3') +_PY_VERSIONS = ('3.7', '3.8', '3.9', '3.10', '3.11', 'pypy3') _PY_DEFAULT_VERSION = '3.11' -nox.options.sessions = ['test-2.7', 'test-{}'.format(_PY_DEFAULT_VERSION), 'test-pypy3'] +nox.options.sessions = ['test-{}'.format(_PY_DEFAULT_VERSION), 'test-pypy3'] @nox.session(python=_PY_VERSIONS) @@ -27,7 +27,7 @@ def test(session): """\ Run test suite. """ - session.install('-Ur', 'requirements-testing.txt') + session.install('-Ur', 'tests/requirements.txt') session.install('.') session.run('py.test') @@ -37,7 +37,7 @@ def docs(session): """\ Build the documentation. """ - session.install('-Ur', 'requirements-rtd.txt') + session.install('-Ur', 'docs/requirements.txt') output_dir = os.path.abspath(os.path.join(session.create_tmp(), 'output')) shutil.rmtree(output_dir, ignore_errors=True) doctrees, html, man = map(partial(os.path.join, output_dir), ['doctrees', 'html', 'man']) diff --git a/requirements-testing.txt b/requirements-testing.txt deleted file mode 100644 index 2b3aea5a..00000000 --- a/requirements-testing.txt +++ /dev/null @@ -1,6 +0,0 @@ -# Requirements to run the tests -pytest~=4.6; python_version == '2.7' -pytest~=6.0; python_version > '2.7' -pytest-cov; python_version > '2.7' -pypng~=0.0.20 -pyzbar~=0.1.8 diff --git a/tests/requirements.txt b/tests/requirements.txt new file mode 100644 index 00000000..d8080169 --- /dev/null +++ b/tests/requirements.txt @@ -0,0 +1,5 @@ +# Requirements to run the tests +pytest +pytest-cov +pypng~=0.0.20 +pyzbar~=0.1.8