From 1dd721abcc93bfb8d42ad8769f96e718bc211be1 Mon Sep 17 00:00:00 2001 From: Serhii Korchynskyi Date: Mon, 5 Dec 2022 09:24:34 +0100 Subject: [PATCH] Align python requirments and make pip install as vscode user (#7) * Align python requirments and make pip install as vscode user * Update versions * Update NOTICE-3RD... * Intermediate test for requirements handling * Intermediate test for requirements handling2 * correct requirements links * Update NOTICE-3RD-PARTY-CONTENT.md Fix license requirements --- Dockerfiles/Python/Dockerfile | 16 +- .../Python/requirements/requirements-dev.txt | 148 ------------------ .../requirements/requirements-links.txt | 2 - .../Python/requirements/requirements-test.txt | 72 --------- .../Python/requirements/requirements.txt | 52 ------ NOTICE-3RD-PARTY-CONTENT.md | 81 ---------- 6 files changed, 11 insertions(+), 360 deletions(-) delete mode 100644 Dockerfiles/Python/requirements/requirements-dev.txt delete mode 100644 Dockerfiles/Python/requirements/requirements-links.txt delete mode 100644 Dockerfiles/Python/requirements/requirements-test.txt delete mode 100644 Dockerfiles/Python/requirements/requirements.txt diff --git a/Dockerfiles/Python/Dockerfile b/Dockerfiles/Python/Dockerfile index 50bb062..769648a 100644 --- a/Dockerfiles/Python/Dockerfile +++ b/Dockerfiles/Python/Dockerfile @@ -31,7 +31,6 @@ RUN UID="4000" bash /tmp/scripts/install-common.sh ADD https://raw.githubusercontent.com/devcontainers/features/main/src/docker-in-docker/install.sh /tmp/scripts/install-dind.sh RUN VERSION="latest" bash /tmp/scripts/install-dind.sh -COPY ./requirements/ /requirements/ COPY ./scripts/ /scripts/ WORKDIR /scripts @@ -40,11 +39,18 @@ RUN ./install-dapr-cli.sh RUN ./install-k3d-prerequisites.sh USER 4000 RUN ./install-k3d-tooling.sh -USER root -WORKDIR /requirements +# Fetch requirements into requirements folder +ADD --chown=4000 https://raw.githubusercontent.com/eclipse-velocitas/vehicle-app-python-template/main/requirements-dev.txt /requirements/ +ADD --chown=4000 https://raw.githubusercontent.com/eclipse-velocitas/vehicle-app-python-template/main/app/requirements-links.txt /requirements/ +ADD --chown=4000 https://raw.githubusercontent.com/eclipse-velocitas/vehicle-app-python-template/main/app/requirements-app.txt /requirements/ +ADD --chown=4000 https://raw.githubusercontent.com/eclipse-velocitas/vehicle-app-python-template/main/app/tests/requirements-tests.txt /requirements/ +WORKDIR /requirements +# Always install requirements under vscode user to avoid issue with installation of packages RUN pip3 install -r requirements-dev.txt RUN pip3 install -r requirements-links.txt -RUN pip3 install -r requirements.txt -RUN pip3 install -r requirements-test.txt \ No newline at end of file +RUN pip3 install -r requirements-app.txt +RUN pip3 install -r requirements-tests.txt +# Keep root as last user +USER root diff --git a/Dockerfiles/Python/requirements/requirements-dev.txt b/Dockerfiles/Python/requirements/requirements-dev.txt deleted file mode 100644 index ade9179..0000000 --- a/Dockerfiles/Python/requirements/requirements-dev.txt +++ /dev/null @@ -1,148 +0,0 @@ -# -# This file is autogenerated by pip-compile with python 3.10 -# To update, run: -# -# pip-compile requirements-dev.in -# -astroid==2.12.11 - # via pylint -bandit==1.7.4 - # via -r requirements-dev.in -black==22.10.0 - # via -r requirements-dev.in -build==0.8.0 - # via pip-tools -cfgv==3.3.1 - # via pre-commit -click==8.1.3 - # via - # -c app/tests/requirements.txt - # black - # pip-tools -dill==0.3.5.1 - # via pylint -distlib==0.3.6 - # via - # -c app/tests/requirements.txt - # virtualenv -filelock==3.8.0 - # via - # -c app/tests/requirements.txt - # virtualenv -flake8==5.0.4 - # via -r requirements-dev.in -gitdb==4.0.9 - # via gitpython -gitpython==3.1.29 - # via bandit -grpc-stubs==1.24.11 - # via -r requirements-dev.in -grpcio==1.49.1 - # via - # -c app/requirements.txt - # grpc-stubs - # grpcio-tools -grpcio-tools==1.48.2 - # via -r requirements-dev.in -identify==2.5.6 - # via pre-commit -isort==5.10.1 - # via pylint -lazy-object-proxy==1.7.1 - # via astroid -mccabe==0.7.0 - # via - # flake8 - # pylint -mypy==0.982 - # via -r requirements-dev.in -mypy-extensions==0.4.3 - # via - # black - # mypy -mypy-protobuf==3.3.0 - # via -r requirements-dev.in -nodeenv==1.7.0 - # via pre-commit -packaging==21.3 - # via - # -c app/requirements.txt - # -c app/tests/requirements.txt - # build -pathspec==0.10.1 - # via black -pbr==5.10.0 - # via stevedore -pep517==0.13.0 - # via build -pip-tools==6.9.0 - # via -r requirements-dev.in -platformdirs==2.5.2 - # via - # -c app/tests/requirements.txt - # black - # pylint - # virtualenv -pre-commit==2.20.0 - # via -r requirements-dev.in -protobuf==3.20.1 - # via - # -c app/requirements.txt - # grpcio-tools - # mypy-protobuf -pycodestyle==2.9.1 - # via flake8 -pydocstyle==6.1.1 - # via -r requirements-dev.in -pyflakes==2.5.0 - # via flake8 -pylint==2.15.4 - # via -r requirements-dev.in -pyparsing==3.0.9 - # via - # -c app/requirements.txt - # -c app/tests/requirements.txt - # packaging -pyyaml==6.0 - # via - # bandit - # pre-commit -six==1.16.0 - # via - # -c app/requirements.txt - # -c app/tests/requirements.txt - # grpcio -smmap==5.0.0 - # via gitdb -snowballstemmer==2.2.0 - # via pydocstyle -stevedore==4.0.0 - # via bandit -toml==0.10.2 - # via pre-commit -tomli==2.0.1 - # via - # -c app/tests/requirements.txt - # black - # build - # mypy - # pep517 - # pylint -tomlkit==0.11.5 - # via pylint -types-protobuf==3.20.4 - # via mypy-protobuf -typing-extensions==4.4.0 - # via mypy -virtualenv==20.16.5 - # via - # -c app/tests/requirements.txt - # pre-commit -wheel==0.37.1 - # via pip-tools -wrapt==1.14.1 - # via astroid - -# The following packages are considered to be unsafe in a requirements file: -# pip -# setuptools diff --git a/Dockerfiles/Python/requirements/requirements-links.txt b/Dockerfiles/Python/requirements/requirements-links.txt deleted file mode 100644 index 47e5936..0000000 --- a/Dockerfiles/Python/requirements/requirements-links.txt +++ /dev/null @@ -1,2 +0,0 @@ -git+https://github.com/eclipse-velocitas/vehicle-app-python-sdk.git@v0.4.0 -git+https://github.com/eclipse-velocitas/vehicle-model-python.git@v0.3.0 diff --git a/Dockerfiles/Python/requirements/requirements-test.txt b/Dockerfiles/Python/requirements/requirements-test.txt deleted file mode 100644 index 27b4355..0000000 --- a/Dockerfiles/Python/requirements/requirements-test.txt +++ /dev/null @@ -1,72 +0,0 @@ -# -# This file is autogenerated by pip-compile with python 3.10 -# To update, run: -# -# pip-compile app/tests/requirements.in -# -attrs==22.1.0 - # via pytest -click==8.1.3 - # via coveragepy-lcov -coverage[toml]==6.5.0 - # via - # coverage2clover - # coveragepy-lcov - # pytest-cov -coverage2clover==3.3.0 - # via -r app/tests/requirements.in -coveragepy-lcov==0.1.2 - # via -r app/tests/requirements.in -distlib==0.3.6 - # via virtualenv -filelock==3.8.0 - # via - # tox - # virtualenv -iniconfig==1.1.1 - # via pytest -packaging==21.3 - # via - # pytest - # tox -platformdirs==2.5.2 - # via virtualenv -pluggy==1.0.0 - # via - # pytest - # tox -py==1.11.0 - # via - # pytest - # tox -pygments==2.13.0 - # via pygount -pygount==1.2.4 - # via coverage2clover -pyparsing==3.0.9 - # via packaging -pytest==7.1.3 - # via - # -r app/tests/requirements.in - # pytest-asyncio - # pytest-cov - # pytest-ordering -pytest-asyncio==0.19.0 - # via -r app/tests/requirements.in -pytest-cov==4.0.0 - # via -r app/tests/requirements.in -pytest-ordering==0.6 - # via -r app/tests/requirements.in -six==1.16.0 - # via tox -tomli==2.0.1 - # via - # coverage - # pytest - # tox -tox==3.26.0 - # via -r app/tests/requirements.in -types-mock==4.0.15 - # via -r app/tests/requirements.in -virtualenv==20.16.5 - # via tox diff --git a/Dockerfiles/Python/requirements/requirements.txt b/Dockerfiles/Python/requirements/requirements.txt deleted file mode 100644 index 17cc217..0000000 --- a/Dockerfiles/Python/requirements/requirements.txt +++ /dev/null @@ -1,52 +0,0 @@ -# -# This file is autogenerated by pip-compile with python 3.10 -# To update, run: -# -# pip-compile app/requirements.in -# -aiohttp==3.8.3 - # via dapr -aiosignal==1.2.0 - # via aiohttp -async-timeout==4.0.2 - # via aiohttp -attrs==22.1.0 - # via aiohttp -charset-normalizer==2.1.1 - # via aiohttp -cloudevents==1.6.1 - # via -r app/requirements.in -dapr==1.7.0 - # via -r app/requirements.in -deprecation==2.1.0 - # via cloudevents -frozenlist==1.3.1 - # via - # aiohttp - # aiosignal -grpcio==1.49.1 - # via - # -r app/requirements.in - # dapr -idna==3.4 - # via yarl -multidict==6.0.2 - # via - # aiohttp - # yarl -packaging==21.3 - # via deprecation -protobuf==3.20.1 - # via - # -r app/requirements.in - # dapr -pyparsing==3.0.9 - # via packaging -python-dateutil==2.8.2 - # via dapr -six==1.16.0 - # via - # grpcio - # python-dateutil -yarl==1.8.1 - # via aiohttp diff --git a/NOTICE-3RD-PARTY-CONTENT.md b/NOTICE-3RD-PARTY-CONTENT.md index 315b26b..bdcb883 100644 --- a/NOTICE-3RD-PARTY-CONTENT.md +++ b/NOTICE-3RD-PARTY-CONTENT.md @@ -1,86 +1,5 @@ # Licenses Notice *Note*: This file is auto-generated. Do not modify it manually. -## Python -| Dependency | Version | License | -|:-----------|:-------:|--------:| -|aiohttp|3.8.3|Apache 2.0| -|aiosignal|1.2.0|Apache 2.0| -|astroid|2.12.11|GNU Lesser General Public License v2 (LGPLv2)| -|async-timeout|4.0.2|Apache 2.0| -|attrs|22.1.0|MIT| -|bandit|1.7.4|Apache 2.0| -|black|22.10.0|MIT| -|build|0.8.0|MIT| -|cfgv|3.3.1|MIT| -|charset-normalizer|2.1.1|MIT| -|click|8.1.3|New BSD| -|cloudevents|1.6.1|Apache 2.0| -|coverage|6.5.0|Apache 2.0| -|coverage2clover|3.3.0|THE BEERWARE LICENSE| -|coveragepy-lcov|0.1.2|Apache 2.0| -|dapr|1.7.0|Apache 2.0| -|deprecation|2.1.0|Apache 2.0| -|dill|0.3.5.1|New BSD| -|distlib|0.3.6|Python Software Foundation License| -|filelock|3.8.0|Public Domain| -|flake8|5.0.4|MIT| -|frozenlist|1.3.1|Apache 2.0| -|gitdb|4.0.9|BSD| -|GitPython|3.1.29|BSD| -|grpc-stubs|1.24.11|MIT| -|grpcio|1.49.1|Apache 2.0| -|grpcio-tools|1.48.2|Apache 2.0| -|identify|2.5.6|MIT| -|idna|3.4|BSD| -|iniconfig|1.1.1|MIT| -|isort|5.10.1|MIT| -|lazy-object-proxy|1.7.1|Simplified BSD| -|mccabe|0.7.0|MIT| -|multidict|6.0.2|Apache 2.0| -|mypy|0.982|MIT| -|mypy-extensions|0.4.3|MIT| -|mypy-protobuf|3.3.0|Apache 2.0| -|nodeenv|1.7.0|BSD| -|packaging|21.3|Apache 2.0
Simplified BSD| -|pathspec|0.10.1|Mozilla Public License 2.0 (MPL 2.0)| -|pbr|5.10.0|Apache 2.0| -|pep517|0.13.0|MIT| -|pip|22.0.4|MIT| -|pip-tools|6.9.0|BSD| -|platformdirs|2.5.2|MIT| -|pluggy|1.0.0|MIT| -|pre-commit|2.20.0|MIT| -|protobuf|3.20.1|Google License| -|py|1.11.0|MIT| -|pycodestyle|2.9.1|MIT| -|pydocstyle|6.1.1|MIT| -|pyflakes|2.5.0|MIT| -|Pygments|2.13.0|BSD| -|pygount|1.2.4|BSD| -|pylint|2.15.4|GNU General Public License v2 (GPLv2)| -|pyparsing|3.0.9|MIT| -|pytest|7.1.3|MIT| -|pytest-asyncio|0.19.0|Apache 2.0| -|pytest-cov|4.0.0|MIT| -|pytest-ordering|0.6|MIT| -|python-dateutil|2.8.2|Apache 2.0
BSD| -|PyYAML|6.0|MIT| -|setuptools|58.1.0|MIT| -|six|1.16.0|MIT| -|smmap|5.0.0|BSD| -|snowballstemmer|2.2.0|New BSD| -|stevedore|4.0.0|Apache 2.0| -|toml|0.10.2|MIT| -|tomli|2.0.1|MIT| -|tomlkit|0.11.5|MIT| -|tox|3.26.0|MIT| -|types-mock|4.0.15|Apache 2.0| -|types-protobuf|3.20.4|Apache 2.0| -|typing-extensions|4.4.0|Python Software Foundation License| -|virtualenv|20.16.5|MIT| -|wheel|0.37.1|MIT| -|wrapt|1.14.1|BSD| -|yarl|1.8.1|Apache 2.0| ## Workflows | Dependency | Version | License | |:-----------|:-------:|--------:|