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
25 lines
651 B
Python
25 lines
651 B
Python
from pathlib import Path
|
|
|
|
from docforge import MkDocsRenderer
|
|
from docforge.models import Module, Project
|
|
|
|
|
|
def test_mkdocs_directory_structure(tmp_path: Path):
|
|
project = Project("testpkg")
|
|
project.add_module(Module("testpkg"))
|
|
project.add_module(Module("testpkg.sub"))
|
|
|
|
out_dir = tmp_path / "docs"
|
|
renderer = MkDocsRenderer()
|
|
|
|
renderer.generate_sources(project, out_dir)
|
|
renderer.generate_readme(
|
|
project,
|
|
out_dir,
|
|
module_is_source=True,
|
|
)
|
|
|
|
assert (out_dir / "testpkg" / "index.md").exists()
|
|
assert (out_dir / "testpkg" / "sub.md").exists()
|
|
assert (tmp_path / "README.md").exists()
|