You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To replace Poetry with uv in the spinta repository, you'll need to update the following files:
1. pyproject.toml and lock files
Poetry uses pyproject.toml to manage dependencies in custom format. UV uses that same file as well but in sandart format.
There is one project wich will allow that conversion - https://pypi.org/project/migrate-to-uv/, which automates migration process - just run uvx migrate-to-uv
And it will:
Convert Poetry dependencies to uv dependencies
Migrated the lock file
Deletes old files like: rm poetry.lock rm poetry.toml
Creates uv.lock
2. Requirements.txt
requirements.txt is not created by default with UV, we need to freeze when for requirements.txt: uv pip freeze > requirements.txt
And install when later needed with: uv pip sync requirements.txt requirements.txt won't be updated once you add a package through UV
3. README.md and Notes flles where Poetry is mentioned
If installation instructions/information mention Poetry, replace them with UV. Also, mention a case from step 2 where needed.
4. Docker
Dockerfile does not use poetry and is fully really on requirements.txt and can be supported by implementing step 2.
5. Deployment processes (scripts attached below)
During the deployment poetry is used - spinta is installed inside the server as a Python package - https://pypi.org/project/spinta/. So poetry removal should not break the deployment process as long as pyproject.toml is updated correctly
Definition of Done (steps to confirm):
No poetry is installed, poetry is no longer used anywhere inside the codebase
Tests do pass on freshly created Python environment (imitate new developer onboarding with a new setup)
Test & Prod environments are still "deployable" and have no issues when releasing changes.
Gera mintis, tik reikėtu atlikti analize ir migracijos planą, peržiūrinti, kaip dabar atliekami diegimai į prod/test ir dev aplinkas, atnaujinti readme ir notes failus.
Siūlyčiau tai daryti, kaip #1049 užduoties dalį, atskirai Katalogui ir Agentui. Kadangi automatinį diegimą į laikinas testavimo aplinkas, reikės replikuoti ir nuolatinei testavimo ir prod aplinkoms.
Reikia daugiau analizės su paaiškinimu, koks bus migracijos planas, kaip dabartinis Poetry turės būti konvertuotas į uv.
Migrate from "poetry" to "uv" (https://pypi.org/project/uv/, https://docs.astral.sh/uv/)
Migration plan:
To replace Poetry with uv in the spinta repository, you'll need to update the following files:
1.
pyproject.toml
and lock filesPoetry uses pyproject.toml to manage dependencies in custom format. UV uses that same file as well but in sandart format.
There is one project wich will allow that conversion - https://pypi.org/project/migrate-to-uv/, which automates migration process - just run
uvx migrate-to-uv
And it will:
Convert Poetry dependencies to uv dependencies
Migrated the lock file
Deletes old files like:
rm poetry.lock
rm poetry.toml
Creates
uv.lock
2. Requirements.txt
requirements.txt is not created by default with UV, we need to freeze when for requirements.txt:
uv pip freeze > requirements.txt
And install when later needed with:
uv pip sync requirements.txt
requirements.txt
won't be updated once you add a package through UV3.
README.md
and Notes flles where Poetry is mentionedIf installation instructions/information mention Poetry, replace them with UV. Also, mention a case from step 2 where needed.
4. Docker
Dockerfile does not use poetry and is fully really on requirements.txt and can be supported by implementing step 2.
5. Deployment processes (scripts attached below)
During the deployment poetry is used - spinta is installed inside the server as a Python package - https://pypi.org/project/spinta/. So poetry removal should not break the deployment process as long as
pyproject.toml
is updated correctlyDefinition of Done (steps to confirm):
Related
The text was updated successfully, but these errors were encountered: