💄Fix physics enhanced linting#4229
Conversation
…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>
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
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>
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>
…oved understanding Co-authored-by: Copilot <copilot@github.com>
There was a problem hiding this comment.
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.
timothy-nunn
left a comment
There was a problem hiding this comment.
Also take a quick look at what copilot has said because it seems to have made some sensible comments
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: 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>
Description
Checklist
I confirm that I have completed the following checks: