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

Accept component.units=None in translators input #84

Merged
merged 1 commit into from
Jan 31, 2023

Conversation

dhomeier
Copy link
Contributor

@dhomeier dhomeier commented Jan 31, 2023

Description

To fix support for glue-viz/glue#2296.
Other uses of component.units in the translators (NDDataArray, StdDevUncertainty) already accept unit=None, so it seems most sensible to switch to the u.Quantity() format here.
Added glue to devdeps to test this (might be a good idea in general?)

@dhomeier dhomeier added the bug Something isn't working label Jan 31, 2023
@codecov
Copy link

codecov bot commented Jan 31, 2023

Codecov Report

Base: 97.12% // Head: 97.12% // No change to project coverage 👍

Coverage data is based on head (1c6c2d1) compared to base (5e9cd27).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #84   +/-   ##
=======================================
  Coverage   97.12%   97.12%           
=======================================
  Files          18       18           
  Lines        1324     1324           
=======================================
  Hits         1286     1286           
  Misses         38       38           
Impacted Files Coverage Δ
glue_astronomy/translators/nddata.py 92.55% <100.00%> (ø)
glue_astronomy/translators/spectral_cube.py 93.44% <100.00%> (ø)
glue_astronomy/translators/spectrum1d.py 94.66% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@astrofrog astrofrog 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, thanks!

@astrofrog
Copy link
Member

@dhomeier could you do a new release of glue-astronomy with this fix once merged?

@dhomeier
Copy link
Contributor Author

Yes; leave glue-core dev in the tests?

@astrofrog
Copy link
Member

Yep!

@dhomeier dhomeier merged commit 4f74ebd into glue-viz:main Jan 31, 2023
@dhomeier dhomeier deleted the translate-unit-none branch January 31, 2023 16:57
@dhomeier dhomeier mentioned this pull request Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants