Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] move to PEP 621 compliant package manager for better extras #905

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

bolasim
Copy link
Collaborator

@bolasim bolasim commented Apr 17, 2024

馃殌 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 includes dependencies and optional-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 via pip install "truss[server]"

CONTRIBUTING.md Outdated Show resolved Hide resolved
# And finally precommit
poetry run pre-commit install
# Setup environment (includes python version and dependencies)
rye sync
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is pre-commit automatically installed by rye?

pyproject.toml Show resolved Hide resolved
bolasim and others added 3 commits April 17, 2024 16:12
Co-authored-by: Marius Killinger <155577904+marius-baseten@users.noreply.github.com>
* Bump to rc release & fix deps.

* Fix botocore.

* Bump pypi version.
@marius-baseten marius-baseten self-requested a review April 18, 2024 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants