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

Fix bug in creation of default identifiers for data loaders #447

Merged
merged 7 commits into from
Feb 19, 2019

Conversation

drdavella
Copy link
Contributor

Prior to this PR, if no identifier or list of compatible extensions was provided to the data_loader decorator, then an invalid identifier would be created. This fixes that bug and also adds more informative output for these cases.

It's worth noting that specviz now expects all loaders to have identifiers. So if a user creates a custom loader that has neither an explicit identifier nor a list of compatible extensions, it will not be possible to load the associated files using specviz.

We may want to consider adding an optional argument to data_loader that automatically creates a dummy identifier that positively identifies all files.

Thanks @nluetzge for providing the original bug report.

@nmearl
Copy link
Contributor

nmearl commented Feb 14, 2019

I believe this should also solve spacetelescope/specviz#672.

specutils/io/registers.py Outdated Show resolved Hide resolved
@nmearl nmearl merged commit 558899e into astropy:master Feb 19, 2019
@drdavella drdavella deleted the fix-default-loader branch February 19, 2019 18:10
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 this pull request may close these issues.

None yet

2 participants