💄 Enhance type hints and docstrings in superconductor module for clarity#4234
Open
chris-ashe wants to merge 1 commit intomainfrom
Open
💄 Enhance type hints and docstrings in superconductor module for clarity#4234chris-ashe wants to merge 1 commit intomainfrom
chris-ashe wants to merge 1 commit intomainfrom
Conversation
Co-authored-by: Copilot <copilot@github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves clarity in process.models.superconductors by adding/adjusting type hints and reformatting docstrings (including references) for readability and better developer guidance.
Changes:
- Added a module-level docstring and expanded/rewrapped several function docstrings.
- Added type annotations and short docstrings to
IntEnum.__new__implementations for the superconductor enums. - Updated documentation around validity ranges/references and added a
Raisessection forsuperconductor_current_density_margin.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| The current density margin is the difference between the operating current density and | ||
| the critical current density of a superconductor at a given temperature and field. | ||
| The current density margin is the difference between the operating current density | ||
| andthe critical current density of a superconductor at a given temperature and |
Comment on lines
+1256
to
+1260
| Raises | ||
| ------ | ||
| ValueError | ||
| If an unknown superconductor material code is provided. | ||
|
|
Comment on lines
+1256
to
+1260
| Raises | ||
| ------ | ||
| ValueError | ||
| If an unknown superconductor material code is provided. | ||
|
|
| D. P. Hampshire, “The magnetic field, temperature, strain and angular dependence | ||
| of the critical current density for Nb-Ti,” Journal of Physics Conference Series, | ||
| vol. 1559, no. 1, pp. 012063-012063, Jun. 2020, | ||
| doi:https://doi.org/10.1088/1742-6596/1559/1/012063. |
| D. P. Hampshire, “The magnetic field, temperature, strain and angular dependence | ||
| of the critical current density for Nb-Ti,” Journal of Physics Conference Series, | ||
| vol. 1559, no. 1, pp. 012063-012063, Jun. 2020, | ||
| doi:https://doi.org/10.1088/1742-6596/1559/1/012063. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4234 +/- ##
=======================================
Coverage 51.81% 51.81%
=======================================
Files 150 150
Lines 30296 30296
=======================================
Hits 15697 15697
Misses 14599 14599 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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: