-
Notifications
You must be signed in to change notification settings - Fork 139
Mapdl.info property #1073
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
Mapdl.info property #1073
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1073 +/- ##
==========================================
+ Coverage 71.88% 73.01% +1.12%
==========================================
Files 43 43
Lines 6147 6381 +234
==========================================
+ Hits 4419 4659 +240
+ Misses 1728 1722 -6 |
I feel that an attributes or data class would be better here. That allows code inspection via IDEs. We could then move some attributes, like directory, result_filename, to this class. We can also add a simple |
Using now class attributes. There is a lot of work to do with the
But I do not have time. If there is interest, I will allocate time. |
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.
Overall, I agree with the API. Let's add documentation (both docstrings and update the sphinx docs).
Honestly, this is begging to a simple dict. We can start with that and automate the API. Better, you can look at the source and auto generate the data"ish" class from that. |
Adding code review suggestions
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.
LGTM. Thanks!
* Defining 'Information' class * Implementing 'Information' class * Adding unit tests * Improving coverage * Fixing unit tests. * Fixing unit tests * fixing unit tests * fixing unit tests * Adding extra field getters * Adding mapping to /status command, unit tests and documentation. * Using a pure class instead of a dict. * removing previous test. * removing previous test. * Adding title and stitles method. Adding code review suggestions * Adding docs and unit tests * Adding docs and unit tests * Fixing unit test. * Fixing unit tests * Removing most setters. * Fixing unit tests
This class provide some MAPDL information in a "dict-like" manner.
It is also the object that is called when you issue "print(mapdl)",
which means it is called by "mapdl.str()".
Notes
You cannot directly modify the values of the keys.
The results are cached for later calls.
Examples