-
Notifications
You must be signed in to change notification settings - Fork 279
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
ENH: automatically load external frontends in load() #4285
Conversation
2a23551
to
4894cfa
Compare
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 had no idea this was possible, but I love it, thank you !
0ac661e
to
5ae31ed
Compare
8f783fa
to
67823c1
Compare
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.
additional pointers. I haven't studied why the test is failing on Windows yet
67823c1
to
af4dbf6
Compare
How to fix windows is beyond me... Why answer tests fail (with blank differences) is also beyond me. I think I addressed everything else. |
Am I right to assume fixing #4286 will not resolve the problem here ?
This is just flakiness, do not worry about it: it's been like this for months now, and we have a solution in #4122 |
I pushed the change, let's see. |
Well played, looks like this now fixes #4286 , right ? |
You can push directly. |
cool. I'll do this in the next couple hours |
I will double check that it works as is for yt_idefix |
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.
It works perfectly with yt_idefix, thanks again for starting this !
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.
this is great!
I do think it will marginally increase the chance of having plugin loading conflicts. Since previously you had to explicitly import the plugin, you'd never end up with two external frontends identifying a file as valid. But now if a user happens to have installed two external entrypoint-enabled frontend plugins that both identify a file as valid they'll get an YTAmbiguousDataType
error. But the benefit here far outweighs the slim chance of encountering that IMO so I don't think it's worth worrying about, but I thought it was worth mentioning.
That's correct, although it's nice to think that this will not be a deadend situation even then thanks to |
bb013b7
Co-authored-by: Chris Havlin <chris.havlin@gmail.com>
bb013b7
to
af26c61
Compare
pre-commit.ci autofix |
marking this PR for backport but I'll only cherry pick b276292 |
PR Summary
This PR modifies the behavior of
yt.load
to auto-include subclasses ofDataset
from external, installed packages. External packages must define an entry point inyt.frontends
linked to the Dataset subclass (see docs for an example).PR Checklist