diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 5f965fa2..9de9dbd0 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -76,10 +76,7 @@ jobs: python -m pip install --upgrade pip python -m pip install \ -e .[tests] \ - -r requirements-common.txt \ - -e file:dependencies/UsersHub-authentification-module#egg=pypnusershub \ - -e file:dependencies/Utils-Flask-SQLAlchemy#egg=utils-flask-sqlalchemy \ - -e file:dependencies/RefGeo#egg=pypn-ref-geo + -r requirements-dev.txt - name: Install database run: | flask db upgrade taxonomie@head -x local-srid=2154 diff --git a/requirements-common.in b/requirements-common.in new file mode 100644 index 00000000..12ceb75d --- /dev/null +++ b/requirements-common.in @@ -0,0 +1,10 @@ +Flask<2.0 +Flask-Cors +Flask-SQLAlchemy +Flask-Migrate +marshmallow-sqlalchemy +SQLAlchemy<1.4 +psycopg2 +python-dotenv +boto3 +pillow diff --git a/requirements-common.txt b/requirements-common.txt deleted file mode 100644 index 84c398b0..00000000 --- a/requirements-common.txt +++ /dev/null @@ -1,19 +0,0 @@ -boto3==1.17.110 -botocore==1.20.110 -click==6.6 -Flask-Cors==3.0.10 -Flask-SQLAlchemy==2.3.2 -Flask-Migrate==3.1.0 -Flask==1.1.1 -marshmallow-sqlalchemy==0.26.1 -gunicorn==20.0.4 -itsdangerous==0.24 -Jinja2==2.11.3 -MarkupSafe==0.23 -Pillow==9.0.1 -psycopg2==2.8.5 -python-dotenv -requests==2.26.0 -SQLAlchemy==1.3.19 -urllib3==1.26.6 -Werkzeug==1.0.0 diff --git a/requirements-dependencies.in b/requirements-dependencies.in new file mode 100644 index 00000000..b296868c --- /dev/null +++ b/requirements-dependencies.in @@ -0,0 +1,3 @@ +utils-flask-sqlalchemy>=0.2.6,<1.0 +pypnusershub>=1.5.10,<2.0 +pypn-ref-geo>=1.0.1,<2.0 diff --git a/requirements-dev.in b/requirements-dev.in new file mode 100644 index 00000000..b1931cd2 --- /dev/null +++ b/requirements-dev.in @@ -0,0 +1,6 @@ +-r requirements-common.in +-r requirements-submodules.in +flake8 +pytest +pytest-flask +schema diff --git a/requirements-dev.txt b/requirements-dev.txt index 0776e466..b2f8486e 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,8 +1,195 @@ --r requirements-common.txt --e dependencies/UsersHub-authentification-module --e dependencies/Utils-Flask-SQLAlchemy --e dependencies/RefGeo -flake8==3.7.9 -pytest==5.4.3 -pytest-flask==1.0.0 -schema==0.7.2 +# +# This file is autogenerated by pip-compile with python 3.9 +# To update, run: +# +# pip-compile requirements-dev.in +# +-e file:dependencies/RefGeo#egg=pypn-ref-geo + # via -r requirements-submodules.in +-e file:dependencies/UsersHub-authentification-module#egg=pypnusershub + # via -r requirements-submodules.in +-e file:dependencies/Utils-Flask-SQLAlchemy#egg=utils-flask-sqlalchemy + # via + # -r requirements-submodules.in + # pypn-ref-geo + # pypnusershub + # utils-flask-sqlalchemy-geo +alembic==1.8.1 + # via + # flask-migrate + # pypn-ref-geo + # pypnusershub +attrs==22.1.0 + # via + # fiona + # pytest +bcrypt==3.2.2 + # via pypnusershub +boto3==1.24.45 + # via -r requirements-common.in +botocore==1.27.45 + # via + # boto3 + # s3transfer +certifi==2022.6.15 + # via + # fiona + # requests +cffi==1.15.1 + # via bcrypt +charset-normalizer==2.1.0 + # via requests +click==7.1.2 + # via + # fiona + # flask +click-plugins==1.1.1 + # via fiona +cligj==0.7.2 + # via fiona +contextlib2==21.6.0 + # via schema +fiona==1.8.21 + # via utils-flask-sqlalchemy-geo +flake8==5.0.4 + # via -r requirements-dev.in +flask==1.1.4 + # via + # -r requirements-common.in + # flask-cors + # flask-marshmallow + # flask-migrate + # flask-sqlalchemy + # pypnusershub + # pytest-flask + # utils-flask-sqlalchemy +flask-cors==3.0.10 + # via -r requirements-common.in +flask-marshmallow==0.14.0 + # via pypnusershub +flask-migrate==3.1.0 + # via + # -r requirements-common.in + # utils-flask-sqlalchemy +flask-sqlalchemy==2.5.1 + # via + # -r requirements-common.in + # flask-migrate + # pypn-ref-geo + # pypnusershub + # utils-flask-sqlalchemy +geoalchemy2==0.11.1 + # via utils-flask-sqlalchemy-geo +geog==0.0.2 + # via utils-flask-sqlalchemy-geo +geojson==2.5.0 + # via utils-flask-sqlalchemy-geo +idna==3.3 + # via requests +iniconfig==1.1.1 + # via pytest +itsdangerous==1.1.0 + # via flask +jinja2==2.11.3 + # via flask +jmespath==1.0.1 + # via + # boto3 + # botocore +mako==1.2.1 + # via alembic +markupsafe==2.0.1 + # via + # jinja2 + # mako + # pypnusershub +marshmallow==3.17.0 + # via + # flask-marshmallow + # marshmallow-sqlalchemy + # utils-flask-sqlalchemy +marshmallow-sqlalchemy==0.28.1 + # via + # -r requirements-common.in + # pypnusershub +mccabe==0.7.0 + # via flake8 +munch==2.5.0 + # via fiona +numpy==1.23.1 + # via geog +packaging==21.3 + # via + # geoalchemy2 + # marshmallow + # marshmallow-sqlalchemy + # pytest +pillow==9.2.0 + # via -r requirements-common.in +pluggy==1.0.0 + # via pytest +psycopg2==2.9.3 + # via + # -r requirements-common.in + # pypnusershub +py==1.11.0 + # via pytest +pycodestyle==2.9.1 + # via flake8 +pycparser==2.21 + # via cffi +pyflakes==2.5.0 + # via flake8 +pyparsing==3.0.9 + # via packaging +pytest==7.1.2 + # via + # -r requirements-dev.in + # pytest-flask +pytest-flask==1.2.0 + # via -r requirements-dev.in +python-dateutil==2.8.2 + # via + # botocore + # utils-flask-sqlalchemy +python-dotenv==0.20.0 + # via -r requirements-common.in +requests==2.28.1 + # via pypnusershub +s3transfer==0.6.0 + # via boto3 +schema==0.7.5 + # via -r requirements-dev.in +shapely==1.8.2 + # via utils-flask-sqlalchemy-geo +six==1.16.0 + # via + # fiona + # flask-cors + # flask-marshmallow + # python-dateutil +sqlalchemy==1.3.24 + # via + # -r requirements-common.in + # alembic + # flask-sqlalchemy + # geoalchemy2 + # marshmallow-sqlalchemy + # pypn-ref-geo + # pypnusershub + # utils-flask-sqlalchemy-geo +tomli==2.0.1 + # via pytest +urllib3==1.26.11 + # via + # botocore + # requests +utils-flask-sqlalchemy-geo==0.2.3 + # via pypn-ref-geo +werkzeug==1.0.1 + # via + # flask + # pytest-flask + +# The following packages are considered to be unsafe in a requirements file: +# setuptools diff --git a/requirements-submodules.in b/requirements-submodules.in new file mode 100644 index 00000000..53589d4e --- /dev/null +++ b/requirements-submodules.in @@ -0,0 +1,3 @@ +-e file:dependencies/Utils-Flask-SQLAlchemy#egg=utils-flask-sqlalchemy +-e file:dependencies/UsersHub-authentification-module#egg=pypnusershub +-e file:dependencies/RefGeo#egg=pypn-ref-geo diff --git a/requirements.in b/requirements.in index 70266723..57a641cf 100644 --- a/requirements.in +++ b/requirements.in @@ -1,10 +1,2 @@ -Flask -Flask-Cors -Flask-SQLAlchemy -Flask-Migrate -marshmallow-sqlalchemy -SQLAlchemy -psycopg2 -python-dotenv -utils-flask-sqlalchemy -boto3 +-r requirements-common.in +-r requirements-dependencies.in diff --git a/requirements.txt b/requirements.txt index f36d396d..cde98fb5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,161 @@ --r requirements-common.txt -https://github.com/PnX-SI/UsersHub-authentification-module/archive/1.5.7.tar.gz -https://github.com/PnX-SI/Utils-Flask-SQLAlchemy/archive/0.2.6.tar.gz -https://github.com/PnX-SI/RefGeo/archive/1.0.1.tar.gz +# +# This file is autogenerated by pip-compile with python 3.9 +# To update, run: +# +# pip-compile requirements.in +# +alembic==1.8.1 + # via + # flask-migrate + # pypn-ref-geo + # pypnusershub +attrs==22.1.0 + # via fiona +bcrypt==3.2.2 + # via pypnusershub +boto3==1.24.45 + # via -r requirements-common.in +botocore==1.27.45 + # via + # boto3 + # s3transfer +certifi==2022.6.15 + # via + # fiona + # requests +cffi==1.15.1 + # via bcrypt +charset-normalizer==2.1.0 + # via requests +click==7.1.2 + # via + # fiona + # flask +click-plugins==1.1.1 + # via fiona +cligj==0.7.2 + # via fiona +fiona==1.8.21 + # via utils-flask-sqlalchemy-geo +flask==1.1.4 + # via + # -r requirements-common.in + # flask-cors + # flask-marshmallow + # flask-migrate + # flask-sqlalchemy + # pypnusershub + # utils-flask-sqlalchemy +flask-cors==3.0.10 + # via -r requirements-common.in +flask-marshmallow==0.14.0 + # via pypnusershub +flask-migrate==3.1.0 + # via -r requirements-common.in +flask-sqlalchemy==2.5.1 + # via + # -r requirements-common.in + # flask-migrate + # pypn-ref-geo + # pypnusershub + # utils-flask-sqlalchemy +geoalchemy2==0.11.1 + # via utils-flask-sqlalchemy-geo +geog==0.0.2 + # via utils-flask-sqlalchemy-geo +geojson==2.5.0 + # via utils-flask-sqlalchemy-geo +idna==3.3 + # via requests +itsdangerous==1.1.0 + # via flask +jinja2==2.11.3 + # via flask +jmespath==1.0.1 + # via + # boto3 + # botocore +mako==1.2.1 + # via alembic +markupsafe==2.0.1 + # via + # jinja2 + # mako + # pypnusershub +marshmallow==3.17.0 + # via + # flask-marshmallow + # marshmallow-sqlalchemy + # utils-flask-sqlalchemy +marshmallow-sqlalchemy==0.28.1 + # via + # -r requirements-common.in + # pypnusershub +munch==2.5.0 + # via fiona +numpy==1.23.1 + # via geog +packaging==21.3 + # via + # geoalchemy2 + # marshmallow + # marshmallow-sqlalchemy +pillow==9.2.0 + # via -r requirements-common.in +psycopg2==2.9.3 + # via + # -r requirements-common.in + # pypnusershub +pycparser==2.21 + # via cffi +pyparsing==3.0.9 + # via packaging +pypn-ref-geo==1.1.0 + # via -r requirements-dependencies.in +pypnusershub==1.5.10 + # via -r requirements-dependencies.in +python-dateutil==2.8.2 + # via + # botocore + # utils-flask-sqlalchemy +python-dotenv==0.20.0 + # via -r requirements-common.in +requests==2.28.1 + # via pypnusershub +s3transfer==0.6.0 + # via boto3 +shapely==1.8.2 + # via utils-flask-sqlalchemy-geo +six==1.16.0 + # via + # fiona + # flask-cors + # flask-marshmallow + # python-dateutil +sqlalchemy==1.3.24 + # via + # -r requirements-common.in + # alembic + # flask-sqlalchemy + # geoalchemy2 + # marshmallow-sqlalchemy + # pypn-ref-geo + # pypnusershub + # utils-flask-sqlalchemy-geo +urllib3==1.26.11 + # via + # botocore + # requests +utils-flask-sqlalchemy==0.2.6 + # via + # -r requirements-dependencies.in + # pypn-ref-geo + # pypnusershub + # utils-flask-sqlalchemy-geo +utils-flask-sqlalchemy-geo==0.2.3 + # via pypn-ref-geo +werkzeug==1.0.1 + # via flask + +# The following packages are considered to be unsafe in a requirements file: +# setuptools diff --git a/setup.py b/setup.py index a5e1b649..273f3f18 100644 --- a/setup.py +++ b/setup.py @@ -7,8 +7,6 @@ version = f.read() with (root_dir / "README.rst").open() as f: long_description = f.read() -with (root_dir / "requirements.in").open() as f: - requirements = f.read().splitlines() setuptools.setup( @@ -22,7 +20,9 @@ version=version, packages=setuptools.find_packages(where=".", include=["apptax*"]), package_data={"apptax.migrations": ["data/*.sql"]}, - install_requires=requirements, + install_requires=( + list(open("requirements-common.in", "r")) + list(open("requirements-dependencies.in", "r")) + ), entry_points={ "alembic": [ "migrations = apptax.migrations:versions",