Switch our python package management solution to poetry.

Mainly because it has better support for installing the packages from
different python versions.

It also has better dependency resolver than Pipenv. And supports modern
standard for python dependency management. This includes usage of
pyproject.toml for project specific configuration instead of per
tool conf files. See following links for details:
 https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/
 https://www.python.org/dev/peps/pep-0518/
This commit is contained in:
Dmitry Rodionov
2022-01-19 13:16:51 +03:00
committed by Dmitry Rodionov
parent e209764877
commit 5f5a11525c
18 changed files with 2164 additions and 1160 deletions

View File

@@ -446,7 +446,7 @@ prerequisites:
self-contained example:
{app} run make
{app} run pipenv run pytest test_runner
{app} run poetry run pytest test_runner
{app} run cargo test
{app} report --open
"""

View File

@@ -14,7 +14,7 @@ mkdir -p data/$REPORT_TO
cp $REPORT_FROM/* data/$REPORT_TO
echo "Generating report"
pipenv run python $SCRIPT_DIR/generate_perf_report_page.py --input-dir data/$REPORT_TO --out reports/$REPORT_TO.html
poetry run python $SCRIPT_DIR/generate_perf_report_page.py --input-dir data/$REPORT_TO --out reports/$REPORT_TO.html
echo "Uploading perf result"
git add data reports
git \

7
scripts/pysync Executable file
View File

@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# This is a helper script for setting up/updating our python environment.
# It is intended to be a primary endpoint for all the people who want to
# just setup test environment without going into details of python package management
poetry install --no-root # this installs dev dependencies by default

9
scripts/pytest Executable file
View File

@@ -0,0 +1,9 @@
#!/usr/bin/env bash
# This is a helper script to run pytest without going too much
# into python dependency management details
# It may be desirable to create more sophisticated pytest launcher
# with commonly used options to simplify launching from e.g CI
poetry run pytest "${@:1}"