Skip to content

Water vacuum structure enahcned linting#4240

Open
chris-ashe wants to merge 8 commits into
mainfrom
water_vacuum_structure_enahcned_linting
Open

Water vacuum structure enahcned linting#4240
chris-ashe wants to merge 8 commits into
mainfrom
water_vacuum_structure_enahcned_linting

Conversation

@chris-ashe
Copy link
Copy Markdown
Collaborator

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.

Copilot AI review requested due to automatic review settings May 12, 2026 10:10
@chris-ashe chris-ashe requested a review from a team as a code owner May 12, 2026 10:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR focuses on “enhanced linting” cleanups across several PROCESS engineering models, primarily by adding missing docstrings, reflowing long strings/comments, and converting some helper methods to @staticmethod where instance state isn’t used.

Changes:

  • Added module/class/method docstrings across multiple model modules.
  • Rewrapped long comments/strings to satisfy formatting/linting constraints.
  • Refactored several helper methods to @staticmethod and adjusted signatures/type hints.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
process/models/water_use.py Adds module/class/method docstrings and reflows long strings/comments.
process/models/vacuum.py Adds docstrings and reflows long docstrings/comments; adjusts an error message line-wrap.
process/models/structure.py Adds module docstring and an output() method docstring.
process/models/shield.py Adds module/class/method docstrings.
process/models/pulse.py Adds docstrings and converts calculate_burn_time to @staticmethod.
process/models/power.py Adds docstrings, converts multiple helpers to @staticmethod, and reflows long comments/strings.
Comments suppressed due to low confidence (1)

process/models/power.py:2648

  • The return type annotation for power_profiles_over_time is incorrect (-> float). The function returns a tuple of energies and multiple profile arrays, so the annotation is misleading and will break type checking. Update the annotation to the correct tuple type (or introduce a NamedTuple/dataclass for the return value).
    @staticmethod
    def power_profiles_over_time(
        t_precharge: float,
        t_current_ramp_up: float,
        t_fusion_ramp: float,
        t_burn: float,
        t_ramp_down: float,
        t_between_pulse: float,
        p_plant_electric_base_total_mw: float,
        p_cryo_plant_electric_mw: float,
        p_tritium_plant_electric_mw: float,
        vachtmw: float,
        p_tf_electric_supplies_mw: float,
        p_pf_electric_supplies_mw: float,
        p_coolant_pump_elec_total_mw: float,
        p_hcd_electric_total_mw: float,
        p_fusion_total_mw: float,
        p_plant_electric_gross_mw: float,
        p_plant_electric_net_mw: float,
    ) -> float:
        """Calculate time-dependent power profiles for different electric systems

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread process/models/vacuum.py
Comment on lines +478 to +479
f"Newton's method not converging; check fusion power, te "
f"{physics_variables.p_fusion_total_mw} = "
Comment thread process/models/power.py
)

else:
logger.log(
Comment thread process/models/power.py Outdated
Comment thread process/models/power.py Outdated
Comment thread process/models/power.py
Comment thread process/models/vacuum.py
@timothy-nunn timothy-nunn self-assigned this May 12, 2026
Copy link
Copy Markdown
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.

Will need to be rebased due to merge conflicts

@chris-ashe chris-ashe force-pushed the water_vacuum_structure_enahcned_linting branch from a61a19f to e08ca27 Compare May 12, 2026 13:34
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