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

BUG: Line list to not crash when no data is loaded #1690

Closed
wants to merge 1 commit into from

Conversation

pllim
Copy link
Contributor

@pllim pllim commented Sep 30, 2022

Description

This pull request is to fix #1669.

I did not test various possible line list workflows but I did confirm the added test was failing before and not fail anymore with this patch.

Change log entry

  • Is a change log needed? If yes, is it added to CHANGES.rst? If you want to avoid merge conflicts,
    list the proposed change log here for review and add to CHANGES.rst before merge. If no, maintainer
    should add a no-changelog-entry-needed label.

Checklist for package maintainer(s)

This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.

  • Are two approvals required? Branch protection rule does not check for the second approval. If a second approval is not necessary, please apply the trivial label.
  • Do the proposed changes actually accomplish desired goals? Also manually run the affected example notebooks, if necessary.
  • Do the proposed changes follow the STScI Style Guides?
  • Are tests added/updated as required? If so, do they follow the STScI Style Guides?
  • Are docs added/updated as required? If so, do they follow the STScI Style Guides?
  • Did the CI pass? If not, are the failures related?
  • Is a milestone set?
  • After merge, any internal documentations need updating (e.g., JIRA, Innerspace)?

when no data is loaded yet.
@pllim pllim added the bug Something isn't working label Sep 30, 2022
@pllim pllim added this to the 2.11 milestone Sep 30, 2022
@pllim pllim added the specviz label Sep 30, 2022
Copy link
Member

@kecnry kecnry left a comment

Choose a reason for hiding this comment

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

The plugin no longer crashes when loading the list, but this just seems to kick the can down the road a bit...

  • loading and plotting a line will not show (maybe this makes sense). But then loading a spectrum still does not show the line and the user has to toggle it off and back on again.
  • the custom line section relies on the data spectral units to set the default units, so that is now defaulting to dimensionless, which crashes when trying to add a custom line.

The alternative would be to disable the entire plugin until data is loaded.

@codecov
Copy link

codecov bot commented Sep 30, 2022

Codecov Report

Base: 87.16% // Head: 87.16% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (20048bf) compared to base (970a915).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1690   +/-   ##
=======================================
  Coverage   87.16%   87.16%           
=======================================
  Files          95       95           
  Lines        9907     9911    +4     
=======================================
+ Hits         8635     8639    +4     
  Misses       1272     1272           
Impacted Files Coverage Δ
...z/configs/default/plugins/line_lists/line_lists.py 74.56% <100.00%> (+0.22%) ⬆️

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.

@pllim
Copy link
Contributor Author

pllim commented Sep 30, 2022

Ooops, ok. Let me open another PR with your other idea. Thanks!

@pllim
Copy link
Contributor Author

pllim commented Sep 30, 2022

See #1691 for an alternative. Thanks!

@pllim pllim closed this in #1691 Oct 5, 2022
@pllim pllim deleted the linelist-no-data-no-cry branch October 5, 2022 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working specviz
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Specviz: Loading Line Lists without data results in Traceback
2 participants