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 attribute handling for Jdaviz/Cubeviz parser #56

Merged
merged 1 commit into from
Dec 2, 2021

Conversation

pllim
Copy link
Contributor

@pllim pllim commented Nov 16, 2021

Description

This PR fixes regression in Cubeviz parser behavior introduced in spacetelescope/jdaviz#547 , particularly getting rid of the assumption that "uncertainty" is always available when "flux" is available, which is not always true.

Also refactor the internal logic a little.

Fixes spacetelescope/jdaviz#967

@codecov
Copy link

codecov bot commented Nov 16, 2021

Codecov Report

Merging #56 (6159fef) into main (5b8a32c) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 6159fef differs from pull request most recent head 4c1466a. Consider uploading reports for the commit 4c1466a to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##             main      #56   +/-   ##
=======================================
  Coverage   96.03%   96.03%           
=======================================
  Files          15       15           
  Lines        1136     1136           
=======================================
  Hits         1091     1091           
  Misses         45       45           
Impacted Files Coverage Δ
glue_astronomy/translators/spectrum1d.py 92.56% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5b8a32c...4c1466a. Read the comment docs.

@pllim

This comment has been minimized.

@pllim
Copy link
Contributor Author

pllim commented Nov 16, 2021

The code is too sensitive. There are Glue subtleties that I am not familiar with, so any small refactoring breaks stuff. I have undone the refactoring and just left in a minimal fix that would hopefully fix Cami's use cases.

@pllim
Copy link
Contributor Author

pllim commented Nov 16, 2021

py36 failure is unrelated. I don't think you can get Python 3.6 on Azure anymore but fixing that is out of scope.

Copy link
Contributor

@rosteen rosteen left a comment

Choose a reason for hiding this comment

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

Looks good to me now - the data that was failing to load loads, and all the Jdaviz tests pass locally on my machine.

@pllim
Copy link
Contributor Author

pllim commented Nov 17, 2021

@astrofrog or @eteq , any chance you can merge and do a release with this fix?

@pllim
Copy link
Contributor Author

pllim commented Nov 17, 2021

Thanks for the review, @rosteen !

@astrofrog astrofrog merged commit 25d7711 into glue-viz:main Dec 2, 2021
@pllim pllim deleted the fix-no-attr branch December 2, 2021 16:59
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.

Cannot open cube in Cubeviz after Spectrum1D refactor
3 participants