-
Notifications
You must be signed in to change notification settings - Fork 77
Documented vmec diagnostics output type, replaced Struct #567
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
base: master
Are you sure you want to change the base?
Documented vmec diagnostics output type, replaced Struct #567
Conversation
…hub.com/jurasic-pf/simsopt into vmec-diagnostics-documented-output-type
|
CI failiures are due to the known issue with SPEC CI |
|
We have disabled SPEC in the github actions in PR 571. |
mishapadidar
left a comment
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 is a really nice PR.
I mostly left small comments. Primarily, I would like to see how the documentation renders the dataclass.
There is a little bit of rewriting left to do in the documentation of the vmec_compute_geometry and VmecGeometryResults now that the attributes will be stored in the dataclass.
|
It's a bit unfortunate that the constructor takes up so much space in the docs, but other than that everything renders nicely now. I used Claude to accelerate generating the docstrings, I'm not familiar with all quantities (especially not the gyrokinetic ones), but checked everything related to coordinates and ideal MHD. |
|
If you want to allow dict like access, we can also add but afaik Struct isn't subscriptable either |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #567 +/- ##
==========================================
+ Coverage 84.89% 85.06% +0.17%
==========================================
Files 83 83
Lines 16291 16458 +167
==========================================
+ Hits 13830 14000 +170
+ Misses 2461 2458 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I agree, the arguments take up quite a bit of space. It seems like we might be able to prevent sphinx from rendering them. Evidently, sphinx looks for the should reduce the signature to |
Whatever you think is best. |
mishapadidar
left a comment
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.
Since we are planning on omitting the arguments in the Sphinx docs, I have added one more minor comment to help users reading the documentation.
After this, I think we can merge.
| @dataclasses.dataclass | ||
| class VmecGeometryResults: | ||
| """ | ||
| A class to hold the output of the :func:`vmec_compute_geometry` and :func:`vmec_fieldlines` functions. |
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.
Since we are no longer using the sphinx signature, perhaps we should add one line to the documentation that discusses this. For example, we could add something like:
The arguments required of this class have been hidden in the Sphinx documentation, since they are extensively long. See the code for vmec_compute_geometry for an example of initializing this class
A first step in addressing issue #547 of vmec_compute_geometry