-
Notifications
You must be signed in to change notification settings - Fork 339
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
Register plugin from entry points #1872
base: main
Are you sure you want to change the base?
Register plugin from entry points #1872
Conversation
Signed-off-by: Nig3l <[email protected]>
Signed-off-by: Nig3l <[email protected]>
Signed-off-by: Nig3l <[email protected]>
8a16886
to
da9e66c
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1872 +/- ##
==========================================
+ Coverage 59.27% 59.38% +0.10%
==========================================
Files 126 126
Lines 17217 17246 +29
Branches 3017 3020 +3
==========================================
+ Hits 10206 10241 +35
+ Misses 6326 6320 -6
Partials 685 685 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Nig3l <[email protected]>
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.
Thanks @Ni-g-3l for creating this PR. I left a couple of comments that will need to be addressed before we can consider merging it.
Also, if you have the time and want to, we should adjust our newly written plugins doc (https://rez.readthedocs.io/en/stable/plugins.html).
Signed-off-by: Nig3l <[email protected]>
Hello ! I fixed a big part of your comments, but I still not understand how you want resolve the plugin install with pip in tests |
Thanks @Ni-g-3l . I left a comment to clarify what I mean about the tests. |
Signed-off-by: Nig3l <[email protected]>
Signed-off-by: Nig3l <[email protected]>
Signed-off-by: Nig3l <[email protected]>
21ee959
to
e30e7cd
Compare
…structure. Signed-off-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Jean-Christophe Morin <[email protected]>
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] |
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.
If you prefer this format of build system, we should update plugins doc by replacing setup.py part by a pyproject.toml.
Signed-off-by: Jean-Christophe Morin <[email protected]>
…t py 3.7) and add missing dependencies (zipp, typing_extensions) Signed-off-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Jean-Christophe Morin <[email protected]>
Ok, sorry for the noise @Ni-g-3l. There are a couple of things I wanted which were easier to do myself than do the back and forth in a PR. I also removed and re-added the vendored dependen.cies (and added the missing ones) and made sure they are compatible with python 3.7+. I think the last thing will be to review the docs you wrote. I'll try to do that soon. Thanks! |
Don't worry ! Happy to help ! I take a look at your commits and understand it ! I will do it the same way next time :) Yes ! I will update doc according to your commits |
Signed-off-by: Nig3l <[email protected]>
…istered for every type Signed-off-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Jean-Christophe Morin <[email protected]>
@Ni-g-3l After testing this PR more, I came to the conclusion that it wasn't working as expected. I pushed new commits to correct this. There is now one entry point group per plugin type and plugin name is set to the entry point name instead of the module name. |
Signed-off-by: Jean-Christophe Morin <[email protected]>
Wouldn't it be strange if the command name in the python file won't match with the command name displayed with rez -i ? Moreover, won't it break the compatibility between plugins installed manually and ones installed with entry points ? Thanks for testing the PR do not hesitate if I can help you to do something ! |
@Ni-g-3l The command name and the name in |
Oo sorry I missed one commit ! So it looks good to me. |
FYI, I'm close to approving your PR and merging it. The last remaining thing I think is the docs. You already edited them (thanks for that) but I'd like to improve them a little bit more. More particularly, I would like them to describe the 3 different methods of installing plugins (using the namespace package, REZ_PLUGINS_PATH and now the entry points. Each method should have its section describing how they work. The plugins page could be kept as a technical reference and we could move the "how to" into the user guide section. What do you think? |
I think it's a good Idea ! But we have to care to keep a link between the old plugin page to the new one. |
Hello
As suggest here I implemented the support of entrypoints in order to make the process of adding plugin to REZ easier.
Closes #1661
Feel free to add feedback !
Have a great day