Skip to content
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

Fds automatic docs #2562

Merged
merged 16 commits into from
Nov 23, 2023
Merged

Fds automatic docs #2562

merged 16 commits into from
Nov 23, 2023

Conversation

adam-narozniak
Copy link
Member

@adam-narozniak adam-narozniak commented Nov 6, 2023

Issue

Currently, the documentation process is done manually. It is prone to errors by not adding the created code (that might be documented).

Description

The only role of the currently working scripts is just to transform the .rst files into HTML files. The creation of the .rst files is assumed to be manual.

Proposal

Use the sphinx-autosummary to fully automatize the docs building process.

Explanation

sphinx-autosummary enable automatic recursive creation of the .rst files (by filling it with sphinx-autodoc output). It additionally provides a summary table with a one-sentence summary and a link to the documentation. (see picture below).

This PR introduces:

  1. Templates (they dictate how the class and module rst files look like).
  2. Modification of the index file to use autosummary.
  3. Configuration adjustment that
    a. Excludes the test.py files
    b. Dictates how the files look.
    c. Tells that the docs should only follow the code in __all __

Note: this PR does not introduce storing the .rst files with the documentation (and deletes the previous single file)

Preview

Summary tables
image

Documentation page: FederatedDataset
image

Toggle buttons
image

Shortcommings

  • Shows also inheritance from the object class

@adam-narozniak adam-narozniak marked this pull request as ready for review November 16, 2023 09:32
Copy link
Member

@charlesbvll charlesbvll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@danieljanes danieljanes enabled auto-merge (squash) November 23, 2023 10:06
@danieljanes danieljanes merged commit 18c838e into main Nov 23, 2023
29 of 30 checks passed
@danieljanes danieljanes deleted the fds-automatic-docs branch November 23, 2023 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants