sbi icon indicating copy to clipboard operation
sbi copied to clipboard

Improve documentation website, add automatic API docs

Open janfb opened this issue 1 year ago • 1 comments

Related to #120

More context: we build the docs by manually adding new classes or methods we want show on the website in the API Reference section here: https://github.com/sbi-dev/sbi/blob/main/docs/docs/reference.md

and then setting up the site structure here: https://github.com/sbi-dev/sbi/blob/main/docs/mkdocs.yml

Goals:

  • automation: I am not on top of this, but there seems to be a way of automating this process using the mkdocstring for mkdocs.
  • nicer website: https://sbi-dev.github.io/sbi/reference/ is quite hard to parse at the moment.
    • all API references are dumped into one site
    • there are no headings for the classes / methods

Current state: This PR starts to improve the website structure by moving the reference files into a separate folder, such that they show up as a drop down menu on the left.

To do:

  • [ ] find a way to automate this, see e.g. https://github.com/mackelab/delfi/blob/main/docs/make_autodoc.py, but there might be more recent ways of doing this
  • [ ] find a way to make the website nice, e.g., show sub headings in the API reference like here, http://www.mackelab.org/delfi/reference/distributions/, but without having to add them by hand in the markdown files in our docs/docs/ folder.

@jan-matthis maybe you can help here?

@anyone, please feel free to tackle this PR. I just wanted to give some context and get this going for the hackathon.

janfb avatar Feb 28 '24 15:02 janfb

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 76.08%. Comparing base (c3c2b6e) to head (ad27161).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #964   +/-   ##
=======================================
  Coverage   76.08%   76.08%           
=======================================
  Files          83       83           
  Lines        6361     6361           
=======================================
  Hits         4840     4840           
  Misses       1521     1521           
Flag Coverage Δ
unittests 76.08% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Feb 28 '24 15:02 codecov[bot]

I'm interested in this PR. Will be working on it.

plcrodrigues avatar Mar 19 '24 13:03 plcrodrigues

Seems that this PR was already getting some work done at #1019 but I had not noticed :)

plcrodrigues avatar Mar 19 '24 21:03 plcrodrigues