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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register plugin from entry points #1872

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

Ni-g-3l
Copy link

@Ni-g-3l Ni-g-3l commented Nov 11, 2024

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

@Ni-g-3l Ni-g-3l requested a review from a team as a code owner November 11, 2024 15:07
Signed-off-by: Nig3l <[email protected]>
@Ni-g-3l Ni-g-3l force-pushed the feat/register_plugin_from_entry_points branch from 8a16886 to da9e66c Compare November 11, 2024 15:08
Copy link

codecov bot commented Nov 17, 2024

Codecov Report

Attention: Patch coverage is 67.34694% with 16 lines in your changes missing coverage. Please review.

Project coverage is 59.38%. Comparing base (c039654) to head (a7fa195).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
src/rez/plugin_managers.py 67.34% 12 Missing and 4 partials ⚠️
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.
📢 Have feedback on the report? Share it here.

Copy link
Member

@JeanChristopheMorinPerso JeanChristopheMorinPerso left a 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).

src/rez/plugin_managers.py Outdated Show resolved Hide resolved
src/rez/plugin_managers.py Outdated Show resolved Hide resolved
src/rez/tests/test_plugin_manager.py Outdated Show resolved Hide resolved
src/rez/data/tests/extensions/baz/baz/__init__.py Outdated Show resolved Hide resolved
src/rez/plugin_managers.py Outdated Show resolved Hide resolved
@Ni-g-3l
Copy link
Author

Ni-g-3l commented Jan 25, 2025

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

@JeanChristopheMorinPerso
Copy link
Member

Thanks @Ni-g-3l . I left a comment to clarify what I mean about the tests.

@JeanChristopheMorinPerso JeanChristopheMorinPerso added this to the Next milestone Jan 26, 2025
@JeanChristopheMorinPerso JeanChristopheMorinPerso added the Blocked by DCO Waiting on commit signoff label Jan 26, 2025
@Ni-g-3l Ni-g-3l force-pushed the feat/register_plugin_from_entry_points branch from 21ee959 to e30e7cd Compare February 2, 2025 16:14
Signed-off-by: Jean-Christophe Morin <[email protected]>
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
Copy link
Author

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]>
@JeanChristopheMorinPerso JeanChristopheMorinPerso removed the Blocked by DCO Waiting on commit signoff label Feb 2, 2025
Signed-off-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Jean-Christophe Morin <[email protected]>
@JeanChristopheMorinPerso
Copy link
Member

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!

@Ni-g-3l
Copy link
Author

Ni-g-3l commented Feb 3, 2025

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

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.

Simplify plugin development by supporting entrypoint based plugins
2 participants