|
1 | | -# Configuration file for the Sphinx documentation builder. |
2 | | -# |
3 | | -# This file only contains a selection of the most common options. For a full |
4 | | -# list see the documentation: |
5 | | -# https://www.sphinx-doc.org/en/master/usage/configuration.html |
6 | | - |
7 | | -# -- Path setup -------------------------------------------------------------- |
8 | | - |
9 | | -# If extensions (or modules to document with autodoc) are in another directory, |
10 | | -# add these directories to sys.path here. If the directory is relative to the |
11 | | -# documentation root, use os.path.abspath to make it absolute, like shown here. |
12 | | -# |
13 | | -# import os |
14 | | -# import sys |
15 | | -# sys.path.insert(0, os.path.abspath('.')) |
16 | | - |
17 | | - |
18 | | -# -- Project information ----------------------------------------------------- |
| 1 | +import toml |
19 | 2 |
|
20 | 3 | project = "prose" |
21 | 4 | copyright = "2023, Lionel Garcia" |
22 | 5 | author = "Lionel Garcia" |
23 | 6 |
|
24 | | - |
25 | | -# -- General configuration --------------------------------------------------- |
26 | | - |
27 | | -# Add any Sphinx extension module names here, as strings. They can be |
28 | | -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
29 | | -# ones. |
30 | 7 | extensions = [ |
31 | 8 | "myst_nb", |
32 | 9 | "sphinx_copybutton", |
33 | 10 | "sphinx.ext.autodoc", |
34 | 11 | "sphinx.ext.napoleon", |
35 | 12 | "sphinx.ext.autosummary", |
| 13 | + "sphinx.ext.viewcode", |
36 | 14 | "sphinx_design", |
37 | 15 | ] |
38 | 16 |
|
39 | | - |
40 | | -# Add any paths that contain templates here, relative to this directory. |
41 | 17 | templates_path = ["_templates"] |
42 | | - |
43 | | -# List of patterns, relative to source directory, that match files and |
44 | | -# directories to ignore when looking for source files. |
45 | | -# This pattern also affects html_static_path and html_extra_path. |
46 | 18 | exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] |
47 | 19 |
|
48 | 20 |
|
49 | | -# -- Options for HTML output ------------------------------------------------- |
50 | | - |
51 | | -# The theme to use for HTML and HTML Help pages. See the documentation for |
52 | | -# a list of builtin themes. |
53 | | -# |
54 | 21 | html_theme = "sphinx_book_theme" |
55 | | - |
56 | | -# Add any paths that contain custom static files (such as style sheets) here, |
57 | | -# relative to this directory. They are copied after the builtin static files, |
58 | | -# so a file named "default.css" will overwrite the builtin "default.css". |
59 | 22 | html_static_path = ["_static"] |
60 | 23 |
|
61 | | -# Title |
62 | | -# get version number from pyproject.toml |
63 | | -# -------------------------------------- |
64 | | -import toml |
65 | | - |
66 | 24 | pyproject = toml.load("../pyproject.toml") |
67 | 25 | version = pyproject["tool"]["poetry"]["version"] |
68 | 26 | html_short_title = "prose" |
69 | 27 | html_title = f"{html_short_title}" |
70 | | -# ----- |
| 28 | + |
| 29 | +# html_logo = "_static/prose3.png" |
71 | 30 |
|
72 | 31 | source_suffix = { |
73 | 32 | ".rst": "restructuredtext", |
|
152 | 111 | """ |
153 | 112 |
|
154 | 113 | open("md/all_blocks.rst", "w").write(all_blocks) |
155 | | - |
156 | | -# check if blocks are tested |
157 | | -# -------------------------- |
158 | | -# import os |
159 | | - |
160 | | -# from prose.core.block import is_tested |
161 | | -# from prose.utils import get_all_blocks |
162 | | - |
163 | | -# os.chdir("..") |
164 | | -# tested = [] |
165 | | -# tested.append("# Tested blocks\n") |
166 | | -# tested.append("| Block | Tested |") |
167 | | -# tested.append("| ----- | ------ |") |
168 | | -# blocks = get_all_blocks() |
169 | | -# blocks = sorted(blocks, key=lambda block: block.__name__.lower()) |
170 | | - |
171 | | -# for block in blocks: |
172 | | -# _is = is_tested(block.__name__) |
173 | | -# tested.append( |
174 | | -# f" | [`{block.__name__}`]({block.__module__}.{block.__name__}) | {'✅' if _is else '❌'} |" |
175 | | -# ) |
176 | | -# os.chdir("docs") |
177 | | - |
178 | | -# open("./tested_blocks.md", "w").write("\n".join(tested)) |
0 commit comments