MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / remove_docs_yml_entry

Function remove_docs_yml_entry

tasks/scripts/sync_docs_website.py:249–258  ·  view source on GitHub ↗
(docs_yml: Path, slug: str, fern_dir: Path)

Source from the content-addressed store, hash-verified

247
248
249def remove_docs_yml_entry(docs_yml: Path, slug: str, fern_dir: Path) -> None:
250 data = read_yaml(docs_yml)
251 entries = [
252 entry for entry in parse_versions(data.get("versions")) if entry.slug != slug
253 ]
254 data["experimental"] = {
255 "mdx-components": component_dirs(fern_dir),
256 }
257 data["versions"] = render_versions(entries)
258 write_yaml(docs_yml, data)
259
260
261def sync_docs(args: argparse.Namespace) -> None:

Callers 1

remove_docsFunction · 0.85

Calls 6

parse_versionsFunction · 0.85
component_dirsFunction · 0.85
render_versionsFunction · 0.85
write_yamlFunction · 0.85
read_yamlFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected