|
4 | 4 |
|
5 | 5 | import gurobipy_pandas
|
6 | 6 |
|
7 |
| -# -- Project information ----------------------------------------------------- |
8 |
| - |
9 |
| - |
10 | 7 | project = "gurobipy-pandas"
|
11 | 8 | author = "Gurobi Optimization, LLC"
|
12 | 9 | copyright = "Gurobi Optimization, LLC"
|
13 |
| -html_title = "gurobipy-pandas documentation" |
14 | 10 |
|
15 | 11 | version = gurobipy_pandas.__version__
|
16 | 12 | release = version
|
17 | 13 |
|
18 |
| -# -- General configuration --------------------------------------------------- |
| 14 | +html_title = f"gurobipy-pandas documentation v{release}" |
19 | 15 |
|
20 | 16 | extensions = [
|
21 | 17 | "nbsphinx",
|
|
63 | 59 | "ghsrc": ("https://github.com/Gurobi/gurobipy-pandas/tree/main/%s", "%s"),
|
64 | 60 | }
|
65 | 61 |
|
66 |
| -# -- numpydoc magic linking |
67 |
| - |
| 62 | +# Add shorthand and keyword ignores for numpydoc |
68 | 63 | numpydoc_xref_param_type = True
|
69 | 64 | numpydoc_xref_aliases = {
|
70 | 65 | "DataFrame": "pandas.DataFrame",
|
|
74 | 69 | numpydoc_xref_ignore = {"optional", "or", "of"}
|
75 | 70 | numpydoc_class_members_toctree = False
|
76 | 71 |
|
77 |
| -# -- Options for EPUB output |
78 |
| - |
79 |
| -epub_show_urls = "footnote" |
80 |
| - |
81 |
| -# -- Note pointing to notebook downloads |
82 |
| - |
| 72 | +# Add a note pointing to notebook downloads in notebook headers |
83 | 73 | nbsphinx_prolog = """
|
84 | 74 |
|
85 | 75 | .. note::
|
|
89 | 79 |
|
90 | 80 | """
|
91 | 81 |
|
92 |
| -# Customisation for Furo/gurobi-sphinxtheme |
93 |
| - |
94 |
| -html_sidebars = { |
95 |
| - "**": [ |
96 |
| - "sidebar/brand.html", |
97 |
| - "sidebar/search.html", |
98 |
| - "sidebar/scroll-start.html", |
99 |
| - "sidebar/navigation.html", |
100 |
| - "sidebar/scroll-end.html", |
101 |
| - ], |
102 |
| -} |
103 |
| - |
104 |
| -# Customisation for readthedocs |
105 |
| - |
106 | 82 | if os.environ.get("READTHEDOCS", "") == "True":
|
107 |
| - # Date needed by Furo theme to enable icons/links/etc |
| 83 | + # Data needed by Furo theme to enable icons/links/etc |
108 | 84 | html_context = {
|
109 | 85 | "READTHEDOCS": True,
|
110 | 86 | "github_user": "Gurobi",
|
|
114 | 90 | "conf_py_path": "/docs/source/",
|
115 | 91 | }
|
116 | 92 |
|
117 |
| - # Set the canonical URL to point to the stable version docs |
| 93 | + # Set the canonical URL to always point to the stable version docs |
118 | 94 | rtd_version = os.environ.get("READTHEDOCS_VERSION")
|
119 | 95 | rtd_url = os.environ.get("READTHEDOCS_CANONICAL_URL")
|
120 | 96 | html_baseurl = rtd_url.replace(rtd_version, "stable")
|
| 97 | + |
| 98 | + |
| 99 | +html_theme_options = { |
| 100 | + # Add Gurobi and Github icons to the footer |
| 101 | + "footer_icons": [ |
| 102 | + { |
| 103 | + "name": "GitHub", |
| 104 | + "url": "https://www.gurobi.com", |
| 105 | + "html": """ |
| 106 | + <svg id="Layer_2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128.5 127.5"><defs><style>.cls-1{fill:#ed3424;}.cls-2{fill:#c61814;}.cls-3{fill:#22222c;}</style></defs><g id="Layer_2-2"><polygon class="cls-2" points="94.5 6.86 59.08 0 12.07 30.33 74.92 49.88 94.5 6.86"/><polygon class="cls-1" points="9.3 34.11 6.36 53.16 0 94.45 77.03 121.14 95.78 127.64 74.33 54.35 9.3 34.11"/><polygon class="cls-2" points="97.79 10.33 78.49 52.75 100.14 126.74 128.5 98.36 97.79 10.33"/></g></svg> |
| 107 | + """, |
| 108 | + "class": "", |
| 109 | + }, |
| 110 | + { |
| 111 | + "name": "GitHub", |
| 112 | + "url": "https://github.com/Gurobi/gurobipy-pandas", |
| 113 | + "html": """ |
| 114 | + <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16"> |
| 115 | + <path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path> |
| 116 | + </svg> |
| 117 | + """, |
| 118 | + "class": "", |
| 119 | + }, |
| 120 | + ], |
| 121 | +} |
0 commit comments