docs: убран скрипт gen_docs.py, только pre-commit hook
- Удалена директория scripts/ - Убран gen-docs из pyproject.toml - Документация генерируется только через pre-commit hook
This commit is contained in:
parent
e838399910
commit
706dfde40e
1949
api_reference.md
Normal file
1949
api_reference.md
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -99,5 +99,4 @@ exclude_lines = [
|
||||
"if TYPE_CHECKING:",
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
gen-docs = "scripts.gen_docs:main"
|
||||
|
||||
|
||||
@ -1,41 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Generate API documentation using pydoc-markdown."""
|
||||
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def main():
|
||||
"""Generate API documentation."""
|
||||
project_root = Path(__file__).parent.parent
|
||||
docs_dir = project_root / "docs"
|
||||
|
||||
docs_dir.mkdir(exist_ok=True)
|
||||
|
||||
print("📝 Generating API documentation...")
|
||||
result = subprocess.run(
|
||||
["pydoc-markdown"],
|
||||
cwd=project_root,
|
||||
capture_output=False,
|
||||
)
|
||||
|
||||
if result.returncode != 0:
|
||||
print("❌ Failed to generate documentation")
|
||||
return 1
|
||||
|
||||
# Move generated file to docs/
|
||||
generated = project_root / "api_reference.md"
|
||||
if generated.exists():
|
||||
generated.rename(docs_dir / "api_reference.md")
|
||||
print("✅ Documentation generated: docs/api_reference.md")
|
||||
else:
|
||||
print("❌ api_reference.md not found")
|
||||
return 1
|
||||
|
||||
print("\n✨ Done!")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
Loading…
Reference in New Issue
Block a user