From 36f4770400646c3e66fd15795ab85c0e38fa0ebc Mon Sep 17 00:00:00 2001 From: Remco Tukker <remco.tukker@geant.org> Date: Tue, 2 May 2023 21:50:57 +0200 Subject: [PATCH] cleanup python dependencies, pin their versions, enable mypy and eslint recommended warnings --- requirements.txt | 42 ++++++++++++++++++++---------------------- setup.py | 17 ++++++++--------- tox.ini | 3 +-- webapp/.eslintrc.json | 1 + 4 files changed, 30 insertions(+), 33 deletions(-) diff --git a/requirements.txt b/requirements.txt index f409d9fa..12ec2076 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,24 +1,22 @@ -alembic -click -jsonschema -flask -flask-cors -psycopg2-binary -cryptography -SQLAlchemy -openpyxl -pytest -pytest-mock -python-dotenv +alembic~=1.10 +click~=8.1 +jsonschema~=4.17 +flask~=2.2 +flask-cors~=3.0 +openpyxl~=3.1 +psycopg2-binary~=2.9 +SQLAlchemy~=2.0 -sphinx -sphinx-rtd-theme -sphinxcontrib-httpdomain -tox +pytest~=7.2 +pytest-mock~=3.10 +sphinx~=6.1 +sphinx-rtd-theme~=1.2 +sphinxcontrib-httpdomain~=1.8 +tox~=4.4 -mypy -types-docutils -types-jsonschema -types-Flask-Cors -types-openpyxl -types-setuptools +mypy~=1.2 +types-docutils~=0.19 +types-jsonschema~=4.17 +types-Flask-Cors~=3.0 +types-openpyxl~=3.1 +types-setuptools~=67.6 diff --git a/setup.py b/setup.py index 8d6685d4..fe20d960 100644 --- a/setup.py +++ b/setup.py @@ -10,15 +10,14 @@ setup( url='https://gitlab.geant.net/live-projects/compendium-v2', packages=find_packages(), install_requires=[ - 'jsonschema', - 'flask', - 'flask-cors', - 'SQLAlchemy', - 'alembic', - 'psycopg2-binary', - 'cryptography', - 'openpyxl', - 'click' + 'alembic~=1.10', + 'click~=8.1', + 'jsonschema~=4.17', + 'flask~=2.2', + 'flask-cors~=3.0', + 'openpyxl~=3.1', + 'psycopg2-binary~=2.9', + 'SQLAlchemy~=2.0', ], include_package_data=True, diff --git a/tox.ini b/tox.ini index 020e8315..69c39807 100644 --- a/tox.ini +++ b/tox.ini @@ -18,7 +18,6 @@ commands = coverage html coverage report --fail-under 80 flake8 - # Disable mypy in tox until build server supports python 3.9 - # mypy compendium_v2/**/*.py test/*.py + mypy compendium_v2/**/*.py test/*.py sphinx-build -M html docs/source docs/build diff --git a/webapp/.eslintrc.json b/webapp/.eslintrc.json index a650402f..5378a5f9 100644 --- a/webapp/.eslintrc.json +++ b/webapp/.eslintrc.json @@ -9,6 +9,7 @@ "react-hooks" ], "extends": [ + "eslint:recommended", "plugin:react/recommended", "plugin:@typescript-eslint/recommended" ], -- GitLab