Skip to content

Commit 152b7e4

Browse files
Fix scorecard plots in versioned docs (#1097)
* docs: fix versioned scorecard plot paths * docs: limit scorecard path fix to generated pages * docs: update scorecard provenance commit * docs: rewrite scorecard paths during Mike builds * docs: target scorecard path hook with marker * Simplify scorecard iframe paths * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 10082c6 commit 152b7e4

5 files changed

Lines changed: 6 additions & 9 deletions

File tree

docs/_static/scorecard/eval_scores_aurora.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/_static/scorecard/eval_scores_fcn3.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/generate_scorecard.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,10 +255,7 @@ def _load_defaults() -> dict:
255255
256256
Pick a metric and variable; hover for exact values at each lead time.
257257
258-
<!-- src is SOURCE-relative (docs/scorecard/generated/ -> docs/_static);
259-
the site build rewrites it for the final page location. -->
260-
261-
<iframe src="../../_static/scorecard/plot.html?model={model}&label={label_q}" title="{label} skill"
258+
<iframe src="../../../_static/scorecard/plot.html?model={model_q}&label={label_q}" title="{label} skill"
262259
style="width:100%;height:560px;border:1px solid rgba(128,128,128,.35);border-radius:10px;"
263260
loading="lazy"></iframe>
264261
@@ -520,6 +517,7 @@ def build_page(model: str, doc: dict, conf: dict) -> str:
520517
)
521518
md = PAGE_MD.format(
522519
model=model,
520+
model_q=quote(model),
523521
label=label,
524522
summary=summary,
525523
kind=kind,

docs/mkdocs_hooks.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
"Runnable examples, grouped by topic. Each card opens the complete source, "
6363
"output, and captured figures."
6464
)
65-
6665
CALLOUT_KINDS = {
6766
"note",
6867
"warning",

docs/userguide/developer/documentation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ such as `_static/` and `examples/_assets/`.
8181
Versioned deployments use [Mike](https://github.com/jimporter/mike):
8282

8383
```bash
84-
DOC_VERSION=0.18.0 DOC_ALIAS=latest make docs-deploy-version
84+
DOC_VERSION=0.18.0 make docs-deploy-version
8585
```
8686

87-
Versions are published beneath `v/` on the `gh-pages` branch.
87+
Versions are published at `https://nvidia.github.io/earth2studio/<version>/`.

0 commit comments

Comments
 (0)