|
1 | 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 | 2 | # https://www.sphinx-doc.org/en/master/usage/configuration.html |
6 | 3 |
|
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 | 4 | import os |
14 | 5 | import sys |
15 | 6 |
|
16 | 7 | sys.path.insert(0, os.path.abspath("../src/")) |
17 | 8 |
|
| 9 | +# -- Project information ------------------------------------------------------- |
18 | 10 |
|
19 | | -# -- Project information ----------------------------------------------------- |
20 | | - |
21 | | -project = "ai-python docs" |
22 | | -copyright = "2022, Daniel Ciborowski" |
23 | | -author = "Daniel Ciborowski" |
24 | | - |
25 | | -# The full version, including alpha/beta/rc tags |
| 11 | +project = "openpois" |
| 12 | +copyright = "2024, Nathaniel Henry" |
| 13 | +author = "Nathaniel Henry" |
26 | 14 | release = "0.1.0" |
27 | 15 |
|
| 16 | +# -- General configuration ----------------------------------------------------- |
28 | 17 |
|
29 | | -# -- General configuration --------------------------------------------------- |
30 | | - |
31 | | -# Add any Sphinx extension module names here, as strings. They can be |
32 | | -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
33 | | -# ones. |
34 | 18 | extensions = [ |
35 | 19 | "sphinx.ext.autodoc", |
36 | | - "sphinx.ext.doctest", |
| 20 | + "sphinx.ext.napoleon", |
| 21 | + "sphinx.ext.viewcode", |
37 | 22 | "sphinx.ext.intersphinx", |
38 | | - "sphinx.ext.ifconfig", |
39 | | - "sphinx.ext.viewcode", # Add links to highlighted source code |
40 | | - "sphinx.ext.napoleon", # to render Google format docstrings |
41 | | - "sphinx.ext.githubpages", |
42 | 23 | ] |
43 | 24 |
|
44 | | -# Add any paths that contain templates here, relative to this directory. |
45 | 25 | templates_path = ["_templates"] |
46 | | - |
47 | | -# List of patterns, relative to source directory, that match files and |
48 | | -# directories to ignore when looking for source files. |
49 | | -# This pattern also affects html_static_path and html_extra_path. |
50 | 26 | exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] |
51 | 27 |
|
| 28 | +# Mock heavy imports so Sphinx can parse docstrings without installing the |
| 29 | +# full conda environment in CI. |
| 30 | +autodoc_mock_imports = [ |
| 31 | + "torch", |
| 32 | + "numpy", |
| 33 | + "pandas", |
| 34 | + "geopandas", |
| 35 | + "shapely", |
| 36 | + "fiona", |
| 37 | + "pyosmium", |
| 38 | + "osmium", |
| 39 | + "duckdb", |
| 40 | + "pyiceberg", |
| 41 | + "pyarrow", |
| 42 | + "config_versioned", |
| 43 | + "ngeohash", |
| 44 | + "requests", |
| 45 | + "scipy", |
| 46 | + "matplotlib", |
| 47 | + "sklearn", |
| 48 | + "overturemaps", |
| 49 | + "plotnine", |
| 50 | + "mizani", |
| 51 | +] |
52 | 52 |
|
53 | | -# -- Options for HTML output ------------------------------------------------- |
| 53 | +# Napoleon settings |
| 54 | +napoleon_include_init_with_doc = True |
| 55 | +napoleon_include_private_with_doc = False |
54 | 56 |
|
55 | | -# The theme to use for HTML and HTML Help pages. See the documentation for |
56 | | -# a list of builtin themes. |
57 | | -# |
58 | | -html_theme = "sphinx_rtd_theme" |
| 57 | +# Autodoc settings |
| 58 | +autodoc_default_options = { |
| 59 | + "members": True, |
| 60 | + "undoc-members": True, |
| 61 | + "show-inheritance": True, |
| 62 | +} |
59 | 63 |
|
60 | | -# Add any paths that contain custom static files (such as style sheets) here, |
61 | | -# relative to this directory. They are copied after the builtin static files, |
62 | | -# so a file named "default.css" will overwrite the builtin "default.css". |
63 | | -html_static_path = ["_static"] |
| 64 | +# -- Options for HTML output --------------------------------------------------- |
64 | 65 |
|
65 | | -# Napoleon settings |
66 | | -napoleon_include_init_with_doc = True |
67 | | -napoleon_include_private_with_doc = True |
| 66 | +html_theme = "sphinx_rtd_theme" |
0 commit comments