From ad641615d054b2f209054e84924168644fc00935 Mon Sep 17 00:00:00 2001 From: Scott Henderson Date: Sun, 30 Jun 2024 22:54:24 -0700 Subject: [PATCH] autolink improvements --- .github/workflows/main.yaml | 6 +----- .github/workflows/pull_request.yaml | 6 +----- .github/workflows/qaqc.yaml | 1 + _config.yml | 13 +++++++++++++ _static/style.css | 12 ++++++++++++ 5 files changed, 28 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 2458f1d9..612a7444 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -43,13 +43,9 @@ jobs: # NOTE: login shell activates conda environment shell: bash -el {0} run: | + jupyter-book clean ./ jupyter-book build ./ --warningiserror --keep-going - - name: Dump Build Logs - if: always() - run: | - if (test -a _build/html/reports/*log); then cat _build/html/reports/*log ; fi - - name: Save Build Folder if: always() uses: actions/upload-artifact@v4 diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 2e4a8f43..480fb999 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -40,13 +40,9 @@ jobs: - name: Build JupyterBook if: github.event.action != 'closed' run: | + jupyter-book clean ./ jupyter-book build ./ --warningiserror --keep-going - - name: Dump Build Logs - if: github.event.action != 'closed' - run: | - if (test -a _build/html/reports/*log); then cat _build/html/reports/*log ; fi - - name: Upload artifact if: github.event.action != 'closed' uses: actions/upload-artifact@v4 diff --git a/.github/workflows/qaqc.yaml b/.github/workflows/qaqc.yaml index ea4d17e0..b6fc2c80 100644 --- a/.github/workflows/qaqc.yaml +++ b/.github/workflows/qaqc.yaml @@ -54,4 +54,5 @@ jobs: timeout-minutes: 5 if: always() run: | + jupyter-book clean ./ jupyter-book build ./ --builder linkcheck diff --git a/_config.yml b/_config.yml index d77f58ec..ff3ddb38 100644 --- a/_config.yml +++ b/_config.yml @@ -76,6 +76,19 @@ sphinx: # 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 + codeautolink_warn_on_missing_inventory: True + codeautolink_inventory_map: { + # unfortunately mapping the top level doesn't work, need all methods + #"xarray.core.dataarray.DataArray": "xarray.DataArray", + "xarray.core.dataarray.DataArray.isel": "xarray.DataArray.isel", + "xarray.core.dataarray.DataArray.sel": "xarray.DataArray.sel", + "xarray.core.dataarray.DataArray.rolling": "xarray.DataArray.rolling", + "xarray.core.dataarray.DataArray.coarsen": "xarray.DataArray.coarsen", + "xarray.core.dataarray.DataArray.groupby": "xarray.DataArray.groupby", + #"Same for dataset :( + "xarray.core.dataset.Dataset.isel": "xarray.Dataset.sel", + "xarray.core.dataset.Dataset.groupby": "xarray.Dataset.groupby", + } notfound_context: body: "

Whoops! 404 Page Not Found

\n\n

Sorry, this page doesn't exist. Many sections of this book have been updated recently.

Try the search box 🔎 to find what you're looking for!

" notfound_urls_prefix: / diff --git a/_static/style.css b/_static/style.css index b1024666..1e2145b3 100644 --- a/_static/style.css +++ b/_static/style.css @@ -1,3 +1,15 @@ .bd-header-announcement { background-color: var(--pst-color-info-bg); } + +.sphinx-codeautolink-a:link { + border-bottom-color: lightgray; + border-bottom-style: dotted; + border-bottom-width: 1px; +} + +.sphinx-codeautolink-a:hover { + border-bottom-color: rgb(255, 139, 139); + border-bottom-style: dotted; + border-bottom-width: 1px; +}