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

Astropy should be a required dependency #33

Closed
saimn opened this issue Jan 17, 2021 · 2 comments · Fixed by #34
Closed

Astropy should be a required dependency #33

saimn opened this issue Jan 17, 2021 · 2 comments · Fixed by #34

Comments

@saimn
Copy link
Contributor

saimn commented Jan 17, 2021

Ref https://github.com/astropy/pytest-astropy-header/pull/32/files#r526484941

astropy is currently an optional requirement but the plugin does nothing if astropy is not installed.
@astrofrog - Is it to avoid a cross dependency which would confuse pip ?

[options.extras_require]
test =
numpy
astropy>=4.0

@pllim
Copy link
Member

pllim commented Jan 19, 2021

Maybe we should just make this plugin work without astropy by copying over resolve_name. Seems convoluted to require astropy and then astropy testing requiring this also.

https://github.com/astropy/astropy/blob/40521bf9df0630b144cf9d9d7027dba1491c5aa8/astropy/utils/introspection.py#L20

@saimn
Copy link
Contributor Author

saimn commented Jan 19, 2021

Indeed. Actually, looking at the use of resolve_name, I think we could just use importlib.import_module instead.

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 a pull request may close this issue.

2 participants