Context. tasks/docs.py generates one reference page per .metadata.yml key. Two
defects in it are user-visible in the published docs.
First, every extension that declares base as a dependency gets its "base" link pointed
at the dcim reference page, whatever part of base it actually uses. An extension that
depends on base only for OrganizationGeneric or BuiltinIPNamespace sends the reader to
the DCIM page.
Second, the generator never deletes. Renaming a .metadata.yml key leaves the old
reference page orphaned in docs/docs/reference/. This PR hit it once already:
extensions/modules was renamed to extensions/device_module and
docs/docs/reference/modules.mdx survived as a page for a package that no longer exists.
Verified at the time: 57 pages, 56 metadata keys, one orphan, none missing. The orphan
itself is deleted by hand in the review's own commits, the generator behaviour is not
fixed.
Current markers.
tasks/docs.py:62
link = "dcim" # TODO: This is a hack, should be improved ... maybe merging all base references
Three further pre-existing dev notes live in the same file and are covered by this issue
rather than by markers of their own:
tasks/docs.py:31 # TODO: Handle the case where we can't split the key
tasks/docs.py:75 # FIXME: Maybe support .yaml as well?
tasks/docs.py:85 yml_file = yml_files[0] # TODO: Could be improved
What this asks for. Two changes, either order. Resolve a base dependency to the base
sub-page the extension actually references (or produce one merged base reference page and
link to that). Make the generator prune reference pages that no longer have a
.metadata.yml key, so a key rename cannot leave an orphan behind.
Origin: pass-1 review of #75, packets STRUCT-04 and STRUCT-13, CC-8 bucket (c).
Context.
tasks/docs.pygenerates one reference page per.metadata.ymlkey. Twodefects in it are user-visible in the published docs.
First, every extension that declares
baseas a dependency gets its "base" link pointedat the
dcimreference page, whatever part of base it actually uses. An extension thatdepends on base only for
OrganizationGenericorBuiltinIPNamespacesends the reader tothe DCIM page.
Second, the generator never deletes. Renaming a
.metadata.ymlkey leaves the oldreference page orphaned in
docs/docs/reference/. This PR hit it once already:extensions/moduleswas renamed toextensions/device_moduleanddocs/docs/reference/modules.mdxsurvived as a page for a package that no longer exists.Verified at the time: 57 pages, 56 metadata keys, one orphan, none missing. The orphan
itself is deleted by hand in the review's own commits, the generator behaviour is not
fixed.
Current markers.
Three further pre-existing dev notes live in the same file and are covered by this issue
rather than by markers of their own:
What this asks for. Two changes, either order. Resolve a
basedependency to the basesub-page the extension actually references (or produce one merged base reference page and
link to that). Make the generator prune reference pages that no longer have a
.metadata.ymlkey, so a key rename cannot leave an orphan behind.Origin: pass-1 review of #75, packets STRUCT-04 and STRUCT-13, CC-8 bucket (c).