-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
poc: isolated project plugins & tools #5740
base: main
Are you sure you want to change the base?
Conversation
Looking forward to seeing how the Poetry plugin concept evolves! This PR makes a lot of sense, although the implementation details are pretty fancy. I made a comment on issue #5729 on how a blessed |
Would really love to have this, for now I'm using tox for this (ref) but it is quite hacky. |
I really like the idea of having plugins on a per-project basis specified in |
Is there any idea of further movement / next steps on this? |
Would absolutely love this feature! |
tl;dr: I split off the plugins part so that you can find a full blown implementation for project plugins in #9547. Long story: I took a closer look at this and I think there are some not so small TODOs to bring this over the finish line:
I think we should split this in two parts: project plugins on the one side and tools on the other for the following reasons:
|
@radoering is there any indication when the new |
See #9448, it should be only a matter of weeks. |
@radoering thanks for running with it btw 💜 and I agree with your assessment, the PoC was done around 2 years ago - a lot has also changed under the hood that makes more sense to split the objectives. I will close this once we have something on the tools front. |
This is a proof of concept for discussions and feedback only.
Project Level Plugins
Demo: https://asciinema.org/a/bFC2lNUV8K8IJurJz0RbJEJ1s
Rationale
In a lot of case, a project might require a plugin that is otherwise not required anywhere else for a user. This can in theory be defined within the
pyproject.toml
as opposed to being manual instructions for the user.Project Tools
Demo: https://asciinema.org/a/uIKtlMM8nv8f1ECLRJCUzQUsC
Rationale
Projects usually require additional tools like
pre-commit
andtox
. Today, these tools are part of the project's dependency graph. While this is useful for cases likepytest
, it is not so much the case fortox
and/orpre-commit
that are used as cli tools and not used within the project code.Implementation Details
In this poc, when
poetry install
is run, we.poetry
directory if eithertools
orplugins
are defined..poetry/plugins
) to which plugin wheels will be installed (without polluting the project venv or the global system site)tools/<name>
virtual environment with only the tool and any additional dependencies specified..poetry/config.toml
to store hashes, sytem python version and poetry version to detect changes.Example Configuration
In this poc we use
overlay
section to avoid validation errors.This can use used as follows.
Limitations
pip install
to demonstrate capability. This can be replaced with Poetry's internals.