|
16 | 16 |
|
17 | 17 |
|
18 | 18 | # -- Project information ----------------------------------------------------- |
| 19 | +import os |
| 20 | +import sys |
| 21 | + |
| 22 | +# Add project root to Python path |
| 23 | +sys.path.insert(0, os.path.abspath('..')) |
19 | 24 |
|
20 | 25 | project = 'fma_ions' |
21 | 26 | copyright = '2025, Elias Waagaard' |
22 | 27 | author = 'Elias Waagaard' |
23 | 28 |
|
| 29 | +# The full version, including alpha/beta/rc tags |
| 30 | +from fma_ions import __version__ |
| 31 | +release = __version__ |
| 32 | +version = '.'.join(release.split('.')[:2]) # Short X.Y version |
24 | 33 |
|
25 | 34 | # -- General configuration --------------------------------------------------- |
26 | | - |
27 | 35 | # 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. |
| 36 | +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
30 | 37 | extensions = [ |
| 38 | + 'sphinx.ext.autodoc', |
| 39 | + 'sphinx.ext.napoleon', |
| 40 | + 'sphinx.ext.mathjax', |
| 41 | + 'sphinx.ext.viewcode', |
| 42 | + 'sphinx.ext.intersphinx', |
| 43 | + 'sphinx.ext.autosummary', |
| 44 | + 'autoapi.extension', |
| 45 | + 'sphinx_rtd_theme', |
31 | 46 | ] |
32 | 47 |
|
| 48 | +# AutoAPI configuration |
| 49 | +autoapi_type = 'python' |
| 50 | +autoapi_dirs = ['../fma_ions'] |
| 51 | +autoapi_ignore = ['*/tests/*', '*/data/*'] |
| 52 | +autoapi_options = [ |
| 53 | + 'members', |
| 54 | + 'undoc-members', |
| 55 | + 'show-inheritance', |
| 56 | + 'show-module-summary', |
| 57 | + 'special-members', |
| 58 | + 'imported-members', |
| 59 | +] |
| 60 | + |
| 61 | +# Add any paths that contain templates here, relative to this directory. |
| 62 | +templates_path = ['_templates'] |
| 63 | + |
| 64 | +# List of patterns, relative to source directory, that match files and |
| 65 | +# directories to ignore when looking for source files. |
| 66 | +# This pattern also affects html_static_path and html_extra_path. |
| 67 | +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] |
| 68 | + |
| 69 | +# -- Options for HTML output ------------------------------------------------- |
| 70 | +html_theme = 'sphinx_rtd_theme' |
| 71 | + |
| 72 | +# Add any paths that contain custom static files (such as style sheets) here, |
| 73 | +# relative to this directory. They are copied after the builtin static files, |
| 74 | +# so a file named "default.css" will overwrite the builtin "default.css". |
| 75 | +html_static_path = ['_static'] |
| 76 | + |
| 77 | +# -- Extension configuration ------------------------------------------------- |
| 78 | +# Intersphinx configuration |
| 79 | +intersphinx_mapping = { |
| 80 | + 'python': ('https://docs.python.org/3', None), |
| 81 | + 'numpy': ('https://numpy.org/doc/stable/', None), |
| 82 | + 'matplotlib': ('https://matplotlib.org/stable/', None), |
| 83 | +} |
| 84 | + |
33 | 85 | # Add any paths that contain templates here, relative to this directory. |
34 | 86 | templates_path = ['_templates'] |
35 | 87 |
|
|
44 | 96 | # The theme to use for HTML and HTML Help pages. See the documentation for |
45 | 97 | # a list of builtin themes. |
46 | 98 | # |
47 | | -html_theme = 'alabaster' |
| 99 | +html_theme = 'sphinx_rtd_theme' |
| 100 | +#'alabaster' |
48 | 101 |
|
49 | 102 | # Add any paths that contain custom static files (such as style sheets) here, |
50 | 103 | # relative to this directory. They are copied after the builtin static files, |
|
0 commit comments