Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.PHONY: site test deploy help
.PHONY: doctor-setup site test deploy help
help:
@grep -E "^[a-zA-Z_-]+:.*?## .*$$" $(MAKEFILE_LIST) | awk "BEGIN{FS=\":.*?## \"}{printf \" %-10s %s\\n\",\$$1,\$$2}"
doctor-setup: ## Bootstrap the environment for diagnostics
python3 scripts/check_doctor_setup.py
site: ## Build docs _site/
python3 scripts/build_site.py _site
test: ## Build the site and validate pages + internal links
Expand Down
31 changes: 31 additions & 0 deletions scripts/check_doctor_setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env python3
"""Doctor workflow setup verification for docs repository."""
from __future__ import annotations

import sys
from pathlib import Path


def _ensure_files_exist(paths: list[str]) -> bool:
missing: list[str] = [path for path in paths if not Path(path).exists()]
if missing:
print(f"FAIL: missing required file(s): {', '.join(missing)}")
return False
return True


def main() -> int:
required = [
"Makefile",
"scripts/build_site.py",
"scripts/check_site.py",
"scripts/check_node_types.py",
]
if not _ensure_files_exist(required):
return 1
print("Doctor setup checks passed")
return 0


if __name__ == "__main__":
raise SystemExit(main())
Loading