Skip to content

Commit

Permalink
autolink improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
scottyhq committed Jul 1, 2024
1 parent 10f059e commit ad64161
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 10 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/qaqc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,5 @@ jobs:
timeout-minutes: 5
if: always()
run: |
jupyter-book clean ./
jupyter-book build ./ --builder linkcheck
13 changes: 13 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: "<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 Down
12 changes: 12 additions & 0 deletions _static/style.css
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit ad64161

Please sign in to comment.