holoviz-dev / nbsite

Build a tested, sphinx-based website from notebooks
https://nbsite.pyviz.org
BSD 3-Clause "New" or "Revised" License
28 stars 14 forks source link

Fix links from notebooks to notebooks when target notebook is not in the same directory (notebook directive) #298

Closed fohrloop closed 5 months ago

fohrloop commented 5 months ago

This PR attempts to fix

What was done?

The "notebook" directive uses a subclass of nbconvert.preprocessors.PreProcessor called FixNotebookLinks to fix links in Jupyter Notebooks markdown cells. For example

[customization](../getting_started/2-Customization.ipynb) 

should be converted to

[customization]((../getting_started/Customization.rst) 

..if a Customization.rst source file (the file with notebook directive) exists in the ../getting_started/ directory. But if the link target notebook is not in the same directory as the linking notebook, the current version won't create a link, and during sphinx-build myst warns about a missing reference target like this:

WARNING: 'myst' reference target not found: ../getting_started/2-Customization.ipynb
or
WARNING: 'myst' reference target not found: Customization.rst

I'm not completely sure why the first type of warnings were emitted (reference target is .ipynb), but the second type of warning (reference target is .rst file) occurred because in the old implementation the "target" in [some text](target) was replaced completely by the found source (.rst or .md) file. That means that with file structure

📁 examples/
├─📁 user_guide/
│ ├─📄 03-Applying_Customizations.ipynb
│ └─📄 04-Style_Mapping.ipynb
└─📁 getting_started/
  └─📄 2-Customization.ipynb

and

- Here is a link to [customization](../getting_started/2-Customization.ipynb)

in examples/user_guide/03-Applying_Customizations.ipynb one would get

- Here is a link to [customization](Customization.rst)

in the doctree for sphinx, instead of

- Here is a link to [customization](../getting_started/Customization.rst)

In addition to this, any anchors like #spam in [customization](../getting_started/2-Customization.ipynb#spam) would be removed.

This PR fixes those issues by making a

[customization](../getting_started/2-Customization.ipynb#spam)

to be

[customization](../getting_started/2-Customization.rst#spam)
or
[customization](../getting_started/2-Customization.md#spam)
or
[customization](../getting_started/Customization.rst#spam)
or 
[customization](../getting_started/Customization.md#spam)

depending on which of the source files (.rst/.md) is found first, if any.

How to test this?

Testing this is a bit difficult as explained here, but you may install the "bottom-up MWE" from https://github.com/fohrloop/holoviews-issue-6086-mwe and build the docs with

nbsite build --what=html --output=builtdocs --org holoviz --project-name holoviews

Or, after first build (when /docs has the .ipynb files), with

sphinx-build -b html doc/ builtdocs/ -a

Without these changes

With the current nbsite version, one would expect to see a broken link

image

and following warning during build process:

/home/niko/tmp/minimal-doc-error/doc/user_guide/03-Applying_Customizations.ipynb:20003: WARNING: 'myst' reference target not found: Customization.rst

With these changes

One should see:

image

and the build process output should not have the abovementioned reference target not found warning.

About the code

fohrloop commented 5 months ago

Holoviews docs build process before and after the fix. The fix takes 108 warnings away from the logs, so it would be most likely fixing 108 broken links in https://holoviews.org/

Before:

niko@niko-ubuntu-home:~/tmp$ cat holoviews-logs.txt  | grep "WARNING: 'myst' reference target not found" | grep -v "not found: #" | wc -l
155
'myst' warnings before ``` niko@niko-ubuntu-home:~/tmp$ cat holoviews-logs.txt | grep "WARNING: 'myst' reference target not found" | grep -v "not found: #" /home/niko/code/holoviews/doc/gallery/demos/bokeh/dragon_curve.ipynb:10002: WARNING: 'myst' reference target not found: ../../topics/geometry/lsystems.ipynb /home/niko/code/holoviews/doc/gallery/demos/bokeh/dragon_curve.ipynb:40002: WARNING: 'myst' reference target not found: ../../topics/geometry/lsystems.ipynb /home/niko/code/holoviews/doc/gallery/demos/bokeh/iris_splom_example.ipynb:10006: WARNING: 'myst' reference target not found: ../matplotlib/iris_splot_example.ipynb /home/niko/code/holoviews/doc/gallery/demos/bokeh/nyc_airport_connections.ipynb:10004: WARNING: 'myst' reference target not found: ../matplotlib/nyc_taxi_connections.ipynb /home/niko/code/holoviews/doc/gallery/demos/bokeh/nyc_radial_heatmap.ipynb:10004: WARNING: 'myst' reference target not found: ../matplotlib/radial_heatmap.ipynb /home/niko/code/holoviews/doc/gallery/demos/bokeh/step_chart.ipynb:10004: WARNING: 'myst' reference target not found: ../bokeh/step_chart_example.ipynb /home/niko/code/holoviews/doc/gallery/demos/matplotlib/bachelors_degrees_by_gender.ipynb:10006: WARNING: 'myst' reference target not found: ../bokeh/bachelors_degress_by_gender.ipynb /home/niko/code/holoviews/doc/gallery/demos/matplotlib/dragon_curve.ipynb:10002: WARNING: 'myst' reference target not found: ../../topics/geometry/lsystems.ipynb /home/niko/code/holoviews/doc/gallery/demos/matplotlib/dragon_curve.ipynb:40002: WARNING: 'myst' reference target not found: ../../topics/geometry/lsystems.ipynb /home/niko/code/holoviews/doc/gallery/demos/matplotlib/nyc_airport_connections.ipynb:10004: WARNING: 'myst' reference target not found: ../bokeh/nyc_taxi_connections.ipynb /home/niko/code/holoviews/doc/gallery/demos/matplotlib/nyc_radial_heatmap.ipynb:10004: WARNING: 'myst' reference target not found: ../bokeh/radial_heatmap.ipynb /home/niko/code/holoviews/doc/getting_started/2-Customization.ipynb:140004: WARNING: 'myst' reference target not found: Applying_Customizations.rst /home/niko/code/holoviews/doc/getting_started/2-Customization.ipynb:140011: WARNING: 'myst' reference target not found: Applying_Customizations.rst /home/niko/code/holoviews/doc/getting_started/2-Customization.ipynb:230002: WARNING: 'myst' reference target not found: Applying_Customizations.rst /home/niko/code/holoviews/doc/getting_started/2-Customization.ipynb:280002: WARNING: 'myst' reference target not found: Applying_Customizations.rst /home/niko/code/holoviews/doc/getting_started/2-Customization.ipynb:330002: WARNING: 'myst' reference target not found: Applying_Customizations.rst /home/niko/code/holoviews/doc/getting_started/2-Customization.ipynb:340006: WARNING: 'myst' reference target not found: Annotating_Data.rst /home/niko/code/holoviews/doc/getting_started/4-Gridded_Datasets.ipynb:100004: WARNING: 'myst' reference target not found: Applying_Customizations.rst /home/niko/code/holoviews/doc/getting_started/4-Gridded_Datasets.ipynb:140006: WARNING: 'myst' reference target not found: ./5-Live_Data.ipynb /home/niko/code/holoviews/doc/getting_started/4-Gridded_Datasets.ipynb:140006: WARNING: 'myst' reference target not found: Data_Pipelines.rst /home/niko/code/holoviews/doc/getting_started/1-Introduction.ipynb:10009: WARNING: 'myst' reference target not found: ../user_guide/ /home/niko/code/holoviews/doc/getting_started/1-Introduction.ipynb:150004: WARNING: 'myst' reference target not found: Applying_Customizations.rst /home/niko/code/holoviews/doc/getting_started/1-Introduction.ipynb:200002: WARNING: 'myst' reference target not found: 4-Gridded_Datasets.ipynb /home/niko/code/holoviews/doc/getting_started/1-Introduction.ipynb:220006: WARNING: 'myst' reference target not found: Applying_Customizations.rst /home/niko/code/holoviews/doc/getting_started/5-Live_Data.ipynb:240004: WARNING: 'myst' reference target not found: ../reference/index.html#streams /home/niko/code/holoviews/doc/getting_started/5-Live_Data.ipynb:250006: WARNING: 'myst' reference target not found: ../user_guide/17-Dashboards.ipynb /home/niko/code/holoviews/doc/getting_started/5-Live_Data.ipynb:250024: WARNING: 'myst' reference target not found: ../user_guide/ /home/niko/code/holoviews/doc/getting_started/5-Live_Data.ipynb:250024: WARNING: 'myst' reference target not found: ../reference/ /home/niko/code/holoviews/doc/getting_started/5-Live_Data.ipynb:250024: WARNING: 'myst' reference target not found: ../gallery/ /home/niko/code/holoviews/doc/getting_started/3-Tabular_Datasets.ipynb:10007: WARNING: 'myst' reference target not found: ../user_guide/08-Tabular_Datasets.ipynb /home/niko/code/holoviews/doc/reference/containers/bokeh/DynamicMap.ipynb:30002: WARNING: 'myst' reference target not found: ../../../user_guide/06-Building_Composite_Objects.ipynb /home/niko/code/holoviews/doc/reference/containers/bokeh/DynamicMap.ipynb:30002: WARNING: 'myst' reference target not found: Live_Data.rst /home/niko/code/holoviews/doc/reference/containers/bokeh/DynamicMap.ipynb:80004: WARNING: 'myst' reference target not found: Live_Data.rst /home/niko/code/holoviews/doc/reference/containers/bokeh/GridSpace.ipynb:30002: WARNING: 'myst' reference target not found: Building_Composite_Objects.rst /home/niko/code/holoviews/doc/reference/containers/bokeh/HoloMap.ipynb:30002: WARNING: 'myst' reference target not found: Building_Composite_Objects.rst /home/niko/code/holoviews/doc/reference/containers/bokeh/Layout.ipynb:30005: WARNING: 'myst' reference target not found: ../../../user_guide/06-Building_Composite_Objects.ipynb /home/niko/code/holoviews/doc/reference/containers/bokeh/Layout.ipynb:70004: WARNING: 'myst' reference target not found: Composing_Elements.rst /home/niko/code/holoviews/doc/reference/containers/bokeh/NdLayout.ipynb:30002: WARNING: 'myst' reference target not found: Building_Composite_Objects.rst /home/niko/code/holoviews/doc/reference/containers/bokeh/NdOverlay.ipynb:30002: WARNING: 'myst' reference target not found: Building_Composite_Objects.rst /home/niko/code/holoviews/doc/reference/containers/bokeh/NdOverlay.ipynb:90002: WARNING: 'myst' reference target not found: ../../../user_guide/04-Style_Mapping.ipynb#Cycles-and-Palettes /home/niko/code/holoviews/doc/reference/containers/bokeh/Overlay.ipynb:30005: WARNING: 'myst' reference target not found: ../../../user_guide/06-Building_Composite_Objects.ipynb /home/niko/code/holoviews/doc/reference/containers/bokeh/Overlay.ipynb:70004: WARNING: 'myst' reference target not found: Composing_Elements.rst /home/niko/code/holoviews/doc/reference/containers/matplotlib/DynamicMap.ipynb:30002: WARNING: 'myst' reference target not found: ../../../user_guide/06-Building_Composite_Objects.ipynb /home/niko/code/holoviews/doc/reference/containers/matplotlib/DynamicMap.ipynb:30002: WARNING: 'myst' reference target not found: Live_Data.rst /home/niko/code/holoviews/doc/reference/containers/matplotlib/DynamicMap.ipynb:80004: WARNING: 'myst' reference target not found: Live_Data.rst /home/niko/code/holoviews/doc/reference/containers/matplotlib/GridSpace.ipynb:30002: WARNING: 'myst' reference target not found: Building_Composite_Objects.rst /home/niko/code/holoviews/doc/reference/containers/matplotlib/HoloMap.ipynb:30002: WARNING: 'myst' reference target not found: Building_Composite_Objects.rst /home/niko/code/holoviews/doc/reference/containers/matplotlib/Layout.ipynb:30005: WARNING: 'myst' reference target not found: ../../../user_guide/06-Building_Composite_Objects.ipynb /home/niko/code/holoviews/doc/reference/containers/matplotlib/Layout.ipynb:70004: WARNING: 'myst' reference target not found: Composing_Elements.rst /home/niko/code/holoviews/doc/reference/containers/matplotlib/NdLayout.ipynb:30002: WARNING: 'myst' reference target not found: Building_Composite_Objects.rst /home/niko/code/holoviews/doc/reference/containers/matplotlib/NdOverlay.ipynb:30002: WARNING: 'myst' reference target not found: Building_Composite_Objects.rst /home/niko/code/holoviews/doc/reference/containers/matplotlib/NdOverlay.ipynb:90002: WARNING: 'myst' reference target not found: ../../../user_guide/04-Style_Mapping.ipynb#Cycles-and-Palettes /home/niko/code/holoviews/doc/reference/containers/matplotlib/Overlay.ipynb:30005: WARNING: 'myst' reference target not found: ../../../user_guide/06-Building_Composite_Objects.ipynb /home/niko/code/holoviews/doc/reference/containers/matplotlib/Overlay.ipynb:70004: WARNING: 'myst' reference target not found: Composing_Elements.rst /home/niko/code/holoviews/doc/reference/containers/plotly/DynamicMap.ipynb:30002: WARNING: 'myst' reference target not found: ../../../user_guide/06-Building_Composite_Objects.ipynb /home/niko/code/holoviews/doc/reference/containers/plotly/DynamicMap.ipynb:30002: WARNING: 'myst' reference target not found: Live_Data.rst /home/niko/code/holoviews/doc/reference/containers/plotly/DynamicMap.ipynb:80004: WARNING: 'myst' reference target not found: Live_Data.rst /home/niko/code/holoviews/doc/reference/containers/plotly/GridSpace.ipynb:30002: WARNING: 'myst' reference target not found: Building_Composite_Objects.rst /home/niko/code/holoviews/doc/reference/containers/plotly/HoloMap.ipynb:30002: WARNING: 'myst' reference target not found: Building_Composite_Objects.rst /home/niko/code/holoviews/doc/reference/containers/plotly/Layout.ipynb:30005: WARNING: 'myst' reference target not found: ../../../user_guide/06-Building_Composite_Objects.ipynb /home/niko/code/holoviews/doc/reference/containers/plotly/Layout.ipynb:70004: WARNING: 'myst' reference target not found: Composing_Elements.rst /home/niko/code/holoviews/doc/reference/containers/plotly/NdLayout.ipynb:30002: WARNING: 'myst' reference target not found: Building_Composite_Objects.rst /home/niko/code/holoviews/doc/reference/containers/plotly/NdOverlay.ipynb:30002: WARNING: 'myst' reference target not found: Building_Composite_Objects.rst /home/niko/code/holoviews/doc/reference/containers/plotly/NdOverlay.ipynb:90002: WARNING: 'myst' reference target not found: ../../../user_guide/04-Style_Mapping.ipynb#Cycles-and-Palettes /home/niko/code/holoviews/doc/reference/containers/plotly/Overlay.ipynb:30005: WARNING: 'myst' reference target not found: ../../../user_guide/06-Building_Composite_Objects.ipynb /home/niko/code/holoviews/doc/reference/containers/plotly/Overlay.ipynb:70004: WARNING: 'myst' reference target not found: Composing_Elements.rst /home/niko/code/holoviews/doc/reference/elements/bokeh/Area.ipynb:30004: WARNING: 'myst' reference target not found: Tabular_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/bokeh/Bars.ipynb:30004: WARNING: 'myst' reference target not found: Tabular_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/bokeh/BoxWhisker.ipynb:30004: WARNING: 'myst' reference target not found: Tabular_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/bokeh/Contours.ipynb:30002: WARNING: 'myst' reference target not found: ../user_guide/Geometry_Data.ipynb /home/niko/code/holoviews/doc/reference/elements/bokeh/Curve.ipynb:30002: WARNING: 'myst' reference target not found: Tabular_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/bokeh/ErrorBars.ipynb:30004: WARNING: 'myst' reference target not found: Tabular_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/bokeh/HSV.ipynb:30010: WARNING: 'myst' reference target not found: Gridded_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/bokeh/Image.ipynb:30002: WARNING: 'myst' reference target not found: Continuous_Coordinates.ipynb /home/niko/code/holoviews/doc/reference/elements/bokeh/Image.ipynb:30010: WARNING: 'myst' reference target not found: Gridded_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/bokeh/ImageStack.ipynb:30018: WARNING: 'myst' reference target not found: Gridded_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/bokeh/Labels.ipynb:30002: WARNING: 'myst' reference target not found: ../../../user_guide/08-Tabular_Datasets.ipynb /home/niko/code/holoviews/doc/reference/elements/bokeh/Labels.ipynb:30002: WARNING: 'myst' reference target not found: Gridded_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/bokeh/Path.ipynb:30002: WARNING: 'myst' reference target not found: ../user_guide/Geometry_Data.ipynb /home/niko/code/holoviews/doc/reference/elements/bokeh/QuadMesh.ipynb:30010: WARNING: 'myst' reference target not found: Gridded_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/bokeh/RGB.ipynb:30010: WARNING: 'myst' reference target not found: Gridded_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/bokeh/Rectangles.ipynb:50002: WARNING: 'myst' reference target not found: Style_Mapping.rst /home/niko/code/holoviews/doc/reference/elements/bokeh/Spread.ipynb:30002: WARNING: 'myst' reference target not found: Tabular_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/bokeh/Table.ipynb:130002: WARNING: 'myst' reference target not found: Tabular_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/bokeh/Violin.ipynb:30004: WARNING: 'myst' reference target not found: Tabular_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/matplotlib/Area.ipynb:30004: WARNING: 'myst' reference target not found: Tabular_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/matplotlib/Bars.ipynb:30004: WARNING: 'myst' reference target not found: Tabular_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/matplotlib/BoxWhisker.ipynb:30004: WARNING: 'myst' reference target not found: Tabular_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/matplotlib/Contours.ipynb:30002: WARNING: 'myst' reference target not found: ../user_guide/Geometry_Data.ipynb /home/niko/code/holoviews/doc/reference/elements/matplotlib/Curve.ipynb:30002: WARNING: 'myst' reference target not found: Tabular_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/matplotlib/ErrorBars.ipynb:30004: WARNING: 'myst' reference target not found: Tabular_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/matplotlib/HSV.ipynb:30010: WARNING: 'myst' reference target not found: Gridded_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/matplotlib/Image.ipynb:30002: WARNING: 'myst' reference target not found: Continuous_Coordinates.ipynb /home/niko/code/holoviews/doc/reference/elements/matplotlib/Image.ipynb:30010: WARNING: 'myst' reference target not found: Gridded_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/matplotlib/ImageStack.ipynb:30018: WARNING: 'myst' reference target not found: Gridded_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/matplotlib/Labels.ipynb:30002: WARNING: 'myst' reference target not found: ../../../user_guide/08-Tabular_Datasets.ipynb /home/niko/code/holoviews/doc/reference/elements/matplotlib/Labels.ipynb:30002: WARNING: 'myst' reference target not found: Gridded_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/matplotlib/Path.ipynb:30002: WARNING: 'myst' reference target not found: ../user_guide/Geometry_Data.ipynb /home/niko/code/holoviews/doc/reference/elements/matplotlib/Path3D.ipynb:30002: WARNING: 'myst' reference target not found: ../user_guide/Geometry_Data.ipynb /home/niko/code/holoviews/doc/reference/elements/matplotlib/QuadMesh.ipynb:30010: WARNING: 'myst' reference target not found: Gridded_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/matplotlib/RGB.ipynb:30010: WARNING: 'myst' reference target not found: Gridded_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/matplotlib/Rectangles.ipynb:50002: WARNING: 'myst' reference target not found: Style_Mapping.rst /home/niko/code/holoviews/doc/reference/elements/matplotlib/Spread.ipynb:30002: WARNING: 'myst' reference target not found: Tabular_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/matplotlib/Table.ipynb:130002: WARNING: 'myst' reference target not found: Tabular_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/matplotlib/Violin.ipynb:30004: WARNING: 'myst' reference target not found: Tabular_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/plotly/Area.ipynb:30004: WARNING: 'myst' reference target not found: Tabular_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/plotly/Bars.ipynb:30004: WARNING: 'myst' reference target not found: Tabular_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/plotly/BoxWhisker.ipynb:30004: WARNING: 'myst' reference target not found: Tabular_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/plotly/Curve.ipynb:30002: WARNING: 'myst' reference target not found: Tabular_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/plotly/ErrorBars.ipynb:30004: WARNING: 'myst' reference target not found: Tabular_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/plotly/Image.ipynb:30002: WARNING: 'myst' reference target not found: Continuous_Coordinates.ipynb /home/niko/code/holoviews/doc/reference/elements/plotly/ImageStack.ipynb:30018: WARNING: 'myst' reference target not found: Gridded_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/plotly/Path3D.ipynb:30002: WARNING: 'myst' reference target not found: ../user_guide/Geometry_Data.ipynb /home/niko/code/holoviews/doc/reference/elements/plotly/Points.ipynb:90002: WARNING: 'myst' reference target not found: Bokeh_Backend /home/niko/code/holoviews/doc/reference/elements/plotly/RGB.ipynb:30010: WARNING: 'myst' reference target not found: Gridded_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/plotly/Raster.ipynb:30002: WARNING: 'myst' reference target not found: ./HSV.ipynb /home/niko/code/holoviews/doc/reference/elements/plotly/Spread.ipynb:30002: WARNING: 'myst' reference target not found: Tabular_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/plotly/Table.ipynb:130002: WARNING: 'myst' reference target not found: Tabular_Datasets.rst /home/niko/code/holoviews/doc/reference/elements/plotly/Violin.ipynb:30004: WARNING: 'myst' reference target not found: Tabular_Datasets.rst /home/niko/code/holoviews/doc/user_guide/01-Annotating_Data.ipynb:20002: WARNING: 'myst' reference target not found: Introduction.rst /home/niko/code/holoviews/doc/user_guide/01-Annotating_Data.ipynb:230002: WARNING: 'myst' reference target not found: ./03-Applying_Customizations.ipynb /home/niko/code/holoviews/doc/user_guide/Annotators.ipynb:250004: WARNING: 'myst' reference target not found: ../reference/streams/PolyDraw.ipynb /home/niko/code/holoviews/doc/user_guide/Annotators.ipynb:250004: WARNING: 'myst' reference target not found: ../reference/streams/PolyEdit.ipynb /home/niko/code/holoviews/doc/user_guide/03-Applying_Customizations.ipynb:20002: WARNING: 'myst' reference target not found: ../getting_started/2-Customization.ipynb /home/niko/code/holoviews/doc/user_guide/03-Applying_Customizations.ipynb:30004: WARNING: 'myst' reference target not found: Customization.rst /home/niko/code/holoviews/doc/user_guide/03-Applying_Customizations.ipynb:70006: WARNING: 'myst' reference target not found: Introduction.rst /home/niko/code/holoviews/doc/user_guide/03-Applying_Customizations.ipynb:90002: WARNING: 'myst' reference target not found: Customization.rst /home/niko/code/holoviews/doc/user_guide/03-Applying_Customizations.ipynb:110008: WARNING: 'myst' reference target not found: Customization.rst /home/niko/code/holoviews/doc/user_guide/03-Applying_Customizations.ipynb:240010: WARNING: 'myst' reference target not found: Plots_and_Renderers.ipynb#Saving-and-rendering /home/niko/code/holoviews/doc/user_guide/03-Applying_Customizations.ipynb:410018: WARNING: 'myst' reference target not found: Customization.rst /home/niko/code/holoviews/doc/user_guide/03-Applying_Customizations.ipynb:600010: WARNING: 'myst' reference target not found: Bokeh_Backend /home/niko/code/holoviews/doc/user_guide/06-Building_Composite_Objects.ipynb:130002: WARNING: 'myst' reference target not found: ./01-Annotating_Data.ipynb /home/niko/code/holoviews/doc/user_guide/Colormaps.ipynb:10004: WARNING: 'myst' reference target not found: Styling_Plots.ipynb /home/niko/code/holoviews/doc/user_guide/Colormaps.ipynb:30010: WARNING: 'myst' reference target not found: Styling_Plots.ipynb /home/niko/code/holoviews/doc/user_guide/Colormaps.ipynb:190002: WARNING: 'myst' reference target not found: Styling_Plots.ipynb /home/niko/code/holoviews/doc/user_guide/02-Composing_Elements.ipynb:20007: WARNING: 'myst' reference target not found: ./05-Dimensioned_Containers.ipynb /home/niko/code/holoviews/doc/user_guide/02-Composing_Elements.ipynb:280002: WARNING: 'myst' reference target not found: ./03-Applying_Customization.ipynb /home/niko/code/holoviews/doc/user_guide/Continuous_Coordinates.ipynb:240002: WARNING: 'myst' reference target not found: 10-Indexing_and_Selecting.ipynb /home/niko/code/holoviews/doc/user_guide/Continuous_Coordinates.ipynb:330006: WARNING: 'myst' reference target not found: Containers /home/niko/code/holoviews/doc/user_guide/Continuous_Coordinates.ipynb:350002: WARNING: 'myst' reference target not found: 10-Indexing_and_Selecting.ipynb /home/niko/code/holoviews/doc/user_guide/17-Dashboards.ipynb:20002: WARNING: 'myst' reference target not found: ./14-Data_Pipelines.ipynb /home/niko/code/holoviews/doc/user_guide/14-Data_Pipelines.ipynb:20002: WARNING: 'myst' reference target not found: ./07-Live_Data.ipynb /home/niko/code/holoviews/doc/user_guide/05-Dimensioned_Containers.ipynb:10002: WARNING: 'myst' reference target not found: ./01-Annotating_Data.ipynb /home/niko/code/holoviews/doc/user_guide/05-Dimensioned_Containers.ipynb:180002: WARNING: 'myst' reference target not found: ./08-Tabular_Datasets.ipynb /home/niko/code/holoviews/doc/user_guide/05-Dimensioned_Containers.ipynb:180002: WARNING: 'myst' reference target not found: ./09-Gridded_Datasets.ipynb /home/niko/code/holoviews/doc/user_guide/10-Indexing_and_Selecting_Data.ipynb:10002: WARNING: 'myst' reference target not found: ./06-Building_Composite_Objects.ipynb /home/niko/code/holoviews/doc/user_guide/10-Indexing_and_Selecting_Data.ipynb:40002: WARNING: 'myst' reference target not found: ./05-Dimensioned_Containers.ipynb /home/niko/code/holoviews/doc/user_guide/10-Indexing_and_Selecting_Data.ipynb:500002: WARNING: 'myst' reference target not found: ./07-Tabular_Data.ipynb /home/niko/code/holoviews/doc/user_guide/07-Live_Data.ipynb:10023: WARNING: 'myst' reference target not found: ./12-Responding_to_Events.ipynb /home/niko/code/holoviews/doc/user_guide/07-Live_Data.ipynb:60002: WARNING: 'myst' reference target not found: Introduction.rst /home/niko/code/holoviews/doc/user_guide/Notebook_Magics.ipynb:40032: WARNING: 'myst' reference target not found: Customization.rst /home/niko/code/holoviews/doc/user_guide/Plots_and_Renderers.ipynb:440006: WARNING: 'myst' reference target not found: ./06-Building_Composite_Objects.ipynb#Nesting-hierarchy- /home/niko/code/holoviews/doc/user_guide/Plotting_with_Bokeh.ipynb:20004: WARNING: 'myst' reference target not found: 04-Style_Mapping.ipynb /home/niko/code/holoviews/doc/user_guide/Plotting_with_Bokeh.ipynb:120006: WARNING: 'myst' reference target not found: Customizing_Plots.ipynb#plot-hooks /home/niko/code/holoviews/doc/user_guide/Plotting_with_Matplotlib.ipynb:50006: WARNING: 'myst' reference target not found: Customizing_Plots.ipynb#plot-hooks ```

After:

niko@niko-ubuntu-home:~/tmp$ cat holoviews-logs-nbsite-updated.txt  | grep "WARNING: 'myst' reference target not found" | grep -v "not found: #" | wc -l
47
'myst' warnings after ``` niko@niko-ubuntu-home:~/tmp$ cat holoviews-logs-nbsite-updated.txt | grep "WARNING: 'myst' reference target not found" | grep -v "not found: #" /home/niko/code/holoviews/doc/gallery/demos/bokeh/dragon_curve.ipynb:10002: WARNING: 'myst' reference target not found: ../../topics/geometry/lsystems.ipynb /home/niko/code/holoviews/doc/gallery/demos/bokeh/dragon_curve.ipynb:40002: WARNING: 'myst' reference target not found: ../../topics/geometry/lsystems.ipynb /home/niko/code/holoviews/doc/gallery/demos/bokeh/iris_splom_example.ipynb:10006: WARNING: 'myst' reference target not found: ../matplotlib/iris_splot_example.ipynb /home/niko/code/holoviews/doc/gallery/demos/bokeh/nyc_airport_connections.ipynb:10004: WARNING: 'myst' reference target not found: ../matplotlib/nyc_taxi_connections.ipynb /home/niko/code/holoviews/doc/gallery/demos/bokeh/nyc_radial_heatmap.ipynb:10004: WARNING: 'myst' reference target not found: ../matplotlib/radial_heatmap.ipynb /home/niko/code/holoviews/doc/gallery/demos/bokeh/step_chart.ipynb:10004: WARNING: 'myst' reference target not found: ../bokeh/step_chart_example.ipynb /home/niko/code/holoviews/doc/gallery/demos/matplotlib/bachelors_degrees_by_gender.ipynb:10006: WARNING: 'myst' reference target not found: ../bokeh/bachelors_degress_by_gender.ipynb /home/niko/code/holoviews/doc/gallery/demos/matplotlib/dragon_curve.ipynb:10002: WARNING: 'myst' reference target not found: ../../topics/geometry/lsystems.ipynb /home/niko/code/holoviews/doc/gallery/demos/matplotlib/dragon_curve.ipynb:40002: WARNING: 'myst' reference target not found: ../../topics/geometry/lsystems.ipynb /home/niko/code/holoviews/doc/gallery/demos/matplotlib/nyc_airport_connections.ipynb:10004: WARNING: 'myst' reference target not found: ../bokeh/nyc_taxi_connections.ipynb /home/niko/code/holoviews/doc/gallery/demos/matplotlib/nyc_radial_heatmap.ipynb:10004: WARNING: 'myst' reference target not found: ../bokeh/radial_heatmap.ipynb /home/niko/code/holoviews/doc/getting_started/1-Introduction.ipynb:10009: WARNING: 'myst' reference target not found: ../user_guide/ /home/niko/code/holoviews/doc/getting_started/1-Introduction.ipynb:150004: WARNING: 'myst' reference target not found: ../user_guide/03-Applying_Customizations.ipynb /home/niko/code/holoviews/doc/getting_started/5-Live_Data.ipynb:240004: WARNING: 'myst' reference target not found: ../reference/index.html#streams /home/niko/code/holoviews/doc/getting_started/5-Live_Data.ipynb:250024: WARNING: 'myst' reference target not found: ../user_guide/ /home/niko/code/holoviews/doc/getting_started/5-Live_Data.ipynb:250024: WARNING: 'myst' reference target not found: ../reference/ /home/niko/code/holoviews/doc/getting_started/5-Live_Data.ipynb:250024: WARNING: 'myst' reference target not found: ../gallery/ /home/niko/code/holoviews/doc/reference/containers/bokeh/NdOverlay.ipynb:90002: WARNING: 'myst' reference target not found: ../../../user_guide/Style_Mapping.rst#Cycles-and-Palettes /home/niko/code/holoviews/doc/reference/containers/matplotlib/NdOverlay.ipynb:90002: WARNING: 'myst' reference target not found: ../../../user_guide/Style_Mapping.rst#Cycles-and-Palettes /home/niko/code/holoviews/doc/reference/containers/plotly/NdOverlay.ipynb:90002: WARNING: 'myst' reference target not found: ../../../user_guide/Style_Mapping.rst#Cycles-and-Palettes /home/niko/code/holoviews/doc/reference/elements/bokeh/Contours.ipynb:30002: WARNING: 'myst' reference target not found: ../user_guide/Geometry_Data.ipynb /home/niko/code/holoviews/doc/reference/elements/bokeh/Image.ipynb:30002: WARNING: 'myst' reference target not found: Continuous_Coordinates.ipynb /home/niko/code/holoviews/doc/reference/elements/bokeh/Path.ipynb:30002: WARNING: 'myst' reference target not found: ../user_guide/Geometry_Data.ipynb /home/niko/code/holoviews/doc/reference/elements/matplotlib/Contours.ipynb:30002: WARNING: 'myst' reference target not found: ../user_guide/Geometry_Data.ipynb /home/niko/code/holoviews/doc/reference/elements/matplotlib/Image.ipynb:30002: WARNING: 'myst' reference target not found: Continuous_Coordinates.ipynb /home/niko/code/holoviews/doc/reference/elements/matplotlib/Path.ipynb:30002: WARNING: 'myst' reference target not found: ../user_guide/Geometry_Data.ipynb /home/niko/code/holoviews/doc/reference/elements/matplotlib/Path3D.ipynb:30002: WARNING: 'myst' reference target not found: ../user_guide/Geometry_Data.ipynb /home/niko/code/holoviews/doc/reference/elements/plotly/Image.ipynb:30002: WARNING: 'myst' reference target not found: Continuous_Coordinates.ipynb /home/niko/code/holoviews/doc/reference/elements/plotly/Path3D.ipynb:30002: WARNING: 'myst' reference target not found: ../user_guide/Geometry_Data.ipynb /home/niko/code/holoviews/doc/reference/elements/plotly/Points.ipynb:90002: WARNING: 'myst' reference target not found: Bokeh_Backend /home/niko/code/holoviews/doc/reference/elements/plotly/Raster.ipynb:30002: WARNING: 'myst' reference target not found: ./HSV.ipynb /home/niko/code/holoviews/doc/user_guide/Annotators.ipynb:250004: WARNING: 'myst' reference target not found: ../reference/streams/PolyDraw.ipynb /home/niko/code/holoviews/doc/user_guide/Annotators.ipynb:250004: WARNING: 'myst' reference target not found: ../reference/streams/PolyEdit.ipynb /home/niko/code/holoviews/doc/user_guide/03-Applying_Customizations.ipynb:240010: WARNING: 'myst' reference target not found: Plots_and_Renderers.rst#Saving-and-rendering /home/niko/code/holoviews/doc/user_guide/03-Applying_Customizations.ipynb:600010: WARNING: 'myst' reference target not found: Bokeh_Backend /home/niko/code/holoviews/doc/user_guide/Colormaps.ipynb:10004: WARNING: 'myst' reference target not found: Styling_Plots.ipynb /home/niko/code/holoviews/doc/user_guide/Colormaps.ipynb:30010: WARNING: 'myst' reference target not found: Styling_Plots.ipynb /home/niko/code/holoviews/doc/user_guide/Colormaps.ipynb:190002: WARNING: 'myst' reference target not found: Styling_Plots.ipynb /home/niko/code/holoviews/doc/user_guide/02-Composing_Elements.ipynb:280002: WARNING: 'myst' reference target not found: ./03-Applying_Customization.ipynb /home/niko/code/holoviews/doc/user_guide/Continuous_Coordinates.ipynb:240002: WARNING: 'myst' reference target not found: 10-Indexing_and_Selecting.ipynb /home/niko/code/holoviews/doc/user_guide/Continuous_Coordinates.ipynb:330006: WARNING: 'myst' reference target not found: Containers /home/niko/code/holoviews/doc/user_guide/Continuous_Coordinates.ipynb:350002: WARNING: 'myst' reference target not found: 10-Indexing_and_Selecting.ipynb /home/niko/code/holoviews/doc/user_guide/10-Indexing_and_Selecting_Data.ipynb:500002: WARNING: 'myst' reference target not found: ./07-Tabular_Data.ipynb /home/niko/code/holoviews/doc/user_guide/Linked_Brushing.ipynb:90004: WARNING: 'myst' reference target not found: 15-Large_Data.ipynb /home/niko/code/holoviews/doc/user_guide/Plots_and_Renderers.ipynb:440006: WARNING: 'myst' reference target not found: ./Building_Composite_Objects.rst#Nesting-hierarchy- /home/niko/code/holoviews/doc/user_guide/Plotting_with_Bokeh.ipynb:120006: WARNING: 'myst' reference target not found: Customizing_Plots.rst#plot-hooks /home/niko/code/holoviews/doc/user_guide/Plotting_with_Matplotlib.ipynb:50006: WARNING: 'myst' reference target not found: Customizing_Plots.rst#plot-hooks ```

As pictures

image

image

hoxbro commented 5 months ago

The failing test tests / Documentation (pull_request) is expected as you don't have the permissions.

A problem we have with the link conversion is that the links in a notebook environment are case-insensitive, and the URL on the webpage is not. Or at least that is how I remember it...

fohrloop commented 5 months ago

Do you mean that a link in the notebook 03-Applying_Customizations.ipynb might for some reason be (notice small c)

[customization](../getting_started/2-customization.ipynb) 

when file structure is

📁 doc/
├─📁 user_guide/
│ ├─📄 Applying_Customizations.rst
│ └─📄 Style_Mapping.rst
└─📁 getting_started/
  └─📄 Customization.rst
📁 examples/
├─📁 user_guide/
│ ├─📄 03-Applying_Customizations.ipynb
│ └─📄 04-Style_Mapping.ipynb
└─📁 getting_started/
  └─📄 2-Customization.ipynb

and that would work fine with notebooks? But the created link in the sphinx doctree should be

[customization](../getting_started/Customization.rst) 

?

fohrloop commented 5 months ago

If so, the doc build process should emit warning for the missing target. Which in ideal case would be seen and fixed. Another way to fix that would be to edit the FixNotebookLinks._get_sourcefile and do case-insensitive glob search, instead of relying on a fixed list formed by FixNotebookLinks._iter_source_file_candidates.

That's perhaps out of scope of this PR, though?

hoxbro commented 5 months ago

That's perhaps out of scope of this PR, though?

Yes. It was more of a heads-up.

hoxbro commented 5 months ago

I really appreciate the efforts and attention to detail that have gone into this PR. I will merge and cut a dev release.