Skip to content

💄Fix physics enhanced linting#4229

Merged
timothy-nunn merged 27 commits intomainfrom
fix_physics_enhanced_linting
May 8, 2026
Merged

💄Fix physics enhanced linting#4229
timothy-nunn merged 27 commits intomainfrom
fix_physics_enhanced_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.

chris-ashe and others added 5 commits May 6, 2026 14:41
…s module

Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
@chris-ashe chris-ashe added the Repository management Related to repository management and metadata label May 7, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 7, 2026

Codecov Report

❌ Patch coverage is 93.75000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.83%. Comparing base (62a4d95) to head (c98d21a).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
process/models/physics/plasma_current.py 50.00% 2 Missing ⚠️
process/models/physics/fusion_reactions.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4229      +/-   ##
==========================================
+ Coverage   51.78%   51.83%   +0.04%     
==========================================
  Files         150      150              
  Lines       30285    30311      +26     
==========================================
+ Hits        15684    15712      +28     
+ Misses      14601    14599       -2     

☔ 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 May 7, 2026 10:32
@chris-ashe chris-ashe requested a review from a team as a code owner May 7, 2026 10:32
Copilot AI review requested due to automatic review settings May 7, 2026 10:32
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” improvements across the physics models by adding module/class docstrings, tightening type hints (notably for IntEnum.__new__), and reflowing long docstring/comment lines to satisfy formatting and docstring conventions.

Changes:

  • Added/updated module + API docstrings across multiple physics submodules (radiation, profiles, geometry, fields, current, confinement, etc.).
  • Introduced additional type hints and small refactors (e.g., converting some helper methods to @staticmethod) to satisfy lint rules.
  • Minor output/log message formatting changes.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
process/models/physics/radiation_power.py Adds module docstring and reflows docstrings for lint/readability.
process/models/physics/profiles.py Adds module docstring, adds type hints/docstrings to enum helpers, reflows docstrings/comments.
process/models/physics/plasma_profiles.py Adds module docstring and reflows docstrings/comments for lint/readability.
process/models/physics/plasma_geometry.py Adds module/class docstrings, adds type hints/docstrings to enums, reflows docstrings/comments.
process/models/physics/plasma_fields.py Adds module/class docstrings and reflows docstrings.
process/models/physics/plasma_current.py Adds module/class docstrings, adds type hints/docstrings, minor refactors for output string building.
process/models/physics/physics.py Adds module/class docstrings, adds type hints, converts some helpers to @staticmethod, reflows docstrings/comments.
process/models/physics/l_h_transition.py Adds module docstring and expands enum/member docstrings and output string formatting.
process/models/physics/impurity_radiation.py Adds module docstring and several function/class docstring reflows/clarifications.
process/models/physics/fusion_reactions.py Adds module docstring and improves docstring/comment formatting (units, wrapping).
process/models/physics/exhaust.py Adds module docstring and reflows output text.
process/models/physics/density_limit.py Adds module docstring, adds enum docstrings/type hints, converts getter to @staticmethod, reflows docstrings/comments.
process/models/physics/current_drive.py Adds module/class docstrings, converts several methods to @staticmethod, updates type hints/docstrings, removes unused parameters.
process/models/physics/confinement_time.py Adds module docstring, adds enum docstrings/type hints, reflows docstrings/comments, documents raises.
process/models/physics/bootstrap_current.py Adds module docstring, adds enum docstrings/type hints, converts getter to @staticmethod, reflows docstrings/comments.

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

Comment thread process/models/physics/current_drive.py Outdated
Comment thread process/models/physics/l_h_transition.py Outdated
Comment thread process/models/physics/physics.py Outdated
Comment thread process/models/physics/density_limit.py Outdated
Comment thread process/models/physics/plasma_current.py Outdated
@timothy-nunn timothy-nunn self-assigned this May 7, 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.

Also take a quick look at what copilot has said because it seems to have made some sensible comments

Comment thread process/models/physics/exhaust.py Outdated
Comment thread process/models/physics/density_limit.py Outdated
Comment thread process/models/physics/bootstrap_current.py Outdated
Comment thread process/models/physics/plasma_profiles.py Outdated
Comment thread process/models/physics/l_h_transition.py Outdated
Comment thread process/models/physics/physics.py Outdated
Comment thread process/models/physics/physics.py Outdated
@chris-ashe chris-ashe added Physics Relating to the physics models Linting labels May 7, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
chris-ashe and others added 8 commits May 7, 2026 15:18
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Timothy <75321887+timothy-nunn@users.noreply.github.com>
Co-authored-by: Timothy <75321887+timothy-nunn@users.noreply.github.com>
Co-authored-by: Timothy <75321887+timothy-nunn@users.noreply.github.com>
Co-authored-by: Timothy <75321887+timothy-nunn@users.noreply.github.com>
Co-authored-by: Timothy <75321887+timothy-nunn@users.noreply.github.com>
@timothy-nunn timothy-nunn merged commit 03bcdad into main May 8, 2026
10 of 11 checks passed
@timothy-nunn timothy-nunn deleted the fix_physics_enhanced_linting branch May 8, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Linting Physics Relating to the physics models Repository management Related to repository management and metadata

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants