|
1 | | -import polartoolkit |
| 1 | +import importlib.metadata |
2 | 2 |
|
3 | 3 | project = "polartoolkit" |
4 | 4 | copyright = "2023, Matt Tankersley" |
5 | 5 | author = "Matt Tankersley" |
6 | | -version = release = polartoolkit.__version__ |
| 6 | +version = release = importlib.metadata.version("polartoolkit") |
| 7 | + |
7 | 8 | extensions = [ |
8 | | - "sphinx.ext.autodoc", # needed for typehints |
9 | | - "sphinx.ext.viewcode", |
| 9 | + "myst_parser", |
| 10 | + "sphinx.ext.autodoc", |
10 | 11 | "sphinx.ext.intersphinx", |
11 | | - "sphinx.ext.napoleon", |
12 | | - "autoapi.extension", |
13 | 12 | "sphinx.ext.mathjax", |
| 13 | + "sphinx.ext.napoleon", |
| 14 | + "sphinx_autodoc_typehints", |
14 | 15 | "sphinx_copybutton", |
15 | | - "myst_parser", |
16 | | - "sphinx_design", |
| 16 | + "sphinx.ext.viewcode", |
17 | 17 | "nbsphinx", |
18 | 18 | "sphinxcontrib.bibtex", |
| 19 | + "sphinx_design", |
19 | 20 | ] |
| 21 | + |
20 | 22 | source_suffix = [".rst", ".md"] |
21 | 23 | exclude_patterns = [ |
22 | 24 | "_build", |
|
29 | 31 |
|
30 | 32 | bibtex_bibfiles = ["_polartoolkit_refs.bib"] |
31 | 33 |
|
32 | | -nbsphinx_execute = "never" |
33 | | - |
34 | 34 | myst_enable_extensions = [ |
35 | 35 | "colon_fence", |
36 | 36 | ] |
|
47 | 47 | "rioxarray": ("https://corteva.github.io/rioxarray/stable/", None), |
48 | 48 | "xrft": ("https://xrft.readthedocs.io/en/stable/", None), |
49 | 49 | "harmonica": ("https://www.fatiando.org/harmonica/latest/", None), |
50 | | - "numba": ("https://numba.pydata.org/numba-doc/latest/", None), |
| 50 | + "numba": ("https://numba.readthedocs.io/en/stable/index.html", None), |
51 | 51 | "scipy": ("https://docs.scipy.org/doc/scipy/", None), |
52 | 52 | "pyvista": ("https://docs.pyvista.org/", None), |
53 | 53 | "pooch": ("https://www.fatiando.org/pooch/latest/", None), |
54 | | - "cartopy": ("https://scitools.org.uk/cartopy/docs/latest/", None), |
| 54 | + "cartopy": ("https://cartopy.readthedocs.io/latest/", None), |
55 | 55 | # "tqdm": ("https://tqdm.github.io/", None), |
56 | 56 | "pygmt": ("https://www.pygmt.org/latest/", None), |
57 | 57 | "matplotlib": ("https://matplotlib.org/stable/", None), |
|
76 | 76 | add_module_names = False |
77 | 77 | add_function_parentheses = False |
78 | 78 |
|
79 | | -# API doc configuration |
80 | | -# ----------------------------------------------------------------------------- |
81 | | -autoapi_dirs = ["../src/polartoolkit"] |
82 | | -autoapi_type = "python" |
83 | | -autoapi_add_toctree_entry = False |
84 | | -autodoc_typehints = "description" |
85 | 79 |
|
| 80 | +nbsphinx_execute = "never" |
| 81 | + |
| 82 | +nbsphinx_execute_arguments = [ |
| 83 | + "--InlineBackend.figure_formats={'png2x'}", |
| 84 | + "--InlineBackend.rc=figure.dpi=96", |
| 85 | +] |
| 86 | + |
| 87 | +nbsphinx_kernel_name = "python3" |
86 | 88 |
|
87 | 89 | # HTML output configuration |
88 | 90 | # ----------------------------------------------------------------------------- |
|
0 commit comments