-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to poetry for dependencies management #1219
Open
fabienheureux
wants to merge
17
commits into
main
Choose a base branch
from
switch-to-poetry-for-dependencies
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fabienheureux
force-pushed
the
switch-to-poetry-for-dependencies
branch
3 times, most recently
from
January 15, 2025 15:04
b2fd62f
to
62fbec4
Compare
fabienheureux
requested review from
kolok and
maxcorbeau
and removed request for
a team
January 15, 2025 15:21
kolok
approved these changes
Jan 15, 2025
fabienheureux
force-pushed
the
switch-to-poetry-for-dependencies
branch
2 times, most recently
from
January 16, 2025 14:20
83b32aa
to
d50bdc2
Compare
maxcorbeau
approved these changes
Jan 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK donc si je comprends bien:
CI
: on préfixe les commandes de build avec poetry (pour que poetry charge son environnement et éxecute ce qui suit)poetry.toml
: conf de base poetrypyproject.toml
: c'est maintenant là qu'on vient définir les différents requirements*requirements.in/txt
: tout ça dégage 🥳Dockerfile
: petites modifs pour intégrer poetry
J'ai manqué un truc important?
Peux-tu stp faire un résumé des commandes à utiliser au quotidien? (le workflow standard)
fabienheureux
commented
Jan 16, 2025
fabienheureux
commented
Jan 16, 2025
fabienheureux
force-pushed
the
switch-to-poetry-for-dependencies
branch
from
January 16, 2025 17:09
d3dc731
to
42b9fc4
Compare
…ncies Switch to poetry for dependencies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description succincte du problème résolu
https://www.notion.so/accelerateur-transition-ecologique-ademe/La-gestion-des-d-pendances-ne-semble-pas-optimale-1596523d57d7807a91b7d9eaa85ff139?pvs=4
Ça tourne sur https://dashboard.scalingo.com/apps/osc-fr1/quefairedemesobjets-preprod/deploy/baf37131-258f-4af8-a506-b1c023c58ac7
Utilisation de Poetry ✍️
Désormais toutes les installations de dépendance, gestion d'environnement virtuel, déploiements passent par poetry.
Intérêt (voir https://www.notion.so/accelerateur-transition-ecologique-ademe/Synchronisation-des-Techos-1756523d57d78090be2df64e55e29142?pvs=4#17c6523d57d780b8a399cab5b559beb0)
Dependabot 🤖
à tester sur le moyen / long terme, mais je crois que dependabot va uniquement mettre à jour le poetry.lock.
On est donc pas exemptés de mettre à jour les versions majeures manuellement dans le pyproject si on souhaite fixer une version spécifique.
CI 🏗️
Tout est fonctionnel et testé
Déploiements 🚀
Scalingo supporte les poetry.lock, j'ai testé un déploiement en staging et on est bon ! 🎉
Docker 🐳
J'en ai profité pour assainir les dockerfile :
awscli
On copie le contenu de chaque étape de build dans le runtime.
Les avantages
En local
Idéalement il faudrait que vous réinitialisiez votre environnement local pour qu'on soit sûr de l'absence d'effets de bords
TODO
Type de changement :
Auto-review
Les trucs à faire avant de demander une review :
.env.template