|
6 | 6 | # -- Project information ----------------------------------------------------- |
7 | 7 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information |
8 | 8 |
|
| 9 | +import importlib |
9 | 10 | import os |
10 | 11 | import sys |
11 | 12 |
|
12 | 13 | sys.path.insert(0, os.path.abspath("..")) |
13 | 14 |
|
| 15 | +# Make krum submodules available as top-level imports for autodoc compatibility |
| 16 | +for _mod in ("aggregators", "attacks", "experiments", "native", "tools"): |
| 17 | + sys.modules[_mod] = importlib.import_module(f"krum.{_mod}") |
| 18 | + |
14 | 19 | project = "Krum, the Library" |
15 | 20 | copyright = "2026" |
16 | 21 | author = "Peva BLANCHARD, Arthur DANJOU, El-Mahdi EL-MHAMDI, Sébastien ROUAULT, Mohammed Ammar SAID" |
|
30 | 35 | "sphinx.ext.intersphinx", |
31 | 36 | "sphinx_favicon", |
32 | 37 | "sphinx_togglebutton", |
33 | | - "sphinx_contributors" |
| 38 | + "sphinx_contributors", |
34 | 39 | ] |
35 | 40 |
|
| 41 | + |
36 | 42 | def linkcode_resolve(domain, info): |
37 | 43 | """Return a URL to the source code on GitHub for the given object.""" |
38 | 44 | if domain != "py": |
@@ -90,9 +96,7 @@ def linkcode_resolve(domain, info): |
90 | 96 |
|
91 | 97 |
|
92 | 98 | # Use MathJax to render math in HTML |
93 | | -mathjax_path = ( |
94 | | - "https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-AMS-MML_HTMLorMML" |
95 | | -) |
| 99 | +mathjax_path = "https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-AMS-MML_HTMLorMML" |
96 | 100 |
|
97 | 101 | exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] |
98 | 102 |
|
@@ -158,7 +162,7 @@ def linkcode_resolve(domain, info): |
158 | 162 | { |
159 | 163 | "title": "How to add a custom dataset", |
160 | 164 | "url": "how-to/add-custom-dataset", |
161 | | - } |
| 165 | + }, |
162 | 166 | ], |
163 | 167 | }, |
164 | 168 | { |
|
0 commit comments