Added variable descriptions to dataclass variables - #4554
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4554 +/- ##
==========================================
+ Coverage 49.46% 49.94% +0.48%
==========================================
Files 150 151 +1
Lines 30069 29906 -163
==========================================
+ Hits 14874 14938 +64
+ Misses 15195 14968 -227 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
These seem to be copies of the descriptions in process/data_structure/tfcoil_variables.py. Did you intend to duplicate these descriptions without deleting the originals? |
I've replicated what's been done for other dataclasses in the same file, they have descriptions which match or summarise what's in the corresponding |
Yea the variables in these dataclasses need descriptions, as well as in the data_structure files - this way users can see the descriptions for the dataclass variables without having to search through data_structure files, but we still need the descriptions in the data structure for the dictionaries |
chris-ashe
left a comment
There was a problem hiding this comment.
Just a few very small changes for each, can I ask that the global vars are done to match the ones here. Cant recommend changes on those files
* Move data structure to its own class * Fix pre-commit failures * Create data_structure submodule in core
* Reject zero-thickness superconducting TF at input validation Build.calculate_radial_build only derives dr_tf_inboard from the winding pack and case thicknesses when dr_tf_wp_with_insulation (ixc = 140) is an iteration variable. If a user supplies the winding pack thickness as a plain input instead, dr_tf_inboard silently stays at its default of 0: the TF coil vanishes from the radial build and the run fails far downstream with unexplained radial-build inconsistency and multi-GPa TF stresses. Add a check_process validation that a superconducting TF has a positive dr_tf_inboard when neither ixc = 13 nor ixc = 140 is active, with an actionable message. Stellarators (which calculate dr_tf_inboard during the model run) and IFE are excluded. Test-suite change, per CONTRIBUTING: the parser tests in tests/unit/core/test_input.py run init_process on minimal input snippets and relied on config validation not examining the TF geometry; their fixture scaffold now sets a valid dr_tf_inboard. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Address review: check all conductor models, no ixc 13 exemption, parser tests skip validation - The check no longer exempts ixc = 13: the input value seeds the first model evaluation either way; an exactly-zero value was only caught later by the generic iteration-variable check, and a negative value was not caught at all (the 1/value scaling in load_iteration_variables inverts the variable's bounds). Rejecting at input validation covers both with an actionable message. - The error message drops "or use ixc = 13" accordingly. - The conductor-model condition is removed: dr_tf_inboard is only derived under ixc = 140 or for stellarators, neither of which depends on i_tf_sup, so resistive TF coils had the same silent zero-thickness path. - test_input.py keeps its scaffold unchanged and instead disables check_process with an autouse monkeypatch fixture, as suggested; the parser tests no longer carry TF geometry. - Tests updated: resistive zero-thickness now rejected (plus an accepted positive-thickness case), and ixc = 13 with zero or negative input is rejected. Unit suite 855 passed / 4 skipped; integration 21 passed / 1 skipped (all shipped regression inputs pass the widened check). Rebased onto main (includes #4553). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Parametrize non-positive thickness test; apply fixture docstring suggestion Also corrects the test docstring: a negative dr_tf_inboard cannot come from an input file (the parser bounds it to [0, 10]); check_process guards the data structure however it was populated. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * DataStructure module changed * Re-order imports --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* availability refactor * vertical build refactor * divertor and radial build refactor * missed return * oops * Apply suggestions from code review Co-authored-by: clmould <86794332+clmould@users.noreply.github.com> * code review * Update process/models/build.py * Update process/models/build.py * Update process/models/build.py * fix indentation from github --------- Co-authored-by: clmould <86794332+clmould@users.noreply.github.com>
* Bump ruff from 0.16.4 to 0.16.5 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.16.4 to 0.16.5. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](astral-sh/ruff@0.16.4...0.16.5) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.16.5 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * update ruff --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: james <81617086+je-cook@users.noreply.github.com>
* Use tabulate to output vertical build table * Use tabulate to output radial build table * Format floats to scientific notation
* Change set_filenames in single_run fixture to use temp_input_file instead of tmp_path * Update tests/unit/test_main.py Co-authored-by: Timothy <75321887+timothy-nunn@users.noreply.github.com> --------- Co-authored-by: Timothy <75321887+timothy-nunn@users.noreply.github.com>
* move data_structure_dicts, obsolete_variables and variable_metadata to process/core/data_structure * rename data_structure_dicts.py to dicts.py
* Support a local repository of regression test assets * Improve docs and fix spelling
… negligible tritium fraction (#4575)
* Add method to calculate Eich 2011 JET SOL power decay length * Add Eich 2011 JET model for power decay length calculation and update related documentation * Add Eich 2011 JET power decay length variables to PhysicsData class * Add Eich 2011 JET power decay length calculations to ScrapeOffLayer model * Add Eich 2011 JET + ASDEX Upgrade power decay length calculations and update related models * Add tests for Eich 2011 JET and ASDEX Upgrade SOL power decay length calculations * Add scaling information for type-I ELMy H-mode plasmas in documentation and model notes
* Write tracker CI job as hatch script * Add run-tracker to hatch scripts
The a > c branch of surface_stress_intensity_factor computed the G22 coefficient as 0.14*(c/a)*1.5 where the published Newman-Raju equation (and the sibling a <= c branch) uses 0.14*(c/a)**1.5 — multiplication in place of exponentiation. Currently benign in outputs because bending_stress is hardcoded to zero so H2 never enters the stress intensity factor, but wrong the moment bending is enabled. Also adds the previously-missing test coverage of the a > c branch, with expected K values computed independently from the Newman-Raju equations (the existing tests only exercised a < c at phi = pi/2). Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* Clarify peak b field error message * Update process/models/pfcoil.py Co-authored-by: clmould <86794332+clmould@users.noreply.github.com> * Update process/models/pfcoil.py Co-authored-by: clmould <86794332+clmould@users.noreply.github.com> --------- Co-authored-by: clmould <86794332+clmould@users.noreply.github.com>
Bumps [actions/deploy-pages](https://github.com/actions/deploy-pages) from 5.0.0 to 5.0.1. - [Release notes](https://github.com/actions/deploy-pages/releases) - [Commits](actions/deploy-pages@cd2ce8f...368f825) --- updated-dependencies: - dependency-name: actions/deploy-pages dependency-version: 5.0.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Updates the requirements on [platformdirs](https://github.com/tox-dev/platformdirs) to permit the latest version. - [Release notes](https://github.com/tox-dev/platformdirs/releases) - [Changelog](https://github.com/tox-dev/platformdirs/blob/main/docs/changelog.rst) - [Commits](tox-dev/platformdirs@4.10.0...4.11.7) --- updated-dependencies: - dependency-name: platformdirs dependency-version: 4.11.7 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump ruff from 0.16.5 to 0.16.6 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.16.5 to 0.16.6. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](astral-sh/ruff@0.16.5...0.16.6) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.16.6 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * update pre-commit --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Clair Mould <86794332+clmould@users.noreply.github.com>
* Update plotly requirement from <7,>=5.15 to >=7.0.0,<8 Updates the requirements on [plotly](https://github.com/plotly/plotly.py) to permit the latest version. - [Release notes](https://github.com/plotly/plotly.py/releases) - [Changelog](https://github.com/plotly/plotly.py/blob/main/CHANGELOG.md) - [Commits](plotly/plotly.py@v5.15.0...v7.0.0) --- updated-dependencies: - dependency-name: plotly dependency-version: 7.0.0 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> * Update pyproject.toml --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: clmould <86794332+clmould@users.noreply.github.com>
* Move data structure to its own class * Fix pre-commit failures * Create data_structure submodule in core
* availability refactor * vertical build refactor * divertor and radial build refactor * missed return * oops * Apply suggestions from code review Co-authored-by: clmould <86794332+clmould@users.noreply.github.com> * code review * Update process/models/build.py * Update process/models/build.py * Update process/models/build.py * fix indentation from github --------- Co-authored-by: clmould <86794332+clmould@users.noreply.github.com>
* Bump ruff from 0.16.4 to 0.16.5 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.16.4 to 0.16.5. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](astral-sh/ruff@0.16.4...0.16.5) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.16.5 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * update ruff --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: james <81617086+je-cook@users.noreply.github.com>
* Use tabulate to output vertical build table * Use tabulate to output radial build table * Format floats to scientific notation
* move data_structure_dicts, obsolete_variables and variable_metadata to process/core/data_structure * rename data_structure_dicts.py to dicts.py
* Bump ruff from 0.16.5 to 0.16.6 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.16.5 to 0.16.6. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](astral-sh/ruff@0.16.5...0.16.6) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.16.6 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * update pre-commit --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Clair Mould <86794332+clmould@users.noreply.github.com>
* Validate the divertor count before the build calculations execute * Update processvalueerror expression * added test to check n_divertors validation is working
Description
Missing variable desriptions have been added to variables in
superconducting.pydata classes.Checklist
I confirm that I have completed the following checks: