-
-
Notifications
You must be signed in to change notification settings - Fork 143
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
docs: added documentaion on how to define entry-points for ape plugin #2183
Conversation
…s when using pyproject.toml
```yml | ||
[...] | ||
# Make it work with cli like ape myplugin | ||
[project.entry-points.ape_cli_subcommands] |
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.
I needed to register the entry-point using [<project-name>.entry-points.ape_cli_subcommands]
in order for it to register properly.
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.
That's strange. I believe it has to be a property of the project. What env management tool are you using? Have you tried installing it using pip?
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.
I installed using pip install -e .
. It actually gave me an error when I tried using what you have.
ValueError: invalid pyproject.toml config: `project`.
configuration error: `project` must contain ['name'] properties
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.
Hmm that's odd
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.
Actually I think you need to define the project name like this
[project]
name = "ape-utils"
[...]
[project.entry-points.ape_cli_subcommands]
[...]
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.
We'll probably need to add a new documentation section for using only a pyproject.toml
for an ape project since it'll need more configuration than just this. Definitely something to keep in mind when we start development on this later @bitwise-constructs
Any update on this? |
I think we're going to hold off on merging this because setting up a plugin entry-point in the |
This pull request is considered stale because it has been open 30 days with no activity. Remove stale label, add a comment, or make a new commit, otherwise this PR will be closed in 5 days. |
This PR was closed because it has been inactive for 35 days. |
docs: added documentation on how to define entry-points for ape plugins when using
pyproject.toml
What I did
fixes: #2182
How I did it
How to verify it
Checklist