Skip to content

Conversation

@jemorrison
Copy link
Collaborator

@jemorrison jemorrison commented Mar 31, 2025

Helps to Resolve JP-3857

Closes #

This PR addresses updates to cube_build code to conform to the code style changes.

Tasks

(https://github.com/spacetelescope/RegressionTests/blob/main/docs/running_regression_tests.md))
- [ ] Do truth files need to be updated ("okified")?
- [ ] after the reviewer has approved these changes, run okify_regtests to update the truth files

@jemorrison jemorrison added this to the Build 12.0 milestone Mar 31, 2025
@jemorrison jemorrison requested review from a team as code owners March 31, 2025 18:10
@jemorrison jemorrison marked this pull request as draft March 31, 2025 18:11
@codecov
Copy link

codecov bot commented Mar 31, 2025

Codecov Report

Attention: Patch coverage is 87.04846% with 147 lines in your changes missing coverage. Please review.

Project coverage is 75.62%. Comparing base (1ae307b) to head (c33e250).
Report is 740 commits behind head on main.

Files with missing lines Patch % Lines
jwst/cube_build/cube_build_step.py 56.92% 56 Missing ⚠️
jwst/cube_build/blot_cube_build.py 3.12% 31 Missing ⚠️
jwst/cube_build/cube_build_io_util.py 80.18% 22 Missing ⚠️
jwst/cube_build/cube_build.py 78.65% 19 Missing ⚠️
jwst/cube_build/instrument_defaults.py 98.77% 8 Missing ⚠️
jwst/cube_build/coord.py 20.00% 4 Missing ⚠️
jwst/cube_build/data_types.py 69.23% 4 Missing ⚠️
jwst/cube_build/file_table.py 97.46% 2 Missing ⚠️
jwst/cube_build/cube_build_wcs_util.py 92.85% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9347      +/-   ##
==========================================
+ Coverage   75.60%   75.62%   +0.01%     
==========================================
  Files         368      368              
  Lines       36916    36908       -8     
==========================================
+ Hits        27911    27912       +1     
+ Misses       9005     8996       -9     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jemorrison jemorrison force-pushed the JP-3857_cube_build_code_style branch 3 times, most recently from 97889c1 to da8fadf Compare April 6, 2025 18:37
@jemorrison jemorrison marked this pull request as ready for review April 7, 2025 19:43
@jemorrison jemorrison force-pushed the JP-3857_cube_build_code_style branch from 4dc93ee to b554e3c Compare April 7, 2025 19:44
@jemorrison
Copy link
Collaborator Author

jemorrison commented Apr 7, 2025

@melanieclarke take a look at this PR.I am re-running the regression test now and will post the link when they are finished. I have lost momentum on this PR so if you see something in general missing let me know and I can fix it before you do a detailed review

@melanieclarke
Copy link
Collaborator

@melanieclarke take a look at this PR.I am re-running the regression test now and will post the link when they are finished. I have lost momentum on this PR so if you see something in general missing let me know and I can fix it before you do a detailed review

Thanks @jemorrison - I glanced through and these look like good changes so far. This module could still use even more unit tests, but we don't need to get them all in now.

Copy link
Collaborator

@melanieclarke melanieclarke left a comment

Choose a reason for hiding this comment

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

There's a lot here - I think we're going to have to iterate a few times to get this ready for merge. I'll start by sending some initial comments from read-through, up to the ifu_cube.py file. More later!

@jemorrison jemorrison force-pushed the JP-3857_cube_build_code_style branch from 0f74ca5 to 0960ffd Compare April 14, 2025 18:18
Copy link
Collaborator

@melanieclarke melanieclarke left a comment

Choose a reason for hiding this comment

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

Another round of suggestions/requests - I've now done an initial read-through up to but not including the C code and tests.

@jemorrison
Copy link
Collaborator Author

@melanieclarke Let me take another stab at c code. I think I did not fully clean that code up.

@melanieclarke
Copy link
Collaborator

@melanieclarke Let me take another stab at c code. I think I did not fully clean that code up.

Sure, just let me know when you're done and I'll come back around.

@jemorrison
Copy link
Collaborator Author

@melanieclarke When you have time look at the c code: cube_match_sky_driz.c
I can apply similar changes you suggest to that code to the other c code.
Then I will have you look at all the c code. But having an idea of how much detail I should have for this one will be helpful

Copy link
Collaborator

@melanieclarke melanieclarke left a comment

Choose a reason for hiding this comment

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

@jemorrison - I started to look through your updates from yesterday, but it looks like GitHub hid a large chunk of comments from you. Can you please check under the fold from yesterday's round of comments?

I'll start looking at cube_match_sky_driz.c.

Copy link
Collaborator

@melanieclarke melanieclarke left a comment

Choose a reason for hiding this comment

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

Comments for cube_match_sky_driz.c:
In general, this looks like a pretty good level of detail. I think the Python signature and parameter descriptions are the most important part of the docs here. It would be helpful to review them and clean them up a bit - make sure all parameters are listed and in the right order. If you can, listing the Python input types is helpful (e.g. "ndarray of float" is better than "double array").

@melanieclarke

This comment was marked as resolved.

@jemorrison jemorrison force-pushed the JP-3857_cube_build_code_style branch 2 times, most recently from c3023d5 to ce943e9 Compare April 17, 2025 22:03
Copy link
Collaborator

@melanieclarke melanieclarke left a comment

Choose a reason for hiding this comment

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

I found a few more minor things on read-through, but I think we're getting close. The extra comments for the C code are very helpful.

The only significant issue is that there's a missing Exception in the IFU offset file handling code, noted below.

@jemorrison jemorrison force-pushed the JP-3857_cube_build_code_style branch from 3ab0daf to 5e1d7be Compare April 25, 2025 16:02
@jemorrison
Copy link
Collaborator Author

@melanieclarke See if the way I modified the exception in cube_build_step.py is ok with you.
I think I got all the changes in. I am going to re-run the regression tests now

Copy link
Collaborator

@melanieclarke melanieclarke left a comment

Choose a reason for hiding this comment

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

Almost there, just a couple more small things that keep getting buried:

  1. change log should note that there are new exception names
  2. there are still some "shepherds" in instrument_defaults that need to be replaced with Shepard

@melanieclarke
Copy link
Collaborator

I think we made it! Can you link to the latest regtest run?

@jemorrison
Copy link
Collaborator Author

@melanieclarke added the link to the latests (today) regression test run - all passing

Copy link
Collaborator

@melanieclarke melanieclarke left a comment

Choose a reason for hiding this comment

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

I approve! Thanks for all your hard work on this one. I think it's a significant improvement in maintainability and documentation for this module.

@melanieclarke melanieclarke enabled auto-merge April 25, 2025 17:21
@melanieclarke melanieclarke merged commit 839adc2 into spacetelescope:main Apr 25, 2025
19 checks passed
@jemorrison jemorrison deleted the JP-3857_cube_build_code_style branch September 30, 2025 22:56
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