-
Notifications
You must be signed in to change notification settings - Fork 26
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
Remove unused code to simplify filename generation #154
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #154 +/- ##
==========================================
+ Coverage 69.46% 69.83% +0.37%
==========================================
Files 24 24
Lines 1634 1618 -16
==========================================
- Hits 1135 1130 -5
+ Misses 499 488 -11 ☔ View full report in Codecov by Sentry. |
Closing and re-opening to re-trigger CI (it failed due to github actions being "degraded"). |
I can see the benefit in cleaning up a library for unused/unnecessary code, but another part of me thinks it must've had a reason to be there in the first place. Perhaps some of this could still be useful at some point in the future, but just isn't being used right now? Would be nice if we still had access to the thoughts of the original designer and author. |
Thanks for taking a look. tldr; this aims to make output file name generation easier to understand I'll try to fill in details and ping authors (if they're still available).
This method was introduced before stpipe existed for the "inital commit" of jwst 8 years ago by @jhunkeler :
This was introduced by @tapastro in #29 to allow for spacetelescope/jwst#6376
This was also added in jwst as part of the "initial commit" 8 years ago by @jhunkeler and now appears unused. It includes a single line of code which if needed could be re-introduced (and perhaps updated to use newer syntax): Line 639 in 54ec1d1
These trace back to spacetelescope/jwst#1316 made 6 years ago by @stscieisenhamer The goal in removing these is similar to
This change isn't related to file naming. Line 921 in 54ec1d1
Any further need for this feature can use the crds_client so I don't think the Step benefits from having this as a class method.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I dunno what name_format
was used for but if it's not needed that's one less variable-
@braingram Do any of the changes here result in API changes, such that we need to keep an updated version of stpipe in sync with other packages (e.g. jwst)? |
I can't find any usages of |
Everything removed here is unused in jwst and roman. This package is 0.5.2 currently so 0.6 seems reasonable to me for the next version (and updating the pins in jwst and roman once this is released to use the new version so I mostly assumed that since this package is not 1.0 that we don't claim any form of backwards compatibility and that as long as we don't break jwst and roman we're good to go. Let me know if this is not the case. |
Sounds good. Although given the fact that this has been in major public use (by the jwst pipeline) for several years now, I'm wondering why we've never come out with a version 1.0 yet. |
I think a 1.0 is a great idea but there are some more things I'd like to take a stab at cleaning up before we go there. I'll open an issue for 1.0.0 planning but one major gap is the lack of documentation. |
Good point. So for the impending release we'll stick with 0.6.0, but start making plans for a future 1.0.0. |
I think that makes the most sense so we don't rush 1.0.0. So the next release will be 0.6.0 and we can lay out a plan for 1.0.0 in: #161 |
This PR removes some unused code in stpipe. Most of this is related to filename generation which will hopefully be somewhat easier to understand after this PR:
Pipeline.set_input_filename
Step.name_format
:Requires remove name_format usage in wfs_combine jwst#8539 to first remove the 1 usage in jwst.Step.resolve_file_name
format
argument toStep.save_model
name_format
component_format
andseparator
arguments toStep._make_output_path
Step.reference_uri_to_cache_path
jwst regtests: https://plwishmaster.stsci.edu:8081/job/RT/job/JWST-Developers-Pull-Requests/1519/ shows 1 unrelated error (
test_duplicate_names
which randomly fails)romancal regtests: https://plwishmaster.stsci.edu:8081/job/RT/job/Roman-Developers-Pull-Requests/825/ passed with no errors