Skip to content

❄️ Refactor cryostat geometry calculations into a new Cryostat class #3594

Merged
timothy-nunn merged 3 commits intomainfrom
create_cryostat_file
Mar 21, 2025
Merged

❄️ Refactor cryostat geometry calculations into a new Cryostat class #3594
timothy-nunn merged 3 commits intomainfrom
create_cryostat_file

Conversation

@chris-ashe
Copy link
Collaborator

@chris-ashe chris-ashe commented Mar 19, 2025

This pull request refactors the cryostat geometry calculations by moving them into a new dedicated Cryostat class. The changes also include code cleanup and removal of redundant methods. Here are the most important changes:

Refactoring and code organization:

  • Moved cryostat geometry calculations to a new Cryostat class in process/cryostat.py.
  • Updated process/main.py to initialize the new Cryostat class.
  • Updated process/caller.py to call the run method of the new Cryostat class.

Code cleanup:

  • Removed the external_cryo_geometry method from process/blanket_library.py and related calls. [1] [2]
  • Removed the cryostat_output method and related calls from process/build.py. [1] [2]

These changes improve the modularity and readability of the code by encapsulating cryostat-related functionality within its own class.

Checklist

I confirm that I have completed the following checks:

  • My changes follow the PROCESS style guide
  • I have justified any large differences in the regression tests caused by this pull request in the comments.
  • I have added new tests where appropriate for the changes I have made.
  • If I have had to change any existing unit or integration tests, I have justified this change in the pull request comments.
  • If I have made documentation changes, I have checked they render correctly.
  • I have added documentation for my change, if appropriate.

@chris-ashe chris-ashe requested a review from timothy-nunn March 19, 2025 11:54
@chris-ashe chris-ashe self-assigned this Mar 19, 2025
@codecov-commenter
Copy link

codecov-commenter commented Mar 19, 2025

Codecov Report

Attention: Patch coverage is 63.33333% with 11 lines in your changes missing coverage. Please review.

Project coverage is 31.74%. Comparing base (cf82f05) to head (b78bf24).

Files with missing lines Patch % Lines
process/cryostat.py 69.23% 8 Missing ⚠️
process/caller.py 0.00% 1 Missing ⚠️
process/main.py 50.00% 1 Missing ⚠️
process/output.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3594      +/-   ##
==========================================
+ Coverage   31.71%   31.74%   +0.02%     
==========================================
  Files          84       85       +1     
  Lines       20152    20161       +9     
==========================================
+ Hits         6392     6400       +8     
- Misses      13760    13761       +1     

☔ 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.

Copy link
Collaborator

@timothy-nunn timothy-nunn left a comment

Choose a reason for hiding this comment

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

Much nicer structure, does not change any output, rename any variables, or cause any test issues

@chris-ashe chris-ashe force-pushed the create_cryostat_file branch from ee267b1 to 6f3bd54 Compare March 20, 2025 16:24
@chris-ashe chris-ashe force-pushed the create_cryostat_file branch from 969a11b to b78bf24 Compare March 21, 2025 15:51
@timothy-nunn timothy-nunn merged commit 204b622 into main Mar 21, 2025
18 checks passed
@timothy-nunn timothy-nunn deleted the create_cryostat_file branch March 21, 2025 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants