Squash-merge lib-standardisation: adopt repo standards across packaging, tooling, docs, and CI. - standardize pyproject.toml (canonical packaging, lint config, extras, GSDFC pydoclint) - add py.typed marker, modernize type hints and Google-style docstrings - nest generated docs under docs/lib and docs/mcp; add hand-written wiki - adopt standard Type A PyPI CI pipeline (tag==version guard + quality gate) - promote generated CHANGELOG.md; bump version to 0.0.7
37 lines
804 B
Python
37 lines
804 B
Python
from pathlib import Path
|
|
|
|
from docforge.nav import MkDocsNavEmitter, ResolvedNav
|
|
|
|
|
|
def test_emit_mkdocs_nav():
|
|
nav = ResolvedNav(
|
|
home="openapi_first/index.md",
|
|
groups={
|
|
"Core": [
|
|
Path("openapi_first/app.md"),
|
|
Path("openapi_first/client.md"),
|
|
],
|
|
"CLI": [
|
|
Path("openapi_first/cli.md"),
|
|
],
|
|
},
|
|
)
|
|
|
|
emitter = MkDocsNavEmitter()
|
|
mkdocs_nav = emitter.emit(nav)
|
|
|
|
assert mkdocs_nav == [
|
|
{"Home": "openapi_first/index.md"},
|
|
{
|
|
"Core": [
|
|
"openapi_first/app.md",
|
|
"openapi_first/client.md",
|
|
]
|
|
},
|
|
{
|
|
"CLI": [
|
|
"openapi_first/cli.md",
|
|
]
|
|
},
|
|
]
|