diff --git a/requirements-tox.txt b/requirements-tox.txt new file mode 100644 index 0000000..0491ec7 --- /dev/null +++ b/requirements-tox.txt @@ -0,0 +1,5 @@ +coverage==4.5.4 +mock==3.0.5 +pytest-cov==2.8.1 +pytest-pythonpath==0.7.3 +six>=1.9 diff --git a/requirements.txt b/requirements.txt index f9ab379..4470c7c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,13 @@ -# This file is here because many Platforms as a Service look for -# requirements.txt in the root directory of a project. --r requirements/dev-py3.txt +-r requirements-tox.txt + +Faker +flake8==3.9.2 +isort==5.10.1 +parmap +pgcopy +psycopg2 +pytest==6.2.5 +pyyaml +Sphinx==7.2.6 +sphinx-rtd-theme==2.0.0 +tqdm diff --git a/requirements/Makefile b/requirements/Makefile deleted file mode 100644 index de6c20e..0000000 --- a/requirements/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -REQUIREMENTS_SOURCES := $(wildcard *.in) -REQUIREMENTS := $(REQUIREMENTS_SOURCES:.in=.txt) -PIP_INDEX_URL ?= https://pypi.python.org/simple - -all: $(REQUIREMENTS) - -dev-py2.txt: tox-py2.txt -dev-py3.txt: tox-py3.txt - -%.txt: %.in - pip-compile \ - --verbose \ - --rebuild \ - --index-url=$(PIP_INDEX_URL) \ - --output-file=$@ $< - sed -i -e 's|^--|#--|' $@ - -check: - @which pip-compile > /dev/null - -clean: check - rm -f *.txt - -.PHONY: all check clean diff --git a/requirements/dev-py2.in b/requirements/dev-py2.in deleted file mode 100644 index 774290f..0000000 --- a/requirements/dev-py2.in +++ /dev/null @@ -1,8 +0,0 @@ --r tox-py2.in - -click<8 # Version 8 drops Python 2.7 support -flake8==3.9.2 -isort==4.3.21 -pip-tools<6 -pgcopy>=1.5.0 -psycopg2==2.8.6 diff --git a/requirements/dev-py2.txt b/requirements/dev-py2.txt deleted file mode 100644 index 18c48f7..0000000 --- a/requirements/dev-py2.txt +++ /dev/null @@ -1,88 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.11 -# by the following command: -# -# pip-compile --index-url=https://pypi.python.org/simple --output-file=dev-py2.txt dev-py2.in -# -#--index-url https://pypi.python.org/simple - -atomicwrites==1.4.1 - # via pytest -attrs==21.4.0 - # via - # -r tox-py2.in - # pytest -click==7.1.2 - # via - # -r dev-py2.in - # pip-tools -coverage==4.5.1 - # via - # -r tox-py2.in - # pytest-cov -faker==3.0.1 - # via -r tox-py2.in -flake8==3.9.2 - # via -r dev-py2.in -isort==4.3.21 - # via -r dev-py2.in -mccabe==0.6.1 - # via flake8 -mock==3.0.5 - # via -r tox-py2.in -more-itertools==5.0.0 - # via - # -r tox-py2.in - # pytest -parmap==1.5.2 - # via -r tox-py2.in -pgcopy==1.5.0 - # via - # -r dev-py2.in - # -r tox-py2.in -pip-tools==5.5.0 - # via -r dev-py2.in -pluggy==0.13.1 - # via pytest -psycopg2==2.8.6 - # via - # -r dev-py2.in - # -r tox-py2.in - # pgcopy -py==1.11.0 - # via pytest -pycodestyle==2.7.0 - # via flake8 -pyflakes==2.3.1 - # via flake8 -pytest==3.10.1 - # via - # -r tox-py2.in - # pytest-cov - # pytest-pythonpath -pytest-cov==2.8.1 - # via -r tox-py2.in -pytest-pythonpath==0.7.3 - # via -r tox-py2.in -python-dateutil==2.9.0.post0 - # via faker -pytz==2024.1 - # via pgcopy -pyyaml==5.3.1 - # via -r tox-py2.in -six==1.12.0 - # via - # -r tox-py2.in - # faker - # mock - # more-itertools - # pytest - # python-dateutil -text-unidecode==1.3 - # via faker -tqdm==4.64.1 - # via -r tox-py2.in - -# The following packages are considered to be unsafe in a requirements file: -# pip -# setuptools diff --git a/requirements/dev-py3.in b/requirements/dev-py3.in deleted file mode 100644 index 2ec1ed0..0000000 --- a/requirements/dev-py3.in +++ /dev/null @@ -1,10 +0,0 @@ --r tox-py3.in - -flake8 -isort -pgcopy -pytest -myst-parser -Sphinx -sphinx-rtd-theme -tqdm diff --git a/requirements/dev-py3.txt b/requirements/dev-py3.txt deleted file mode 100644 index 90a893f..0000000 --- a/requirements/dev-py3.txt +++ /dev/null @@ -1,138 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.11 -# by the following command: -# -# pip-compile --index-url=https://pypi.python.org/simple --output-file=dev-py3.txt dev-py3.in -# -#--index-url https://pypi.python.org/simple - -alabaster==0.7.16 - # via sphinx -attrs==21.1.0 - # via pytest -babel==2.14.0 - # via sphinx -certifi==2024.2.2 - # via requests -charset-normalizer==3.3.2 - # via requests -coverage[toml]==7.4.3 - # via - # -r tox-py3.in - # pytest-cov -docutils==0.20.1 - # via - # myst-parser - # sphinx - # sphinx-rtd-theme -faker==24.2.0 - # via -r tox-py3.in -flake8==7.0.0 - # via -r dev-py3.in -idna==3.6 - # via requests -imagesize==1.4.1 - # via sphinx -iniconfig==2.0.0 - # via pytest -isort==5.13.2 - # via -r dev-py3.in -jinja2==3.1.3 - # via - # myst-parser - # sphinx -markdown-it-py==3.0.0 - # via - # mdit-py-plugins - # myst-parser -markupsafe==2.1.5 - # via jinja2 -mccabe==0.7.0 - # via flake8 -mdit-py-plugins==0.4.0 - # via myst-parser -mdurl==0.1.2 - # via markdown-it-py -mock==5.1.0 - # via -r tox-py3.in -myst-parser==2.0.0 - # via -r dev-py3.in -packaging==24.0 - # via - # pytest - # sphinx -parmap==1.7.0 - # via -r tox-py3.in -pgcopy==1.5.0 - # via - # -r dev-py3.in - # -r tox-py3.in -pluggy==1.4.0 - # via pytest -psycopg2==2.9.9 - # via - # -r tox-py3.in - # pgcopy -py==1.11.0 - # via pytest -pycodestyle==2.11.1 - # via flake8 -pyflakes==3.2.0 - # via flake8 -pygments==2.17.2 - # via sphinx -pytest==6.2.5 - # via - # -r dev-py3.in - # pytest-cov - # pytest-pythonpath -pytest-cov==4.1.0 - # via -r tox-py3.in -pytest-pythonpath==0.7.4 - # via -r tox-py3.in -python-dateutil==2.9.0.post0 - # via faker -pytz==2024.1 - # via pgcopy -pyyaml==6.0.1 - # via - # -r tox-py3.in - # myst-parser -requests==2.31.0 - # via sphinx -six==1.16.0 - # via - # -r tox-py3.in - # python-dateutil -snowballstemmer==2.2.0 - # via sphinx -sphinx==7.2.6 - # via - # -r dev-py3.in - # myst-parser - # sphinx-rtd-theme - # sphinxcontrib-jquery -sphinx-rtd-theme==2.0.0 - # via -r dev-py3.in -sphinxcontrib-applehelp==1.0.8 - # via sphinx -sphinxcontrib-devhelp==1.0.6 - # via sphinx -sphinxcontrib-htmlhelp==2.0.5 - # via sphinx -sphinxcontrib-jquery==4.1 - # via sphinx-rtd-theme -sphinxcontrib-jsmath==1.0.1 - # via sphinx -sphinxcontrib-qthelp==1.0.7 - # via sphinx -sphinxcontrib-serializinghtml==1.1.10 - # via sphinx -toml==0.10.2 - # via pytest -tqdm==4.66.2 - # via - # -r dev-py3.in - # -r tox-py3.in -urllib3==2.2.1 - # via requests diff --git a/requirements/tox-py2.in b/requirements/tox-py2.in deleted file mode 100644 index ddd3d48..0000000 --- a/requirements/tox-py2.in +++ /dev/null @@ -1,14 +0,0 @@ -attrs<22.1.0 # Version 22.1.0 drops Python 2.7 support -coverage==4.5.1 -Faker==3.0.1 -mock==3.0.5 -more-itertools==5.0.0 # Version 5 is the last one to support Python 2.7 -parmap==1.5.2 -pgcopy -psycopg2==2.8.6 -pytest<4 -pytest-cov==2.8.1 -pytest-pythonpath==0.7.3 -pyyaml==5.3.1 # Version 5 is the last one to support Python 2.7 (and 5.4.1 cannot be built using Python 3) -six==1.12.0 -tqdm==4.64.1 diff --git a/requirements/tox-py2.txt b/requirements/tox-py2.txt deleted file mode 100644 index 2655246..0000000 --- a/requirements/tox-py2.txt +++ /dev/null @@ -1,68 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.11 -# by the following command: -# -# pip-compile --index-url=https://pypi.python.org/simple --output-file=tox-py2.txt tox-py2.in -# -#--index-url https://pypi.python.org/simple - -atomicwrites==1.4.1 - # via pytest -attrs==21.4.0 - # via - # -r tox-py2.in - # pytest -coverage==4.5.1 - # via - # -r tox-py2.in - # pytest-cov -faker==3.0.1 - # via -r tox-py2.in -mock==3.0.5 - # via -r tox-py2.in -more-itertools==5.0.0 - # via - # -r tox-py2.in - # pytest -parmap==1.5.2 - # via -r tox-py2.in -pgcopy==1.5.0 - # via -r tox-py2.in -pluggy==0.13.1 - # via pytest -psycopg2==2.8.6 - # via - # -r tox-py2.in - # pgcopy -py==1.11.0 - # via pytest -pytest==3.10.1 - # via - # -r tox-py2.in - # pytest-cov - # pytest-pythonpath -pytest-cov==2.8.1 - # via -r tox-py2.in -pytest-pythonpath==0.7.3 - # via -r tox-py2.in -python-dateutil==2.9.0.post0 - # via faker -pytz==2024.1 - # via pgcopy -pyyaml==5.3.1 - # via -r tox-py2.in -six==1.12.0 - # via - # -r tox-py2.in - # faker - # mock - # more-itertools - # pytest - # python-dateutil -text-unidecode==1.3 - # via faker -tqdm==4.64.1 - # via -r tox-py2.in - -# The following packages are considered to be unsafe in a requirements file: -# setuptools diff --git a/requirements/tox-py3.in b/requirements/tox-py3.in deleted file mode 100644 index 8283136..0000000 --- a/requirements/tox-py3.in +++ /dev/null @@ -1,11 +0,0 @@ -coverage -Faker -mock -parmap -pgcopy -psycopg2 -pytest-cov -pytest-pythonpath -pyyaml -six==1.16.0 -tqdm diff --git a/requirements/tox-py3.txt b/requirements/tox-py3.txt deleted file mode 100644 index 52a8372..0000000 --- a/requirements/tox-py3.txt +++ /dev/null @@ -1,56 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.11 -# by the following command: -# -# pip-compile --index-url=https://pypi.python.org/simple --output-file=tox-py3.txt tox-py3.in -# -#--index-url https://pypi.python.org/simple - -attrs==21.1.0 - # via pytest -coverage[toml]==7.4.3 - # via - # -r tox-py3.in - # pytest-cov -faker==24.2.0 - # via -r tox-py3.in -iniconfig==2.0.0 - # via pytest -mock==5.1.0 - # via -r tox-py3.in -packaging==24.0 - # via pytest -parmap==1.7.0 - # via -r tox-py3.in -pgcopy==1.5.0 - # via -r tox-py3.in -pluggy==1.4.0 - # via pytest -psycopg2==2.9.9 - # via - # -r tox-py3.in - # pgcopy -py==1.11.0 - # via pytest -pytest==6.2.5 - # via - # pytest-cov - # pytest-pythonpath -pytest-cov==4.1.0 - # via -r tox-py3.in -pytest-pythonpath==0.7.4 - # via -r tox-py3.in -python-dateutil==2.9.0.post0 - # via faker -pytz==2024.1 - # via pgcopy -pyyaml==6.0.1 - # via -r tox-py3.in -six==1.16.0 - # via - # -r tox-py3.in - # python-dateutil -toml==0.10.2 - # via pytest -tqdm==4.66.2 - # via -r tox-py3.in diff --git a/tox.ini b/tox.ini index 01f7b0e..b5f5cca 100644 --- a/tox.ini +++ b/tox.ini @@ -10,8 +10,17 @@ commands = flake8 {toxinidir}/pganonymize {toxinidir}/tests setenv = PYTHONPATH = {toxinidir} deps = - py27: -r{toxinidir}/requirements/tox-py2.txt + # Python 2.7 + py27: attrs<19.2 + py27: faker<4 + py27: more-itertools<8.11 + py27: parmap==1.5.2 + py27: psycopg2-binary==2.8.4 + py27: pyyaml<6 # Common requirements - py{34,35,36,37,38,39,310,311,312}: -r{toxinidir}/requirements/tox-py3.txt + -r{toxinidir}/requirements-tox.txt commands = py.test --basetemp={envtmpdir} {posargs} +passenv = + TOXENV + GITHUB_*