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,6 +1,8 @@
from pathlib import Path
from docforge.cli.main import cli
def test_mcp_build(cli_runner):
with cli_runner.isolated_filesystem():
cwd = Path.cwd()

View File

@@ -1,6 +1,8 @@
from pathlib import Path
from docforge.cli.main import cli
def test_mkdocs_build_full_flow(
cli_runner,
mock_mkdocs_build,
@@ -17,11 +19,11 @@ def test_mkdocs_build_full_flow(
nav_file = cwd / "docforge.nav.yml"
nav_file.write_text("home: testpkg/index.md\ngroups: {}\n")
# We need to create a dummy testpkg/index.md for nav resolution if it's there
# But generate_sources will create it.
# But generate_sources will create it.
# Wait, the current logic runs generate_sources first, THEN generate_config.
result = cli_runner.invoke(
cli,
[
@@ -43,11 +45,13 @@ def test_mkdocs_build_full_flow(
assert (cwd / "mkdocs.yml").exists()
assert (cwd / "docs" / "testpkg" / "mod.md").exists()
def test_mkdocs_build_missing_module_fails(cli_runner):
result = cli_runner.invoke(cli, ["build", "--mkdocs", "--site-name", "Test"])
assert result.exit_code != 0
assert "--module is required" in result.output
def test_mkdocs_build_without_site_name_uses_module_as_default_full_flow(
cli_runner,
mock_mkdocs_build,

View File

@@ -1,5 +1,6 @@
from docforge.cli.main import cli
def test_mcp_serve(
cli_runner,
fake_mcp_docs,

View File

@@ -1,5 +1,6 @@
from docforge.cli.main import cli
def test_mkdocs_serve(
cli_runner,
fake_mkdocs_yml,