-
Notifications
You must be signed in to change notification settings - Fork 9
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
Improve TypeHints #164
Improve TypeHints #164
Conversation
Codecov Report
@@ Coverage Diff @@
## master #164 +/- ##
=======================================
Coverage 83.78% 83.78%
=======================================
Files 25 25
Lines 1351 1351
=======================================
Hits 1132 1132
Misses 219 219 |
@GuillemBarroso IMO the plan is to homogenize these type of files as much has possible. |
@GuillemBarroso I do not think there is typehinting in PyDPF-Post yet, so the doc might look good now but not when actually using typehints. One thing that could be done is to choose whatever method and add typehinting to it to check how it looks in the doc? |
@PProfizi I see! Could you please point me where I can find a good typehinting example in dpf-core so I can replicate it in dpf-post? Regarding the extensions, I was checking other repos (pymapdl and pyfluent) and they have a different extension that the one that is proposed in the documentation. The documentation proposes "sphinx.ext.autodoc.typehints", but pymapdl and pyfluent have "sphinx_autodoc_typehints", see doc on sphinx_autodoc_typehints. However, I have been trying to include "sphinx_autodoc_typehints" and the documentation file keeps being of size 7KB. |
@GuillemBarroso One of the few examples of where we actually do it in core would be here.
About the documentation failing, for later reference, the documentation generation started failing on 9/24 due to a time-out during sphinx generation. trying to fix this right now. So your problem might not be due to the extension. |
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.
@GuillemBarroso LGTM, still the remark about there not being a lot of typehints in the Post doc to begin with. We'll see how this goes with usage.
Resolves #160.
@PProfizi, note that the extensions are different in conf.py files from dpf-post and dpf-core. I was tempted to add all extensions from dpf-core to dpf-post, but in dpf-post we have 2 that are missing in dpf-core (notfound.extension and sphinx.ext.autosummary). I do not know if this is worth an issue and try to unify the extensions criterion. Thoughts?