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

metadata: monkeypatch Undefined to show as empty string #108

Merged
merged 2 commits into from
Apr 19, 2024

Conversation

kecnry
Copy link
Member

@kecnry kecnry commented Apr 17, 2024

This PR closes #88 by monkeypatching the string representation of astropy.io.fits.card.Undefined to show an empty string in the metadata plugin instead of something like <astropy.io.fits.card.Undefined object at 0x29f5b94d0>

@kecnry kecnry requested a review from bmorris3 April 17, 2024 18:25
@kecnry kecnry marked this pull request as ready for review April 17, 2024 18:25
Copy link
Contributor

@bmorris3 bmorris3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For lcviz, and for now, this is fine. Let's fix this upstream in jdaviz though, so we don't have to rely on a monkeypatch on an astropy class.

@kecnry
Copy link
Member Author

kecnry commented Apr 19, 2024

I did first look into a jdaviz fix, but it would require probably introducing inefficiencies to this map line by adding if-statements to override this particular case. That may be worth it at some point though if there are other situations that need special treatment as well 🤔

@kecnry kecnry merged commit a4a822d into spacetelescope:main Apr 19, 2024
8 of 9 checks passed
@kecnry kecnry deleted the metadata-undefined branch April 19, 2024 15:38
kecnry added a commit that referenced this pull request Apr 19, 2024
* monkeypatch Undefined to show as empty string
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.

some metadata display as python pointer rather than value
2 participants