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

Rename Subset Tools Plugin #3293

Merged
merged 21 commits into from
Nov 18, 2024

Conversation

haticekaratay
Copy link
Contributor

@haticekaratay haticekaratay commented Nov 15, 2024

Description

This pull request addresses the following:

  • Renames the plugin from "Subset Tools" to "Subsets."
  • Renames the subset_select attribute in the Subset Tools plugin to subset for better clarity and simplicity.
  • Exposes the following APIs to the user:
    • subset - Manages subset selection and creation.
    • combination_mode - Specifies how subsets are combined (new, replace, or, and, xor, andnot).
    • get_center - Retrieves the center of the selected subset.
    • set_center - Updates the center of the selected subset.

Fixes #

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 testing imviz plugin Label for plugins common to multiple configurations rampviz labels Nov 15, 2024
@haticekaratay haticekaratay added this to the 4.0.1 milestone Nov 15, 2024
@haticekaratay haticekaratay modified the milestones: 4.0.1, 4.1 Nov 15, 2024
@haticekaratay haticekaratay marked this pull request as ready for review November 15, 2024 15:44
@haticekaratay haticekaratay changed the title WIP: Rename Subset Tools Plugin Rename Subset Tools Plugin Nov 15, 2024
@haticekaratay haticekaratay added the trivial Only needs one approval instead of two label Nov 15, 2024
Copy link

codecov bot commented Nov 15, 2024

Codecov Report

Attention: Patch coverage is 95.23810% with 1 line in your changes missing coverage. Please review.

Project coverage is 88.80%. Comparing base (f715ffe) to head (ebd7187).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...igs/default/plugins/subset_plugin/subset_plugin.py 94.73% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3293   +/-   ##
=======================================
  Coverage   88.80%   88.80%           
=======================================
  Files         125      125           
  Lines       19009    19019   +10     
=======================================
+ Hits        16881    16890    +9     
- Misses       2128     2129    +1     

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

Copy link
Contributor

@javerbukh javerbukh left a comment

Choose a reason for hiding this comment

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

Just a few spots left and then this is ready to go, thank you for your patience!

@haticekaratay
Copy link
Contributor Author

['Subsets']._obj.

Thank you for catching those. I appreciate having extra eyes on this.

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.

Whew! Thanks for the thorough find-and-replaces! Just a few small comments but otherwise LGTM!

CHANGES.rst Outdated Show resolved Hide resolved
jdaviz/configs/imviz/plugins/viewers.py Outdated Show resolved Hide resolved
notebooks/concepts/imviz_advanced_aper_phot.ipynb Outdated Show resolved Hide resolved
notebooks/concepts/imviz_advanced_aper_phot.ipynb Outdated Show resolved Hide resolved
@kecnry
Copy link
Member

kecnry commented Nov 18, 2024

#3274 (comment) reminded me... we also need to expose the API hints (but that wasn't in the original scope, so let's make that a quick follow-up).

@kecnry
Copy link
Member

kecnry commented Nov 18, 2024

Another thing to consider for follow-up - the API path is default.plugins.subset_plugin.subset_plugin.SubsetPlugin which might be a bit... unintuitive to find. Should we consider moving this to default.plugins.subsets.subsets.Subsets?

Copy link
Contributor

@javerbukh javerbukh left a comment

Choose a reason for hiding this comment

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

This looks great, thank you again!

@haticekaratay haticekaratay merged commit 8c93c74 into spacetelescope:main Nov 18, 2024
19 checks passed
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 imviz plugin Label for plugins common to multiple configurations rampviz Ready for final review specviz testing trivial Only needs one approval instead of two
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants