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 Subsets Plugin #3304

Merged
merged 8 commits into from
Nov 26, 2024

Conversation

haticekaratay
Copy link
Contributor

@haticekaratay haticekaratay commented Nov 18, 2024

Description

This pull request

  • Restores the plugin name from Subsets back to Subset Tools, returning it to its original state.
  • Renames app bar Subset Tools to SubsetAppBarWidget

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 18, 2024
@haticekaratay haticekaratay added this to the 4.1 milestone Nov 20, 2024
Copy link

codecov bot commented Nov 20, 2024

Codecov Report

Attention: Patch coverage is 93.77432% with 32 lines in your changes missing coverage. Please review.

Project coverage is 88.81%. Comparing base (7e5ddfa) to head (7647f68).
Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
...nfigs/default/plugins/subset_tools/subset_tools.py 93.42% 32 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3304      +/-   ##
==========================================
- Coverage   88.81%   88.81%   -0.01%     
==========================================
  Files         125      125              
  Lines       19030    19036       +6     
==========================================
+ Hits        16901    16906       +5     
- Misses       2129     2130       +1     

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


🚨 Try these New Features:

@haticekaratay haticekaratay added the trivial Only needs one approval instead of two label Nov 20, 2024
@haticekaratay haticekaratay changed the title WIP: Rename Subsets Plugin Rename Subsets Plugin Nov 20, 2024
@haticekaratay haticekaratay marked this pull request as ready for review November 20, 2024 17:25
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.

Thanks (and sorry for the whiplash! 😉 )

The app-bar widget should also be removed from the API docs (currently appearing at https://jdaviz--3304.org.readthedocs.build/en/3304/reference/api_plugins.html#module-jdaviz.configs.default.plugins.subset_tools.subset_tools)

Copy link
Contributor

@cshanahan1 cshanahan1 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! my personal opinion would be to rename configs/default/plugins/subset_tools and subset_tools.py to something more clear like subset_app_bar_widget

@haticekaratay
Copy link
Contributor Author

Looks good! my personal opinion would be to rename configs/default/plugins/subset_tools and subset_tools.py to something more clear like subset_app_bar_widget

That crossed my mind as well, but it felt quite long, so I renamed it to subset_widget. I'm happy to go with whatever the consensus is 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.

was git used to rename the files? For some reason its showing as the old file entirely deleted and a new one created instead of just a rename (but maybe that is because of the path rename as well?)

If possible, it would be nice to maintain the git history of the contents of all these files so that blame, etc, continues to function

@pllim
Copy link
Contributor

pllim commented Nov 25, 2024

For some reason its showing as the old file entirely deleted and a new one created

Because the contents also changed (e.g., class name).

@kecnry
Copy link
Member

kecnry commented Nov 25, 2024

Can we do that in two separate commits then to retain history?

@haticekaratay
Copy link
Contributor Author

haticekaratay commented Nov 25, 2024

I have an idea to make it happen, and I am currently working on it.

@haticekaratay
Copy link
Contributor Author

@kecnry
I moved several files, such as subset_plugin.vue, subset_plugin.py, and others, into a new subset_tools submodule. However, Git isn’t fully preserving the history for these files in the new location, even though I used git mv and kept changes separate.
If contributors who made significant contributions to these files could rename and commit the path changes directly to my branch, it might preserve the history better. Feel free to commit to my branch or share suggestions here if anyone has a solution. 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.

Thanks for trying! Looks like it might not be possible with the directory rename, but git may still be able to follow this history with --follow (for future inspections).

@pllim
Copy link
Contributor

pllim commented Nov 26, 2024

You could try something like this (after merge) but not sure how well it works if you are moving things around. It was nice when we applied black to the entire code base.

https://github.com/astropy/astropy/blob/main/.git-blame-ignore-revs

@haticekaratay
Copy link
Contributor Author

@kecnry Thank you for your approval. I have rebased to ensure the readthedocs build is successful. I will merge it once the build is completed.

@haticekaratay haticekaratay merged commit 3dc6573 into spacetelescope:main Nov 26, 2024
17 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 specviz testing trivial Only needs one approval instead of two
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants