Water vacuum structure enahcned linting#4240
Open
chris-ashe wants to merge 8 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
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
@staticmethodand 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_timeis 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 on lines
+478
to
+479
| f"Newton's method not converging; check fusion power, te " | ||
| f"{physics_variables.p_fusion_total_mw} = " |
| ) | ||
|
|
||
| else: | ||
| logger.log( |
timothy-nunn
requested changes
May 12, 2026
timothy-nunn
approved these changes
May 12, 2026
Collaborator
timothy-nunn
left a comment
There was a problem hiding this comment.
Will need to be rebased due to merge conflicts
Co-authored-by: Copilot <copilot@github.com>
a61a19f to
e08ca27
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Checklist
I confirm that I have completed the following checks: