Skip to content

Conversation

@chris-ashe
Copy link
Collaborator

@chris-ashe chris-ashe commented Feb 2, 2026

This pull request refactors the calculation of first wall geometry and area in the codebase. The logic for calculating the first wall's half-height and surface areas has been extracted from process/build.py and reimplemented in a more modular and testable way within a new FirstWall class in process/fw.py. Additionally, the codebase is updated to use FirstWall instead of the old Fw class, and related variables are initialized and managed more cleanly. Associated tests and fixtures are updated to use the new class.

Key changes include:

Refactoring and Code Organization

  • The calculation of the first wall's half-height and surface areas is moved from process/build.py to new static methods in the FirstWall class in process/fw.py, improving modularity and maintainability.
  • The old Fw class is replaced with the new FirstWall class throughout the codebase, including in process/main.py, integration tests, and unit tests.

Variable Initialization and Data Structure Updates

  • The half-height of the first wall (dz_fw_half) is added to fwbs_variables and properly initialized in process/data_structure/fwbs_variables.py.

Imports and Cleanup

  • Unused imports related to the old area calculation functions and exception handling are removed from process/build.py.
    These changes make the codebase cleaner, easier to test, and more maintainable by encapsulating first wall calculations in a dedicated class and updating all relevant usages.## 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 Feb 2, 2026

Codecov Report

❌ Patch coverage is 35.55556% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.47%. Comparing base (40782b5) to head (75756d7).

Files with missing lines Patch % Lines
process/fw.py 30.00% 28 Missing ⚠️
process/main.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4077   +/-   ##
=======================================
  Coverage   46.46%   46.47%           
=======================================
  Files         122      122           
  Lines       28838    28855   +17     
=======================================
+ Hits        13401    13411   +10     
- Misses      15437    15444    +7     

☔ 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 marked this pull request as ready for review February 2, 2026 11:11
@chris-ashe chris-ashe requested a review from a team as a code owner February 2, 2026 11:11
@chris-ashe chris-ashe force-pushed the put_fw_geometry_in_class branch from c885d83 to 75756d7 Compare February 2, 2026 11:11
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