Skip to content

Commit

Permalink
Add sphinx-autocodelink & intersphinx_mapping (#85)
Browse files Browse the repository at this point in the history
* Add intersphinx mapping

Closes #82

* Add codeautolink

* markdown codeblock syntax needs to be valid

---------

Co-authored-by: Scott Henderson <[email protected]>
  • Loading branch information
dcherian and scottyhq authored Jun 26, 2024
1 parent e4061f2 commit b328b01
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
26 changes: 26 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,13 @@ sphinx:
# maintain old paths and redirect them (so google results dont go to 404)
# https://github.com/wpilibsuite/sphinxext-rediraffe
- sphinxext.rediraffe
- sphinx_codeautolink

config:
language: en # accessibility
# application/vnd.holoviews_load.v0+json, application/vnd.holoviews_exec.v0+json
suppress_warnings: ["mystnb.unknown_mime_type", "misc.highlighting_failure"]
codeautolink_concat_default: True
notfound_context:
body: "<h1>Whoops! 404 Page Not Found</h1>\n\n<p>Sorry, this page doesn't exist. Many sections of this book have been updated recently.</p><p> Try the search box 🔎 to find what you're looking for!</p>"
notfound_urls_prefix: /
Expand All @@ -81,3 +84,26 @@ sphinx:
fundamentals/02.1_working_with_labeled_data.ipynb: fundamentals/02.1_indexing_Basic.ipynb

bibtex_reference_style: author_year # or label, super, \supercite

intersphinx_mapping:
xarray:
- https://docs.xarray.dev/en/latest/
- null
numpy:
- https://numpy.org/doc/stable
- null
scipy:
- https://docs.scipy.org/doc/scipy
- null
matplotlib:
- https://matplotlib.org/stable/
- null
dask:
- https://docs.dask.org/en/latest
- null
python:
- https://docs.python.org/3/
- null
pandas:
- https://pandas.pydata.org/pandas-docs/stable
- null
2 changes: 1 addition & 1 deletion advanced/apply_ufunc/complex-output-numpy.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@
"\n",
"Try applying the minmax function to a 3d air temperature dataset \n",
"```python\n",
"air3d = xr.tutorial.load_dataset(\"air_temperature\").air)\n",
"air3d = xr.tutorial.load_dataset(\"air_temperature\").air\n",
"``` \n",
"Your goal is to have a minimum and maximum value of temperature across all latitudes for a given time and longitude.\n",
"\n",
Expand Down
3 changes: 1 addition & 2 deletions advanced/backends/1.Backend_without_Lazy_Loading.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"\n",
"```python\n",
"setuptools.setup(\n",
" ...\n",
" entry_points={\n",
" 'xarray.backends': ['engine_name=package.module:my_backendentrypoint'],\n",
" },\n",
Expand All @@ -51,7 +50,7 @@
"or pass it in `xr.open_dataset`:\n",
"\n",
"```python\n",
"xr.open_dataset(..., engine=MyBackendEntrypoint)\n",
"xr.open_dataset(filename, engine=MyBackendEntrypoint)\n",
"```"
]
},
Expand Down

0 comments on commit b328b01

Please sign in to comment.