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

Out of date requirements (unused optional deps ?) #3237

Closed
neutrinoceros opened this issue Apr 30, 2021 · 3 comments
Closed

Out of date requirements (unused optional deps ?) #3237

neutrinoceros opened this issue Apr 30, 2021 · 3 comments
Assignees
Labels
infrastructure Related to CI, versioning, websites, organizational issues, etc

Comments

@neutrinoceros
Copy link
Member

neutrinoceros commented 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 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 ?)
@neutrinoceros neutrinoceros added the infrastructure Related to CI, versioning, websites, organizational issues, etc label Apr 30, 2021
@neutrinoceros neutrinoceros self-assigned this Apr 30, 2021
@jzuhone
Copy link
Contributor

jzuhone commented Apr 30, 2021

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.

@neutrinoceros
Copy link
Member Author

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 neutrinoceros changed the title On demand imports: missing packages Out of date requirements (unused optional deps ?) Apr 30, 2021
@neutrinoceros
Copy link
Member Author

Not sure it's worth keeping this open now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Related to CI, versioning, websites, organizational issues, etc
Projects
None yet
2 participants