-
Notifications
You must be signed in to change notification settings - Fork 77
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
Add LoaderConfig plugin to the Reference Viewer #1076
Conversation
If/when you have time, @pllim. |
Previously, the loader preference could only be set by using the |
@ejeschke , I probably won't have time till next week at the earliest. I also have not been using this feature much, so not sure how best to contribute here. |
No problem. Most users will not notice or need unless they have both |
1878a83
to
1d9c0d1
Compare
Hmm where did the ReadTheDocs check go? |
I think RTD isn't pick up the YAML file because now the default pattern they look for is |
Oh, I misunderstood the instruction. I think we actually have to rename the YAML file. (#1078) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the behavior for files not recognized by MIME, like ASDF?
Registered file openers are associated with file MIME types, and there can | ||
be several openers for a single MIME type. A priority associated | ||
with a MIME type/opener pairing determines which opener will be used | ||
for each type--the lowest priority value will determine which opener will |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems counter-intuitive to me. Generally speaking, I thought highest priority means it would come first?
It sounds like you are using ascending order number, which is kind of like reverse of the priority?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, it depends on how you interpret a priority number. There are systems for where a lower number has higher priority (e.g. Unix process priorities). And it does match the typical English usage, to wit: "my first priority is ...; my second priority is ...".
I think as long as the documentation is clear on this (see conspicuous note in plugin docstring) there should be no misunderstanding.
file in Ginga. This plugin can be used to set the opener preferences | ||
and save it to the user's $HOME/.ginga configuration area. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to give an example exactly what the filename should be in $HOME/.ginga
and some example content of that file.
1d9c0d1
to
695f159
Compare
695f159
to
4458491
Compare
There is a set of known types that will be recognized if they are failed to be identified by ASDF. The file extension ".asdf" is one of them. But we also have a special check for ASDF embedded in FITS (especially for STScI) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM in principle. FFTM. Thanks!
- documentation added and change log updated
efb798e
to
64a9266
Compare
Thanks, @pllim! |
The
LoaderConfig
plugin allows you to configure the file openers that can be used to load various content into Ginga.Registered file openers are associated with file MIME types, and there can be several openers for a single MIME type. A priority associated with a MIME type/opener pairing determines which opener will be used for each type--the lowest priority value will determine which opener will be used. If there are more than one opener with the same low priority then the user will be prompted for which opener to use, when opening a file in Ginga. This plugin can be used to set the opener preferences and save it to the user's $HOME/.ginga configuration area.
Documentation added and change log updated.