-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_docstringinator.py
More file actions
52 lines (35 loc) · 1.17 KB
/
run_docstringinator.py
File metadata and controls
52 lines (35 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env python3
"""Script to run docstringinator with YAML config."""
import sys
from pathlib import Path
# Add the docstringinator package to the path
sys.path.insert(0, str(Path(__file__).parent))
from docstringinator.core import Docstringinator
def main() -> None:
"""
Analyse the system and generate documentation for the run_docstringinator module.
This function serves as the entry point for the application, initiating the analysis process and generating documentation accordingly.
Args:
None
Returns:
None
Raises:
SystemError: If an error occurs during the analysis process.
Example:
>>> main()
"""
try:
# Initialize docstringinator with the YAML config
docstringinator = Docstringinator(config_path="docstringinator.yaml")
# Process the current directory
result = docstringinator.fix_directory(".")
# Print results
docstringinator.print_batch_results(result)
if result.failed_files > 0:
sys.exit(1)
except Exception:
import traceback
traceback.print_exc()
sys.exit(1)
if __name__ == "__main__":
main()