Skip to content

💄 Enhance type hints and docstrings in superconductor module for clarity#4234

Open
chris-ashe wants to merge 1 commit intomainfrom
superconductors_enhanced_linting
Open

💄 Enhance type hints and docstrings in superconductor module for clarity#4234
chris-ashe wants to merge 1 commit intomainfrom
superconductors_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.

Copilot AI review requested due to automatic review settings May 7, 2026 15:08
@chris-ashe chris-ashe requested a review from a team as a code owner May 7, 2026 15:08
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 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 Raises section for superconductor_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-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.81%. Comparing base (ab283c7) to head (d679448).

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.
📢 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants