-
Notifications
You must be signed in to change notification settings - Fork 8
Add support for rustfits fits backend. #177
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
Open
erykoff
wants to merge
16
commits into
main
Choose a base branch
from
rustfits
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
1927130
Add support for rustfits.
erykoff 0916cf4
Update tests to support rustfits.
erykoff 9b49fef
Add rustfits tests for PRs.
erykoff 69f5cc1
Update python versions.
erykoff 8cb0a52
Add rustfits to push tests.
erykoff 824652a
Check for rustfits exception on failure to read coverage map.
erykoff 9d262a8
Update readme for rustfits.
erykoff 732b7e1
Remove hack for rustfits now that it supports pathlib.
erykoff 6e8ec6d
Improve comment on missing coverage extension.
erykoff bf57865
Update fits shim to not require astropy.
erykoff 24509ca
Update pip requirements.
erykoff 28fdc5e
Update workflows.
erykoff 20df8e2
Fix astropy shim updates.
erykoff 228d526
Update shim test.
erykoff bb81f24
Update astropy fits usage (again).
erykoff ef105b4
Simplify rustfits image extension check.
erykoff File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
rustfitswill ignore protected fits header keys when you write to a header from an existingFITSHeaderusing theupdatemethod, but not when writing from adict, so it is correct to skip protected keys.rustfits provides
rustfits.is_protected_key(name)for the above, which could replace your check againstFITS_RESERVED.Note, if this metadata was itself created from a rustfits
FITSHeader, you can doheader.to_dict(skip_protected=True)to provide the clean dict.It probably makes sense to provide a method to clean a dict of protected keys so you don't need the loop.
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.
Because of the way that the tests do reading/writing, and there's no way to directly create a rustfits header in python, sometimes this code gets a rustfits header and sometimes a dict. But I will make use of the
is_protected_key().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.
Hmm. I don't want to loop over all keys ... just the protected ones. I just don't know how to do this without a bunch more special cases.
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.
There is no need to change what you are doing, I was just giving information, sorry to imply otherwise
Here is what rustfits does
https://github.com/esheldon/rustfits/blob/5c959d88ceaebefa3fd29cf4ee144adcd22e0757/src/header.rs#L440