Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • ketos ketos
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 27
    • Issues 27
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • public_projects
  • ketosketos
  • Wiki
  • Sphinx Documentation guides

Sphinx Documentation guides · Changes

Page history
Update Sphinx Documentation guides authored Jun 10, 2022 by Bruno Padovese's avatar Bruno Padovese
Hide whitespace changes
Inline Side-by-side
Sphinx-Documentation-guides.md
View page @ ccd9eb75
......@@ -31,4 +31,10 @@ I had to slightly alter the sphinx autosummary templates for class.rst and base.
However for us the developers it will make future documentation harder as we need to manually write the name of the new function or class in order for autosummary to detect it.
There is an optional parameter called :recursive: that we could add to the autossumary that in theory would travel through the entire project structure and create a stub page for everything without us having to manually insert anything. In fact, in theory, we would only need the root index.rst folder and autossumary would find all the functions nad classes in all submodules automatically. I couldnt get this to work, but if anyone wants to spend some time with it: https://www.sphinx-doc.org/en/master/usage/extensions/autosummary.html
4. We should be careful with imported docstrings from overridden methods from other modules. For instance all our NN have a method called call(). this is a method that we override from tf.keras.Model and we didnt have any docstring for it. What sphinx does is it will use instead the original docs from tensorflow, which have a different styling from ours, and thus breaking the styling. I had to manually copy the docs from tensorflow and add it as a docstring with the proper formatting. Sphinx should give an error when this happens though.
\ No newline at end of file
4. We should be careful with imported docstrings from overridden methods from other modules. For instance all our NN have a method called call(). this is a method that we override from tf.keras.Model and we didnt have any docstring for it. What sphinx does is it will use instead the original docs from tensorflow, which have a different styling from ours, and thus breaking the styling. I had to manually copy the docs from tensorflow and add it as a docstring with the proper formatting. Sphinx should give an error when this happens though.
Usefull tips:
1. To escape special characters use \
2. To create a link to another function create use :meth:`my.function.path` and not :func:
\ No newline at end of file
Clone repository
  • Home
  • New release instructions
  • Sphinx Documentation guides