|
6 | 6 |
|
7 | 7 | # -- Path setup -------------------------------------------------------------- |
8 | 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 | | - |
14 | | - |
15 | 9 | import os |
16 | 10 | import sys |
17 | 11 |
|
18 | 12 | from sphinx.ext.autodoc.importer import import_module |
19 | | -print(f"### Appended path: {os.path.abspath('../../')}") |
20 | | -sys.path.insert(0, os.path.abspath('../../')) |
21 | | -pysplashsurf = import_module('pysplashsurf') |
| 13 | + |
| 14 | +# Verify that the generated stub file exists |
| 15 | +stub_path = os.path.abspath("../../pysplashsurf.pyi") |
| 16 | +if not os.path.exists(stub_path): |
| 17 | + print(f"### Error: Stub file not found at {stub_path}. Please ensure stub_gen produced pysplashsurf.pyi.") |
| 18 | + sys.exit(1) |
| 19 | + |
| 20 | +# Import the stub file |
| 21 | +print(f"### Prepend to path: {os.path.abspath('../../')}") |
| 22 | +sys.path.insert(0, os.path.abspath("../../")) |
| 23 | +pysplashsurf = import_module("pysplashsurf") |
22 | 24 |
|
23 | 25 | #import pysplashsurf |
24 | 26 |
|
25 | 27 | # -- Project information ----------------------------------------------------- |
26 | 28 |
|
27 | | -project = 'pySplashsurf' |
28 | | -copyright = '2025, Interactive Computer Graphics' |
29 | | -author = 'Interactive Computer Graphics' |
| 29 | +project = "pySplashsurf" |
| 30 | +copyright = "2025, Interactive Computer Graphics" |
| 31 | +author = "Interactive Computer Graphics" |
30 | 32 |
|
31 | 33 |
|
32 | 34 | # -- General configuration --------------------------------------------------- |
|
35 | 37 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
36 | 38 | # ones. |
37 | 39 | extensions = [ |
38 | | - 'sphinx.ext.autodoc', |
39 | | - 'sphinx.ext.autosummary', |
40 | | - 'sphinx.ext.napoleon', |
41 | | - 'numpydoc', |
42 | | - 'myst_parser', |
43 | | - 'sphinx_rtd_theme', |
44 | | - #'sphinx_autodoc_typehints' |
| 40 | + "sphinx.ext.autodoc", |
| 41 | + "sphinx.ext.autosummary", |
| 42 | + "sphinx.ext.napoleon", |
| 43 | + "numpydoc", |
| 44 | + "myst_parser", |
| 45 | + "sphinx_rtd_theme", |
| 46 | + #'sphinx_autodoc_typehints' |
45 | 47 | ] |
46 | 48 |
|
47 | | -source_suffix = ['.rst', '.md'] |
| 49 | +source_suffix = [".rst", ".md"] |
48 | 50 |
|
49 | 51 | numpydoc_class_members_toctree = False |
50 | 52 |
|
51 | 53 | # Add any paths that contain templates here, relative to this directory. |
52 | | -templates_path = ['_templates'] |
| 54 | +templates_path = ["_templates"] |
53 | 55 |
|
54 | 56 | # List of patterns, relative to source directory, that match files and |
55 | 57 | # directories to ignore when looking for source files. |
|
62 | 64 | # The theme to use for HTML and HTML Help pages. See the documentation for |
63 | 65 | # a list of builtin themes. |
64 | 66 | # |
65 | | -html_theme = 'sphinx_rtd_theme' |
| 67 | +html_theme = "sphinx_rtd_theme" |
66 | 68 |
|
67 | 69 | # Add any paths that contain custom static files (such as style sheets) here, |
68 | 70 | # relative to this directory. They are copied after the builtin static files, |
|
73 | 75 |
|
74 | 76 | always_document_param_types = True |
75 | 77 | always_use_bars_union = True |
76 | | -#typehints_document_rtype = False |
77 | | -#typehints_use_rtype = False |
78 | | -#typehints_use_signature = True |
79 | | -#typehints_use_signature_return = True |
| 78 | +# typehints_document_rtype = False |
| 79 | +# typehints_use_rtype = False |
| 80 | +# typehints_use_signature = True |
| 81 | +# typehints_use_signature_return = True |
0 commit comments