|
1 | 1 | import os |
2 | 2 | import sys |
3 | 3 |
|
| 4 | +from pyfracval import __version__, _authors |
| 5 | + |
4 | 6 | # Adjust the path to go up two levels from docs/source/ to the project root |
5 | 7 | sys.path.insert(0, os.path.abspath("../../")) |
6 | 8 |
|
|
12 | 14 | # -- Project information ----------------------------------------------------- |
13 | 15 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information |
14 | 16 |
|
15 | | -project = "pyfracval" |
16 | | -copyright = "2025, aetherspritee, arunoruto" |
17 | | -author = "aetherspritee, arunoruto" |
| 17 | + |
| 18 | +project = name = "PyFracVAL" |
| 19 | +author = _authors |
| 20 | +copyright = f"2025, {_authors}" |
| 21 | +version, release = __version__, __version__.split("+")[0] |
18 | 22 |
|
19 | 23 | # -- General configuration --------------------------------------------------- |
20 | 24 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration |
|
51 | 55 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output |
52 | 56 |
|
53 | 57 | # html_theme = "alabaster" |
54 | | -html_theme = "furo" |
| 58 | +# html_theme = "furo" |
| 59 | +html_theme = "pydata_sphinx_theme" |
55 | 60 | # html_logo = "_static/logo.png" # Optional: Add a logo file to _static/ |
56 | 61 | # html_favicon = "_static/favicon.ico" # Optional: Add a favicon |
57 | 62 | html_static_path = ["_static"] |
58 | 63 |
|
59 | 64 | # Napoleon config |
60 | | -napoleon_google_docstring = True |
61 | | -napoleon_numpy_docstring = True # Can set one to False if you only use one style |
62 | | -napoleon_include_init_with_doc = True # Include __init__ docstrings |
| 65 | +# napoleon_google_docstring = True |
| 66 | +napoleon_numpy_docstring = True |
| 67 | +napoleon_include_init_with_doc = False # Include __init__ docstrings |
63 | 68 | napoleon_include_private_with_doc = False # Usually False |
64 | 69 | napoleon_include_special_with_doc = True |
65 | 70 | napoleon_use_admonition_for_examples = False |
66 | 71 | napoleon_use_admonition_for_notes = False |
67 | 72 | napoleon_use_admonition_for_references = False |
68 | | -napoleon_use_ivar = False |
69 | | -napoleon_use_param = True |
70 | | -napoleon_use_rtype = True |
| 73 | +# napoleon_use_ivar = False |
| 74 | +# napoleon_use_param = True |
| 75 | +# napoleon_use_rtype = True |
71 | 76 | napoleon_preprocess_types = False # Let sphinx-autodoc-typehints handle types |
72 | 77 | napoleon_type_aliases = None |
73 | 78 | napoleon_attr_annotations = True |
74 | 79 |
|
| 80 | +# autodoc |
| 81 | +autoclass_content = "class" |
| 82 | +autodoc_typehints = "none" |
| 83 | +autodoc_default_options = { |
| 84 | + "members": True, |
| 85 | + "member-order": "bysource", |
| 86 | + "undoc-members": True, |
| 87 | + "show-inheritance": True, |
| 88 | +} |
| 89 | +inheritance_alias = {} |
| 90 | + |
75 | 91 | # autoapi |
76 | 92 | autoapi_dirs = ["../../pyfracval"] |
77 | 93 | autoapi_options = [ |
|
94 | 110 | # Process return type hints |
95 | 111 | typehints_document_rtype = True |
96 | 112 | # Don't use napoleon rtype processing, let extension handle it |
97 | | -typehints_use_rtype = False |
| 113 | +# typehints_use_rtype = False |
98 | 114 | # Show default values after comma, 'braces' is other option |
99 | | -typehints_defaults = "comma" |
| 115 | +# typehints_defaults = "comma" |
100 | 116 | # Optional: Simplify representation of complex types like Union[str, Path] |
101 | 117 | # typehints_formatter = lambda annotation, config: repr(annotation) |
| 118 | +always_use_bars_union = True |
102 | 119 |
|
103 | 120 | ## BibTeX Configuration: Tell the extension where your .bib file is: |
104 | 121 | bibtex_bibfiles = ["references.bib"] # Assumes references.bib is in docs/source/ |
|
0 commit comments