Skip to content
Open
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
6 changes: 6 additions & 0 deletions scripts/data/coding-docs-map.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@
"output_path": "guides/coding/qwen_code_cli.mdx",
"service_alias": "coding",
"source_doc_key": "development_qwen_code_cli"
},
{
"canonical_alias": "development_open_webui",
"output_path": "guides/integrations/open-webui.mdx",
"service_alias": "integrations",
"source_doc_key": "development_open_webui"
}
]
}
2 changes: 1 addition & 1 deletion scripts/sync_from_platformbackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"riffusion",
"udio",
}
DOC_ONLY_SERVICES = {"coding"}
DOC_ONLY_SERVICES = {"coding", "integrations"}

SKIP_DOC_KEYS = {
"acedataext",
Expand Down
31 changes: 31 additions & 0 deletions tests/test_sync_from_platformbackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,37 @@ def test_exact_records_override_heuristic_service_and_output(self) -> None:
self.assertEqual(mapping["tool_route"], "coding")
self.assertEqual(exact["tool_route"]["output_path"], "guides/coding/custom_name.mdx")

def test_integrations_exact_record_writes_discoverable_path(self) -> None:
with tempfile.TemporaryDirectory() as temporary_directory:
root = Path(temporary_directory)
backend = root / "backend"
output = root / "output"
docs = backend / "docs"
docs.mkdir(parents=True)
(docs / "development_open_webui.md").write_text("# Open WebUI\n\nBody", encoding="utf-8")
records = [
{
"canonical_alias": "development_open_webui",
"source_doc_key": "development_open_webui",
"service_alias": "integrations",
"output_path": "guides/integrations/open-webui.mdx",
}
]
bundle_path = root / "exact.json"
bundle_path.write_text(json.dumps({"schema_version": 1, "records": records}), encoding="utf-8")

exact = sync.load_exact_doc_records(backend, [], bundle_path)
sync.sync_guides(
backend,
output,
{"integrations": {"alias": "integrations", "display_name": "Integrations"}},
{"open_webui": "integrations"},
["zh-Hans"],
exact_records=exact,
)

self.assertTrue((output / "zh-Hans/guides/integrations/open-webui.mdx").is_file())

def test_sync_guides_writes_exact_output_path(self) -> None:
with tempfile.TemporaryDirectory() as temporary_directory:
root = Path(temporary_directory)
Expand Down
Loading