-
Notifications
You must be signed in to change notification settings - Fork 18
4176 docstrings still in the rst format #4213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
aa12537
b82044f
924f11a
eec6303
ef45f6a
395cad9
0740b72
a808822
b4b7515
32eb361
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1461,16 +1461,19 @@ def thermo_hydraulic_model_pressure_drop_calculations(self, output: bool): | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| def calculate_dshaped_inboard_blkt_segment_poloidal( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| dz_blkt_half: float, n_blkt_inboard_modules_poloidal: int | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) -> float: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| """Calculations for D-shaped inboard blanket module poloidal segment length | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| """Calculate D-shaped inboard blanket module poloidal segment length. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| :param dz_blkt_half: Half-height of the blanket module (m) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| :type dz_blkt_half: float | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| :param n_blkt_inboard_modules_poloidal: Number of inboard blanket modules in poloidal direction | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| :type n_blkt_inboard_modules_poloidal: int | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| :return: Segment length of inboard blanket module in poloidal direction (m) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| :rtype: float | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Parameters | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ---------- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| dz_blkt_half : | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Half-height of the blanket module (m) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| n_blkt_inboard_modules_poloidal : | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Number of inboard blanket modules in poloidal direction | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Returns | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ------- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| : | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+1468
to
+1475
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| dz_blkt_half : | |
| Half-height of the blanket module (m) | |
| n_blkt_inboard_modules_poloidal : | |
| Number of inboard blanket modules in poloidal direction | |
| Returns | |
| ------- | |
| : | |
| dz_blkt_half : float | |
| Half-height of the blanket module (m) | |
| n_blkt_inboard_modules_poloidal : int | |
| Number of inboard blanket modules in poloidal direction | |
| Returns | |
| ------- | |
| float |
Copilot
AI
Apr 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Returns section uses : as a placeholder rather than a return type. Numpydoc expects a type here (e.g. float) so the generated documentation is correct.
| : | |
| float |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| : | |
| float |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jwscook Is saying to not put types in the docstring
Copilot
AI
Apr 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These Parameters entries omit the types after the colon (contrast with other functions in this module that use name : float/int). Adding the types will keep docstrings consistent and more reliably parsed by Numpydoc/Sphinx.
| n_blkt_outboard_modules_poloidal : | |
| Number of outboard blanket modules in poloidal direction | |
| dr_fw_plasma_gap_inboard : | |
| Radial gap between inboard first wall and plasma (m) | |
| rminor : | |
| Minor radius of the plasma (m) | |
| dr_fw_plasma_gap_outboard : | |
| Radial gap between outboard first wall and plasma (m) | |
| dz_blkt_half : | |
| Half-height of the blanket module (m) | |
| n_divertors : | |
| Number of divertors (1 for single null, 2 for double null) | |
| f_ster_div_single : | |
| Fractional poloidal length of the divertor in single null configuration | |
| Returns | |
| ------- | |
| : | |
| n_blkt_outboard_modules_poloidal : int | |
| Number of outboard blanket modules in poloidal direction | |
| dr_fw_plasma_gap_inboard : float | |
| Radial gap between inboard first wall and plasma (m) | |
| rminor : float | |
| Minor radius of the plasma (m) | |
| dr_fw_plasma_gap_outboard : float | |
| Radial gap between outboard first wall and plasma (m) | |
| dz_blkt_half : float | |
| Half-height of the blanket module (m) | |
| n_divertors : int | |
| Number of divertors (1 for single null, 2 for double null) | |
| f_ster_div_single : float | |
| Fractional poloidal length of the divertor in single null configuration | |
| Returns | |
| ------- | |
| float |
Copilot
AI
Apr 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Returns section uses : as a placeholder instead of a return type. Please use an explicit type (likely float) so Numpydoc renders the return value correctly.
| : | |
| float |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| : | |
| float |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
Copilot
AI
Apr 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These Parameters entries omit types after the colon, which is inconsistent with other Numpy-style docstrings in this module (e.g. ... : float). Please add the parameter types to match the established format.
| rmajor : | |
| Major radius of the plasma (m) | |
| rminor : | |
| Minor radius of the plasma (m) | |
| triang : | |
| Triangularity of the plasma | |
| dr_fw_plasma_gap_inboard : | |
| Radial gap between inboard first wall and plasma (m) | |
| dz_blkt_half : | |
| Half-height of the blanket module (m) | |
| n_blkt_inboard_modules_poloidal : | |
| Number of inboard blanket modules in poloidal direction | |
| n_divertors : | |
| Number of divertors (1 for single null, 2 for double null) | |
| f_ster_div_single : | |
| rmajor : float | |
| Major radius of the plasma (m) | |
| rminor : float | |
| Minor radius of the plasma (m) | |
| triang : float | |
| Triangularity of the plasma | |
| dr_fw_plasma_gap_inboard : float | |
| Radial gap between inboard first wall and plasma (m) | |
| dz_blkt_half : float | |
| Half-height of the blanket module (m) | |
| n_blkt_inboard_modules_poloidal : int | |
| Number of inboard blanket modules in poloidal direction | |
| n_divertors : int | |
| Number of divertors (1 for single null, 2 for double null) | |
| f_ster_div_single : float |
Copilot
AI
Apr 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Returns section uses : as a placeholder instead of a type. For Numpydoc-style docstrings, provide the return type (likely float) so documentation builds cleanly.
| : | |
| float |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| : | |
| float |
Copilot
AI
Apr 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Returns section uses : as a placeholder rather than an explicit return type. Please change this to the appropriate type (likely float) for correct Numpydoc rendering.
| : | |
| float |
Copilot
AI
Apr 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These Parameters entries omit types after the colon. This module otherwise uses name : type in Numpy-style docstrings, so add the missing types to keep docs consistent and parsable.
| rmajor : | |
| Major radius of the plasma (m) | |
| rminor : | |
| Minor radius of the plasma (m) | |
| triang : | |
| Triangularity of the plasma | |
| dz_blkt_half : | |
| Half-height of the blanket module (m) | |
| dr_fw_plasma_gap_outboard : | |
| Radial gap between outboard first wall and plasma (m) | |
| n_blkt_outboard_modules_poloidal : | |
| Number of outboard blanket modules in poloidal direction | |
| n_divertors : | |
| Number of divertors (1 for single null, 2 for double null) | |
| f_ster_div_single : | |
| Fractional poloidal length of the divertor in single null configuration | |
| Returns | |
| ------- | |
| : | |
| rmajor : float | |
| Major radius of the plasma (m) | |
| rminor : float | |
| Minor radius of the plasma (m) | |
| triang : float | |
| Triangularity of the plasma | |
| dz_blkt_half : float | |
| Half-height of the blanket module (m) | |
| dr_fw_plasma_gap_outboard : float | |
| Radial gap between outboard first wall and plasma (m) | |
| n_blkt_outboard_modules_poloidal : int | |
| Number of outboard blanket modules in poloidal direction | |
| n_divertors : int | |
| Number of divertors (1 for single null, 2 for double null) | |
| f_ster_div_single : float | |
| Fractional poloidal length of the divertor in single null configuration | |
| Returns | |
| ------- | |
| float |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| : | |
| float |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -11,6 +11,7 @@ | |||||
| from process.core import constants | ||||||
| from process.core.exceptions import ProcessError, ProcessValueError | ||||||
| from process.data_structure import impurity_radiation_module | ||||||
| from process.models.physics.plasma_profiles import PlasmaProfile | ||||||
|
|
||||||
| logger = logging.getLogger(__name__) | ||||||
|
|
||||||
|
|
@@ -530,10 +531,13 @@ class ImpurityRadiation: | |||||
| element to find the total impurity radiation loss. | ||||||
| """ | ||||||
|
|
||||||
| def __init__(self, plasma_profile): | ||||||
| """ | ||||||
| :param plasma_profile: Plasma profile class, parameterises the density and temperature profiles. | ||||||
| :type plasma_profile: Plasma profile class | ||||||
| def __init__(self, plasma_profile: PlasmaProfile): | ||||||
| """Initialize the ImpurityRadiation class. | ||||||
|
|
||||||
| Parameters | ||||||
| ---------- | ||||||
| plasma_profile : | ||||||
|
||||||
| plasma_profile : | |
| plasma_profile : PlasmaProfile |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -569,17 +569,23 @@ def calculate_current_coefficient_peng( | |||||||||||||||||||||
| """ | ||||||||||||||||||||||
| Calculate the plasma current scaling coefficient for the Peng scaling from the STAR code. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| :param eps: Plasma inverse aspect ratio. | ||||||||||||||||||||||
| :type eps: float | ||||||||||||||||||||||
| :param len_plasma_poloidal: Plasma poloidal perimeter length [m]. | ||||||||||||||||||||||
| :type len_plasma_poloidal: float | ||||||||||||||||||||||
| :param rminor: Plasma minor radius [m]. | ||||||||||||||||||||||
| :type rminor: float | ||||||||||||||||||||||
| Parameters | ||||||||||||||||||||||
| ---------- | ||||||||||||||||||||||
| eps: | ||||||||||||||||||||||
| Plasma inverse aspect ratio. | ||||||||||||||||||||||
| len_plasma_poloidal: | ||||||||||||||||||||||
| Plasma poloidal perimeter length (m). | ||||||||||||||||||||||
| rminor: | ||||||||||||||||||||||
|
Comment on lines
+574
to
+578
|
||||||||||||||||||||||
| eps: | |
| Plasma inverse aspect ratio. | |
| len_plasma_poloidal: | |
| Plasma poloidal perimeter length (m). | |
| rminor: | |
| eps : float | |
| Plasma inverse aspect ratio. | |
| len_plasma_poloidal : float | |
| Plasma poloidal perimeter length (m). | |
| rminor : float |
Copilot
AI
Apr 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Returns section is using : as the return type/name placeholder. In Numpydoc this should be a concrete type (e.g. float) so that Sphinx/numpydoc can render it correctly.
| : | |
| float |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| : | |
| float |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This conversion to Numpy-style docstring removed the parameter types (even though other docstrings in this file include them, e.g.
previous : float | np.ndarray). Consider usingmodels : Modelsanddata : DataStructurefor consistency and better doc rendering.