[RFC] move to PEP 621 compliant package manager for better extras #905
+441
−148
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.
🚀 What
The current way of managing dependencies is getting in our way of handling dependencies in a sane way. The poetry dependencies groups don't map to extras that are pip installable. The extras management in poetry is too hard to maintain (have to mark each dependency as optional, then enumerate each one in the extras list to be included in, which is too error prone).
PEP 621 solves with with a stand
[project]
metadata which includesdependencies
andoptional-dependencies
which automatically map to extras. Additionally,rye
manages the dev-dependencies for us which can be used for linting/test/etc.In our case, everything that will run in the CLI (chains and cli commends) needs to be included in
dependencies
. Everything not needed for the CLI but needed for other features (like the context-builder or server or cache-warmer) can be move into an extras group that we can pip to install easily viapip install "truss[server]"