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

Make scipy and asdf optional dependencies? #369

Open
Cadair opened this issue Jun 24, 2021 · 5 comments
Open

Make scipy and asdf optional dependencies? #369

Cadair opened this issue Jun 24, 2021 · 5 comments

Comments

@Cadair
Copy link
Collaborator

Cadair commented Jun 24, 2021

I don't know what others thoughts on this are, but scipy is only used in numerical_inverse as is a pretty large package to pull in if you aren't ever planning on using numerical_inverse.

On asdf, afaik you aren't ever going to want to use the asdf related functionality of gwcs unless you already have asdf installed? i.e. if you are opening or saving an asdf file with the asdf API which includes a gwcs component, so the asdf dependency for gwcs could be made into a test only requirement?

If there are no strong objections to this I will open a PR?

@jdavies-st
Copy link
Contributor

jdavies-st commented Jul 1, 2021

Well, scipy is 32MB, and it's only dependency is numpy, which is already a requirement. If it brought in dozens of other packages, I might see the point, but given it gives important functionality, I don't see the big issue with it as a hard dependency.

I don't think asdf should be a test-only requirement, as runtime code needs it. But we could do add it as an extras package, i.e.

pip install gwcs[asdf]

But again, what is the motivation for this? It and all its dependencies are very small, with footprints in the KB range, except for numpy, which is not a new dependency.

What's the motivation? What real issue would making the installation more cumbersome for users solve?

@Cadair
Copy link
Collaborator Author

Cadair commented Jul 1, 2021

Well scipy is easy until you are on a platform which lacks a working fortran toolchain and there aren't binaries for. It's hardly critical to the use of gWCS for most people?

There is runtime code which uses asdf, but only to provide a plugin for asdf which will never be directly called by the user, so an asdf extra seems sensibe to me (which is what sunpy does).

@Cadair
Copy link
Collaborator Author

Cadair commented Jul 1, 2021

What's the motivation?

It's far from the end of the world, but I noticed that now ndcube is depending on gwcs that it was pulling in some stuff I didn't know why gwcs was requiring, so thought it might be worth shuffling about?

@nden
Copy link
Collaborator

nden commented Jul 15, 2021

I think it makes sense to have scipy as an optional dependency and let applications require it if needed.
Would this go under [options.extras_require]?

@jdavies-st
Copy link
Contributor

Would it make sense to have an [all] extras and put scipy there?

For asdf, gwcs provides an extension which is useless without asdf already installed, and it also uses asdf for testing. So I do agree it could be moved to being a test dependency, if that's possible.

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

No branches or pull requests

3 participants