Repository navigation
Commit d2aa66f
committed
docs(sphinx): redirect the pdoc-era URLs and fix the stub's anchor rewriting
The site publishes into one mutable directory: each release's build replaces
sdk-docs/python/ wholesale, so a retired layout's pages are deleted rather
than kept. sdk-docs' own history is therefore the record of every URL the site
has served. Across 63 Python builds it has served 342; 145 resolve today.
197 are dead. 14 are viewcode listings, which redirects cannot cover because
they are not Sphinx documents. The other 183 are content pages, and 180 of
them come from the pdoc generation (v3.0-v7.0), which named a page after each
module path. Two commits did most of the damage, both by adding __all__ to a
package __init__: pdoc filters submodules through it, so v5.4.0 deleted the
nine pinecone/grpc/* pages and v7.0.0 took the tree from 84 pages to 2. v4
never published docs at all -- the workflow had no caller then -- so its URLs
are v3.2.2's, and rebuilding v4.0.0 confirms an identical page set.
Targets are not guesses. A page goes to the page its documented symbol lives
on today, checked against an index of every anchor in the current build;
failing that, to the page for a subject the docs still cover; failing that, to
index.html, which is honest about there being no counterpart rather than
stranding the reader somewhere plausible-looking. 97 of the 183 land there.
The stub template needed three fixes for any of this to work:
Its anchor remap was gated on the target starting with the literal "reference/",
which is only true for a stub at the docs root. Every entry added here is
nested, so the remap would have silently done nothing for all of them. The
stub now reads the "../" prefix off its own target and reuses it.
The remap mapped renamed classes, but 10.0's change was moving control-plane
verbs onto sub-resources, which renames the member too. rest.html's
where it does not exist; it is Indexes.create now. One member map covers the
sync, asyncio and gRPC clients, which split identically.
grpc.html#pineconegrpc forwarded into reference/grpc.html, which stopped
documenting PineconeGRPC when it merged into Pinecone -- a redirect landing on
a page about something else. That and 20 further section anchors, verified
present in the v8 build and mapped to ids verified present in this one, are
now in the sections table.
check_redirect_anchors.py guards the tables: every page they name must exist,
every fragment must be an id on the page it is paired with. This failure mode
is invisible otherwise, since the browser loads the page and just does not
scroll. It validates the entries present; it cannot know an anchor is missing
one it ought to have.
published-urls.txt grows by the 183 new stubs via --update, per #655.1 parent 6547b78 commit d2aa66f
6 files changed
Lines changed: 762 additions & 8 deletions
File tree
- .github/workflows
- docs
- _templates
- scripts
- tests/unit/tooling
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
12 | 18 | | |
13 | 19 | | |
14 | 20 | | |
| |||
27 | 33 | | |
28 | 34 | | |
29 | 35 | | |
30 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
31 | 76 | | |
| 77 | + | |
32 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
33 | 85 | | |
34 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
35 | 108 | | |
36 | 109 | | |
37 | | - | |
38 | 110 | | |
39 | 111 | | |
40 | 112 | | |
41 | 113 | | |
42 | 114 | | |
43 | | - | |
| 115 | + | |
44 | 116 | | |
45 | | - | |
| 117 | + | |
46 | 118 | | |
47 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
48 | 133 | | |
49 | 134 | | |
50 | | - | |
| 135 | + | |
51 | 136 | | |
52 | | - | |
| 137 | + | |
53 | 138 | | |
54 | 139 | | |
55 | 140 | | |
| |||
0 commit comments