Closed szmktk closed 2 weeks ago
Very nice feature for one of the next update. If We will need this good poetry :). I am open to discuss that topic.
@miniMax18 what is there to discuss? In JavaScript you have package.json
file with dependencies
and devDependencies
to tell actual runtime project dependencies from test/development ones. On top of that you have a package-lock.json
(or yarn.lock
or whaetver) that ensures every developer gets the same version of every dependency (including transitive dependencies).
These are (among many others) the problems that poetry aims to solve. Problems we did not yet face, but probably will and I'm convinced it's silly not to prevent them easily now. If we're going to have a stable CI/CD pipeline for this project that I insist on having poetry
in.
@szmktk this some like "procedure" We need to know what we use(or will use). Thanks for that quality explain from JS world :). Nevertheless I know poetry tool from fast api product. I recommend @szmktk idea 👍 to adapt poetry in Zeton 💯
@szmktk this some like "procedure" We need to know what we use(or will use).
@miniMax18 Here's a breakdown of the most common poetry commands:
Install and add a dependency and its sub-dependencies to the pyproject.toml
file in the current directory:
poetry add dependency
Install the project dependencies using the pyproject.toml
file in the current directory:
poetry install
Get the latest version of all dependencies and update poetry.lock
:
poetry update
Execute a command inside the project's virtual environment:
poetry run command
Spawn a shell within the project's virtual environment:
poetry shell
So when you would like to add a new library just use poetry add new_library
instead of editing requirements.txt
file. This command will edit both pyproject.toml
and poetry.lock
files for you. :wink:
add info in readme.md
Done :ok_hand:
This merge request adds support for poetry package management tool.
Using Poetry over
requirements.txt
offers several advantages:poetry.lock
file for reproducible environments.pyproject.toml
file.I validated the backend app manually after building a new docker image.
Steps to test this locally:
add-poetry
branchmake build
command to build a new Docker image that contains dependencies managed bypoetry