standardize packaging, tooling, docs, CI, and licensing

This commit is contained in:
2026-09-10 18:49:04 +05:30
parent 8253c25928
commit 0129268cd3
61 changed files with 429 additions and 273 deletions

View File

@@ -1,7 +1,7 @@
from pathlib import Path
from docforge import MkDocsRenderer
from docforge.models import Project, Module
from docforge.models import Module, Project
def test_mkdocs_file_content(tmp_path: Path):
@@ -47,4 +47,4 @@ def test_generate_readme_source_root(tmp_path: Path):
content = readme.read_text()
assert "# testpkg" in content
assert "Test package documentation." in content
assert "Test package documentation." in content

View File

@@ -1,7 +1,7 @@
from pathlib import Path
from docforge import MkDocsRenderer
from docforge.models import Project, Module
from docforge.models import Module, Project
def test_mkdocs_idempotent(tmp_path: Path):
@@ -50,4 +50,4 @@ def test_generate_readme_idempotent(tmp_path: Path):
second = readme.read_text()
assert first == second
assert first == second

View File

@@ -1,7 +1,7 @@
from pathlib import Path
from docforge.loaders import GriffeLoader, discover_module_paths
from docforge import MkDocsRenderer
from docforge.loaders import GriffeLoader, discover_module_paths
def test_mkdocs_emits_all_modules(tmp_path: Path) -> None:
@@ -23,10 +23,7 @@ def test_mkdocs_emits_all_modules(tmp_path: Path) -> None:
module_is_source=True,
)
emitted = {
p.relative_to(tmp_path).as_posix()
for p in tmp_path.rglob("*.md")
}
emitted = {p.relative_to(tmp_path).as_posix() for p in tmp_path.rglob("*.md")}
module_paths = [m.path for m in project.get_all_modules()]
@@ -34,8 +31,7 @@ def test_mkdocs_emits_all_modules(tmp_path: Path) -> None:
for path in module_paths:
parts = path.split(".")
is_package = any(
other != path and other.startswith(path + ".")
for other in module_paths
other != path and other.startswith(path + ".") for other in module_paths
)
if is_package:

View File

@@ -1,7 +1,7 @@
from pathlib import Path
from docforge import MkDocsRenderer
from docforge.models import Project, Module
from docforge.models import Module, Project
def test_mkdocs_directory_structure(tmp_path: Path):