-
Notifications
You must be signed in to change notification settings - Fork 25
Create Markdown Operator Docs #2019
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?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #2019 +/- ##
==========================================
- Coverage 84.02% 83.71% -0.32%
==========================================
Files 90 90
Lines 10303 10303
==========================================
- Hits 8657 8625 -32
- Misses 1646 1678 +32 |
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.
Hi @ansMHanmer, just a few suggestions.
Also, do you know if we could set some of the properties as Markdown metadata?
I think this is what we will use to allow for tagging and filtering of operators in the final documentation.
Not sure if we want to use MultiMarkdown Metadata or YAML Front Matter or something else.
Thanks for the suggestions, working away at them. Yes, we can set some of the properties as Markdown metadata, and it's probably best to use YAML Front Matter based on some research, so I'll go with that. If we find we need to use MultiMarkdown I can easily switch. @PProfizi - which properties would you want to see in the metadata? I was about to go implement, but figured it would be best to ask what the desired outcome was first 😄 |
So we are working on actually adding some properties we eventually will want to see as filterable/searchable metadata, but for a first PoC we can use The end-goal would be for example to allow a user to look for operators with |
@PProfizi i've added in the metadata as requested. On another note - I've noticed that quite a few operators were failing to retrieve their info properly because of some apparently missing data. When trying to retrieve
I have added some handling around it so the docs generation can continue, but we're left with very incomplete docs in the cases where this error comes up. Perhaps if there is a certain amount of missing information we log an error and skip the doc for that particular operator. For you to see, it's probably easiest just to try the latest version of the script on your end to see if you can reproduce and provide comment. |
Thanks @ansMHanmer I'll have a look at the issue. |
I've made a MRE which lists failing operators, I'll investigate the error and try to fix it. import ansys.dpf.core as dpf
from ansys.dpf.gate.errors import DPFServerException
failing = []
for operator_name in dpf.available_operator_names():
op = dpf.dpf_operator.Operator(operator_name) # "mapdl::cms_deprecated::EEL"
spec = op.specification
try:
_ = spec.config_specification
except DPFServerException as e:
failing.append(operator_name)
print(sorted(failing))
print(len(failing))
assert len(failing) == 0 |
Hi @ansMHanmer, turns out the issue is that these operators do not have a specification to start with. |
Thanks for taking a look @PProfizi - and the change you made in #2107 seems to work well on my side! |
.ci/generate_operators_doc.py
and templatedoc/source/operators_doc/operator_doc_template.md