You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
while working on #3236 I noticed that we still have a couple of optional deps that are not using the common mechanism from on_demand_imports.py (this point is resolved in the first comments)
pyaml
firefly_api
gluviz (imports as glue)
mpi4py
xarray
Also, some of our optional deps are out of date, in the sense that they do not seem to be used anymore:
fastcache
pyqt5 (I suspect this is meant to support Matplotlib GUI)
pykdtree (weird case, it looks like we define this internally but it's still part of CI reqs ?)
The text was updated successfully, but these errors were encountered:
It's not clear if putting all of these into on_demand_imports is necessary. That functionality was developed mainly to avoid unnecessary ImportErrors for packages that need to get imported in a lot of places (or maybe even at the top level). If an import of an optional package is done within one or two functions we should probably just handle the ImportErrorwith a more descriptive error message.
Good point. From my perspective, I tend to see on_demand_imports as documentation because it contains a lot of information on what deps are considered optional, but I tend to forget that the name is actually a little misleading since those imports are not really performed "on demand" but rather... at import (yt) time, only with a fallback mechanism.
I would like that all of our optional deps be uniformly specified and accessed, which is the initial motivation for opening this issue, but a more important step would be to revise the "on demand import" mechanism itself, which I've attempted and failed at already.
You're right that it's not necessary to add them there, and currently it's probably not a even a good idea.
I'll rename the issue to put the focus on the remain points: unused deps (?)
neutrinoceros
changed the title
On demand imports: missing packages
Out of date requirements (unused optional deps ?)
Apr 30, 2021
Bug report
Bug summary
while working on #3236 I noticed that we still have a couple of optional deps that are not using the common mechanism from(this point is resolved in the first comments)on_demand_imports.py
Also, some of our optional deps are out of date, in the sense that they do not seem to be used anymore:
The text was updated successfully, but these errors were encountered: