Skip to content

Conversation

@chris-ashe
Copy link
Collaborator

@chris-ashe chris-ashe commented Dec 5, 2025

This pull request refactors the calculation and management of vacuum vessel geometry and volumes, moving these responsibilities out of the blanket_library and into a new dedicated VacuumVessel class. The vacuum vessel logic is now encapsulated and run independently, leading to a cleaner separation of concerns and easier maintenance. Related test code and obsolete code paths have also been updated or removed to match the new structure.

Refactoring and Encapsulation of Vacuum Vessel Calculations:

  • Introduced a new VacuumVessel class in process/vacuum.py that handles all vacuum vessel geometry and volume calculations, including methods for D-shaped and elliptical vessel geometries, and applies the vessel coverage factor and density calculation. The vacuum vessel logic is now invoked via self.models.vacuum_vessel.run() in the main model runner.

  • Removed all vacuum vessel-related calculations from blanket_library.py, including volume and half-height computations, as well as code that previously handled the vacuum vessel as a third component (icomponent==2). The blanket and shield calculations now only consider two components.

Test Code Updates:

  • Removed or updated test parameters and assertions in test_blanket_library.py that referenced vacuum vessel geometry or volumes, since these are now handled by the new VacuumVessel class and are no longer part of the blanket library interface.

Other Code Cleanups:

  • Commented out obsolete vacuum vessel density calculation logic in hcpb.py, as this is now handled in the new class.

This refactor improves code maintainability by isolating vacuum vessel logic, reducing coupling between the blanket library and vessel calculations, and ensuring that each component is responsible for its own domain.## Description

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.

@codecov-commenter
Copy link

codecov-commenter commented Dec 5, 2025

Codecov Report

❌ Patch coverage is 34.48276% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.27%. Comparing base (726df45) to head (ae2897c).

Files with missing lines Patch % Lines
process/vacuum.py 34.61% 17 Missing ⚠️
process/caller.py 0.00% 1 Missing ⚠️
process/main.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4002      +/-   ##
==========================================
- Coverage   46.29%   46.27%   -0.02%     
==========================================
  Files         123      123              
  Lines       28841    28869      +28     
==========================================
+ Hits        13351    13360       +9     
- Misses      15490    15509      +19     

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

@chris-ashe chris-ashe force-pushed the create_vv_class branch 3 times, most recently from c3a8019 to 7869c1a Compare January 7, 2026 15:55
@chris-ashe chris-ashe marked this pull request as ready for review January 20, 2026 11:19
Copy link
Collaborator

@j-a-foster j-a-foster left a comment

Choose a reason for hiding this comment

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

Happy with transfer of code.

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.

4 participants