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

Replace load_spectrum with load_data #2273

Merged
merged 5 commits into from
Jul 3, 2023

Conversation

duytnguyendtn
Copy link
Collaborator

@duytnguyendtn duytnguyendtn commented Jun 29, 2023

Description

This pull request brings specviz in line with the other viz tools by deprecating specviz.load_data and replacing it with specviz.load_data. I think I got all the documentation changes as well here. Should be pretty uncontroversial, as we've been asking for this for a long time

The decreased coverage is due to the deprecated method

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? Set this to bugfix milestone if this is a bug fix and needs to be released ASAP; otherwise, set this to the next major release milestone.
  • After merge, any internal documentations need updating (e.g., JIRA, Innerspace)?

@codecov
Copy link

codecov bot commented Jun 29, 2023

Codecov Report

Patch coverage: 98.18% and project coverage change: -0.03 ⚠️

Comparison is base (b6feaa6) 91.34% compared to head (a569123) 91.32%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2273      +/-   ##
==========================================
- Coverage   91.34%   91.32%   -0.03%     
==========================================
  Files         150      150              
  Lines       16848    16849       +1     
==========================================
- Hits        15390    15387       -3     
- Misses       1458     1462       +4     
Impacted Files Coverage Δ
jdaviz/configs/specviz/helper.py 77.16% <75.00%> (-0.26%) ⬇️
...efault/plugins/line_lists/tests/test_line_lists.py 100.00% <100.00%> (ø)
...default/plugins/model_fitting/tests/test_plugin.py 99.52% <100.00%> (ø)
.../plugins/subset_plugin/tests/test_subset_plugin.py 100.00% <100.00%> (ø)
.../plugins/line_analysis/tests/test_line_analysis.py 99.62% <100.00%> (ø)
...ecviz/plugins/line_analysis/tests/test_lineflux.py 100.00% <100.00%> (ø)
...gins/unit_conversion/tests/test_unit_conversion.py 96.92% <100.00%> (ø)
jdaviz/configs/specviz/tests/test_helper.py 100.00% <100.00%> (ø)
jdaviz/core/data_formats.py 78.37% <100.00%> (+0.50%) ⬆️

... and 1 file with indirect coverage changes

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

@duytnguyendtn duytnguyendtn marked this pull request as ready for review June 29, 2023 17:07
@pllim pllim added this to the 3.6 milestone Jun 29, 2023
@pllim pllim added the api API change label Jun 29, 2023
Copy link
Contributor

@pllim pllim left a comment

Choose a reason for hiding this comment

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

devdeps failure is unrelated. LGTM but I will refrain from approving until we have that change log because I don't want this to get accidentally merged without one. Thanks!

jdaviz/configs/specviz/helper.py Outdated Show resolved Hide resolved
def load_spectrum(self, data, data_label=None, format=None, show_in_viewer=True,
concat_by_file=False):
"""
Loads a data file or `~specutils.Spectrum1D` object into Specviz.

Parameters
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't it a little too late the improve load_spectrum doc now? 😆 Doesn't hurt though...

jdaviz/configs/specviz/helper.py Outdated Show resolved Hide resolved
duytnguyendtn and others added 3 commits July 3, 2023 10:12
Co-authored-by: P. L. Lim <2090236+pllim@users.noreply.github.com>
CHANGES.rst Outdated Show resolved Hide resolved
Copy link
Contributor

@pllim pllim left a comment

Choose a reason for hiding this comment

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

LGTM now. Thanks!

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.

Finally!!!! Thanks!

@duytnguyendtn
Copy link
Collaborator Author

Thanks for the reviews! Merging

@duytnguyendtn duytnguyendtn merged commit b365d80 into spacetelescope:main Jul 3, 2023
17 of 18 checks passed
@duytnguyendtn duytnguyendtn deleted the specload branch July 3, 2023 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants