Skip to content

Conversation

@Ni-g-3l
Copy link
Contributor

@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
@codecov
Copy link

codecov bot commented Nov 17, 2024

Codecov Report

❌ Patch coverage is 68.51852% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.42%. Comparing base (2112930) to head (362de1a).
⚠️ Report is 22 commits behind head on main.

Files with missing lines Patch % Lines
src/rez/plugin_managers.py 68.51% 12 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1872      +/-   ##
==========================================
+ Coverage   59.33%   59.42%   +0.08%     
==========================================
  Files         126      126              
  Lines       17225    17258      +33     
  Branches     3017     3022       +5     
==========================================
+ Hits        10221    10256      +35     
+ Misses       6320     6317       -3     
- Partials      684      685       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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).

@Ni-g-3l
Copy link
Contributor 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
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
Copy link
Contributor 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.

@JeanChristopheMorinPerso JeanChristopheMorinPerso removed the Blocked by DCO Waiting on commit signoff label Feb 2, 2025
@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
Contributor 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

@JeanChristopheMorinPerso
Copy link
Member

@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.

@Ni-g-3l
Copy link
Contributor Author

Ni-g-3l commented Feb 15, 2025

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 !

@JeanChristopheMorinPerso
Copy link
Member

JeanChristopheMorinPerso commented Feb 15, 2025

@Ni-g-3l The command name and the name in rez -i will be the same with my changes, unless I made a mistake...

@Ni-g-3l
Copy link
Contributor Author

Ni-g-3l commented Feb 16, 2025

Oo sorry I missed one commit ! So it looks good to me.

@JeanChristopheMorinPerso
Copy link
Member

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?

@Ni-g-3l
Copy link
Contributor Author

Ni-g-3l commented Feb 16, 2025

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.

return CommandFoo
Install plugins

Choose a reason for hiding this comment

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

This section still needs some work. I didn't touch it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What are the sections that are need improvements ? Have you specific things in mind ?

@JeanChristopheMorinPerso
Copy link
Member

@Ni-g-3l I took a stab at updating the docs. There is still one section of the guide that I think should be changed a little bit. Feel free to push changes to continue improving the docs.

Nig3l and others added 16 commits May 15, 2025 12:12
Signed-off-by: Jean-Christophe Morin <[email protected]>
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]>
…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 Ni-g-3l closed this by deleting the head repository Jun 10, 2025
@JeanChristopheMorinPerso
Copy link
Member

@Ni-g-3l why did you close this PR?

@Ni-g-3l
Copy link
Contributor Author

Ni-g-3l commented Jun 10, 2025

OMG ! I fucked my local git... so I removed and reclone it, I forgot that it will closed all PR from the fork, I will recreate this one... with the same name, so if you push your local branch to it we should get the modification back.

@Ni-g-3l
Copy link
Contributor Author

Ni-g-3l commented Jun 10, 2025

I recreate it from backup here if you want : #1989

sorry for inconvenient...

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