-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfeature_199_main.py
More file actions
59 lines (46 loc) · 1.69 KB
/
Copy pathfeature_199_main.py
File metadata and controls
59 lines (46 loc) · 1.69 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
53
54
55
56
57
58
59
#!/usr/bin/env python3
"""
Feature 199 - Main orchestration script for markdown file creation and git integration.
This script executes the complete workflow:
1. Generate markdown content using Claude API
2. Create markdown file with UTF-8 encoding and LF line endings
3. Validate file encoding and structure
4. Stage file with git add
5. Commit with conventional commit format
6. Push to feature branch on origin
"""
import sys
from pathlib import Path
# Add src to path for imports
sys.path.insert(0, str(Path(__file__).parent))
from src.create_markdown import create_and_commit_markdown_file
from sheep.observability.logging import get_logger
_logger = get_logger(__name__)
def main():
"""Execute Feature 199 complete workflow."""
_logger.info("Starting Feature 199: Markdown File Creation Workflow")
_logger.info("=" * 80)
# Execute the full workflow
result = create_and_commit_markdown_file(
filename="test-nttet0.md",
filepath=None, # Use current working directory
branch_name="feat/199-markdown-file-creation-5e3e07",
)
# Print results
print("\n" + "=" * 80)
print("WORKFLOW RESULTS")
print("=" * 80)
print(f"Success: {result['success']}")
print(f"Steps Completed: {', '.join(result['steps_completed'])}")
if result['steps_failed']:
print(f"Steps Failed: {', '.join(result['steps_failed'])}")
if result['file_path']:
print(f"File: {result['file_path']}")
if result['commit_hash']:
print(f"Commit: {result['commit_hash']}")
if result['errors']:
print(f"Errors: {result['errors']}")
print("=" * 80)
return 0 if result['success'] else 1
if __name__ == "__main__":
sys.exit(main())