Skip to content

Commit b7eb55e

Browse files
committed
update docstrings doc generation
1 parent 3cf9607 commit b7eb55e

3 files changed

Lines changed: 434 additions & 156 deletions

File tree

mkdocs.yml

Lines changed: 54 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ site_name: Federated Learning Demonstrator
55

66
repo_name: fl-demonstrator
77
repo_url: https://github.com/DLR-KI/fl-demonstrator
8-
#edit_uri: blob/main/docs/
8+
edit_uri: edit/main/docs/
99

1010
theme:
1111
name: material
@@ -46,8 +46,9 @@ markdown_extensions:
4646
permalink: true
4747
- pymdownx.arithmatex:
4848
generic: true
49-
#- pymdownx.blocks.tab:
50-
# alternate_style: true
49+
- pymdownx.blocks.details
50+
- pymdownx.blocks.tab:
51+
alternate_style: true
5152
- pymdownx.details
5253
- pymdownx.emoji:
5354
emoji_index: !!python/name:material.extensions.emoji.twemoji
@@ -63,28 +64,71 @@ markdown_extensions:
6364

6465
plugins:
6566
- search
66-
- portray
67+
- coverage:
68+
html_report_dir: build/htmlcov
69+
# - autorefs
70+
- api-autonav:
71+
# https://github.com/tlambert03/mkdocs-api-autonav?tab=readme-ov-file#configuration
72+
modules: ["fl_server", "fl_server_ai", "fl_server_api", "fl_server_core"]
73+
exclude_private: true
74+
- mkdocstrings:
75+
enabled: !ENV [MKDOCSTRINGS_ENABLED, true]
76+
handlers:
77+
python:
78+
inventories:
79+
- url: https://docs.python.org/3/objects.inv
80+
domains: [std, py]
81+
- https://typing-extensions.readthedocs.io/en/latest/objects.inv
82+
options:
83+
# https://mkdocstrings.github.io/python/usage/configuration/general/
84+
# general
85+
backlinks: tree
86+
show_inheritance_diagram: true
87+
# headings
88+
heading_level: 2
89+
parameter_headings: true
90+
show_root_heading: true
91+
show_category_heading: true
92+
show_symbol_type_heading: true
93+
show_symbol_type_toc: true
94+
# members
95+
summary: true
96+
# docstring
97+
#docstring_style: google
98+
#docstring_section_style: table
99+
show_if_no_docstring: true
100+
# signatures
101+
line_length: 80
102+
modernize_annotations: true
103+
show_signature_annotations: true
104+
separate_signature: true
105+
show_overloads: true
106+
signature_crossrefs: true
107+
- minify:
108+
minify_html: !ENV [DEPLOY, false]
109+
htmlmin_opts:
110+
remove_comments: true
67111

68112
extra:
69113
social:
70114
- icon: dlr-logo
71115
link: https://www.dlr.de/en
72116
- icon: dlr-ki
73-
link: https://www.dlr.de/ki/en
117+
link: https://www.dlr.de/en/ki
74118
- icon: fontawesome/brands/square-github
75-
link: https://github.com/DLR-KI/fl-demonstrator
119+
link: https://github.com/DLR-KI
76120

77121
extra_javascript:
78-
- https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.7/katex.min.js
79-
- https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.7/contrib/auto-render.min.js
122+
- https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.js
123+
- https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/contrib/auto-render.min.js
80124
- javascripts/katex.js
81125

82126
extra_css:
83-
- https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.7/katex.min.css
127+
- https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.css
84128
- styles/style.css
85129

86130
copyright: |
87-
© 2024
131+
© 2026
88132
<a href="https://www.dlr.de/en/ki/about-us/departments/algorithms-hybrid-solutions" target="_blank" rel="noopener">
89133
DLR KI ALG
90134
</a>

pyproject.toml

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -135,29 +135,39 @@ dependencies = [ # Optional
135135
# projects.
136136
[project.optional-dependencies] # Optional
137137
dev = [
138-
"pre-commit~=4.5.1",
139-
"reuse~=6.2.0",
140-
"tox~=4.50.3",
138+
"pre-commit",
139+
"reuse",
140+
"tox",
141+
"uv",
141142
]
142143
test = [
143-
"autopep8~=2.3.2",
144-
"coverage~=7.13.5",
145-
"flake8~=7.3.0",
146-
"flake8-pyproject~=1.2.3",
147-
"licensecheck", # no version, install latest version
148-
"mypy~=1.19.1",
149-
"pytest-django~=4.12.0",
150-
"responses~=0.26.0 ",
151-
"shellcheck-py~=0.11.0.1",
144+
"autopep8",
145+
"coverage",
146+
"flake8",
147+
"flake8-pyproject",
148+
"licensecheck",
149+
"mypy",
150+
"pytest-django",
151+
"responses",
152+
"shellcheck-py",
152153
]
153154
stubs = [
154-
"celery-types~=0.26.0",
155-
"types-requests~=2.32.4.20260107",
156-
"types-tabulate~=0.10.0.20260308",
155+
"celery-types",
156+
"types-requests",
157+
"types-tabulate",
157158
]
158159
doc = [
159-
"portray @ git+https://github.com/HeinrichAD/portray.git@v1.8.0-dev",
160-
#"plantuml-markdown~=3.9.2", # post-install: cp plantuml_markdown.py into markdown/extensions
160+
"mkdocs",
161+
"mkdocs-awesome-pages-plugin",
162+
"mkdocs-git-revision-date-localized-plugin",
163+
"mkdocs-material",
164+
"mkdocs-video",
165+
"mkdocs-minify-plugin",
166+
"mkdocs-api-autonav",
167+
"mkdocstrings",
168+
"mkdocstrings-python",
169+
"pymdown-extensions",
170+
"mkdocs-coverage>=2.0.0",
161171
]
162172
all = ["fl-demonstrator[dev,test,stubs,doc]"]
163173

0 commit comments

Comments
 (0)