Skip to content

Commit 69ca264

Browse files
authored
docs(zarr-metadata): docs-site polish: repo link, titles, RTD build skips, branding (#4210)
* docs(zarr-metadata): point the site's repo link at the package directory The material header source widget linked to the zarr-python repository root, presenting the site as zarr-python's. Link the package directory and label it zarr-python/packages/zarr-metadata instead. edit_uri becomes absolute because mkdocs would append it to repo_url's subpath. Assisted-by: ClaudeCode:claude-fable-5 * docs(zarr-metadata): drop redundant frontmatter title on the homepage Material appends the site name to explicit frontmatter titles, so the homepage browser title rendered as 'zarr-metadata - zarr-metadata'. Without the frontmatter it falls back to the site name alone. Assisted-by: ClaudeCode:claude-fable-5 * docs(zarr-metadata): skip unrelated RTD PR builds; add site logo and favicon Both Read the Docs projects rebuilt on every pull request regardless of what changed. Each config now cancels PR builds via exit code 183 when the diff against origin/main does not touch its half of the repo: the zarr-metadata project skips PRs that leave packages/zarr-metadata untouched, and the zarr-python project skips PRs confined to it. Scoped to external versions because origin/main is only a meaningful diff base for PR builds. The package site also gets the zarr logo and favicon, copied from the zarr-python docs, instead of stock Material icons. Assisted-by: ClaudeCode:claude-fable-5 * fix(docs): quote-free exclude pathspec in RTD build-skip rule Read the Docs strips shell quoting from build commands, so the quoted ':(exclude)packages/zarr-metadata' pathspec reached /bin/sh unquoted and the bare parenthesis was a syntax error, failing every zarr PR build. Use git's quote-free :! exclude form, which survives the stripping; reproduced the mangling and verified both forms against dash locally. Assisted-by: ClaudeCode:claude-fable-5
1 parent b2ece6f commit 69ca264

6 files changed

Lines changed: 31 additions & 7 deletions

File tree

.readthedocs.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ build:
55
tools:
66
python: "3.12"
77
jobs:
8+
post_checkout:
9+
# Cancel pull request builds whose changes are confined to the
10+
# zarr-metadata package, which has its own Read the Docs project. Exit
11+
# code 183 cancels the build and reports success to the Git provider.
12+
# Scoped to PR builds ("external" versions) because origin/main is only
13+
# a meaningful diff base there. Read the Docs strips shell quoting from
14+
# commands, so the exclude pathspec must use the quote-free :! form,
15+
# not ':(exclude)'.
16+
- |
17+
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/main -- :!packages/zarr-metadata;
18+
then
19+
exit 183;
20+
fi
821
install:
922
- pip install --upgrade pip
1023
- pip install .[remote] --group docs

packages/zarr-metadata/.readthedocs.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ build:
99
tools:
1010
python: "3.12"
1111
jobs:
12+
post_checkout:
13+
# Cancel pull request builds that do not touch this package. Exit code
14+
# 183 cancels the build and reports success to the Git provider. Scoped
15+
# to PR builds ("external" versions) because origin/main is only a
16+
# meaningful diff base there.
17+
- |
18+
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/main -- packages/zarr-metadata;
19+
then
20+
exit 183;
21+
fi
1222
install:
1323
- pip install --upgrade pip
1424
- pip install ./packages/zarr-metadata --group packages/zarr-metadata/pyproject.toml:docs
12.4 KB
Loading
44.1 KB
Loading

packages/zarr-metadata/docs/index.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
---
2-
title: zarr-metadata
3-
---
4-
51
# zarr-metadata
62

73
Basic tools for modelling Zarr metadata, with minimal dependencies.

packages/zarr-metadata/mkdocs.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
site_name: zarr-metadata
2-
repo_name: zarr-developers/zarr-python
3-
repo_url: https://github.com/zarr-developers/zarr-python
4-
edit_uri: edit/main/packages/zarr-metadata/docs/
2+
# The package lives in the zarr-python monorepo; point the header source
3+
# widget at the package directory rather than the repository root.
4+
repo_name: zarr-python/packages/zarr-metadata
5+
repo_url: https://github.com/zarr-developers/zarr-python/tree/main/packages/zarr-metadata
6+
# Absolute because mkdocs would otherwise append this to repo_url's subpath.
7+
edit_uri: https://github.com/zarr-developers/zarr-python/edit/main/packages/zarr-metadata/docs/
58
site_description: Spec-defined metadata types, models, and validators for Zarr v2 and v3.
69
site_author: Davis Bennett
710
site_url: !ENV [READTHEDOCS_CANONICAL_URL, 'https://zarr-metadata.readthedocs.io/']
@@ -29,6 +32,8 @@ watch:
2932
theme:
3033
language: en
3134
name: material
35+
logo: _static/logo_bw.png
36+
favicon: _static/favicon-96x96.png
3237

3338
palette:
3439
# Light mode

0 commit comments

Comments
 (0)