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

deprecate conf-specific helper methods in specviz, specviz2d, cubeviz #3388

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

kecnry
Copy link
Member

@kecnry kecnry commented Jan 13, 2025

Description

This pull request deprecates config-specific helper methods in specviz, specviz2d, and cubeviz in preparation for deconfigging efforts.

Note that this intentionally defers deprecating:

  • load_trace (requires load_data support)
  • .specviz access (requires general parser logic)

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. Bugfix milestone also needs an accompanying backport label.
  • After merge, any internal documentations need updating (e.g., JIRA, Innerspace)?

@github-actions github-actions bot added documentation Explanation of code and concepts cubeviz specviz mosviz plugin Label for plugins common to multiple configurations specviz2d labels Jan 13, 2025
@kecnry kecnry added this to the 4.2 milestone Jan 13, 2025
@kecnry kecnry force-pushed the deconf-deprecate-helper-methods branch 5 times, most recently from f3902d6 to bf6e860 Compare January 14, 2025 19:46
Copy link

codecov bot commented Jan 14, 2025

Codecov Report

Attention: Patch coverage is 58.91473% with 53 lines in your changes missing coverage. Please review.

Project coverage is 87.53%. Comparing base (2084d96) to head (bf6e860).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...igs/default/plugins/model_fitting/model_fitting.py 61.62% 33 Missing ⚠️
jdaviz/core/helpers.py 25.00% 12 Missing ⚠️
jdaviz/configs/default/plugins/viewers.py 33.33% 4 Missing ⚠️
jdaviz/configs/specviz/helper.py 77.77% 2 Missing ⚠️
jdaviz/configs/cubeviz/helper.py 75.00% 1 Missing ⚠️
jdaviz/configs/imviz/helper.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3388      +/-   ##
==========================================
- Coverage   88.01%   87.53%   -0.49%     
==========================================
  Files         127      128       +1     
  Lines       19747    19884     +137     
==========================================
+ Hits        17381    17406      +25     
- Misses       2366     2478     +112     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kecnry kecnry marked this pull request as ready for review January 15, 2025 18:16
@@ -152,6 +154,7 @@ def load_data(self, spectrum_2d=None, spectrum_1d=None, spectrum_1d_label=None,
timeout=timeout
)

@deprecated(since="4.2")
Copy link
Contributor

Choose a reason for hiding this comment

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

No alternative?

Copy link
Member Author

@kecnry kecnry Jan 15, 2025

Choose a reason for hiding this comment

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

ah, I had meant to either move this logic or postpone it. I'll revisit if its feasible to move to the plugin here or better as a follow-up effort (in which case I'll remove the deprecation for now).

I'll move back to draft for now.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think ultimately this needs to be absorbed into the (future) general load_data, so I'll make a note on that ticket and hold off on deprecating until that's in place.

jdaviz/core/helpers.py Outdated Show resolved Hide resolved
@kecnry kecnry marked this pull request as draft January 15, 2025 20:37
CHANGES.rst Outdated Show resolved Hide resolved
jdaviz/core/helpers.py Outdated Show resolved Hide resolved
jdaviz/core/helpers.py Outdated Show resolved Hide resolved
@pllim
Copy link
Contributor

pllim commented Jan 16, 2025

Just a few nitpicks on wordings. If no more new deprecation you want to add, maybe it is ready to be taken back out of draft after a rebase to pick up CI fix.

@kecnry kecnry force-pushed the deconf-deprecate-helper-methods branch from 3f827e2 to d3d5033 Compare January 16, 2025 16:21
@kecnry kecnry marked this pull request as ready for review January 16, 2025 16:23
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. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cubeviz documentation Explanation of code and concepts mosviz plugin Label for plugins common to multiple configurations Ready for final review specviz specviz2d
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants