Update state.json and development plan to reflect actual progress (~15%)
- state.json: Phase 5 status changed to pending, next steps updated - DEVELOPMENT_PLAN.md v1.1: Added actual progress, verified current state, renumbered phases 5-9, marked all remaining work as PENDING - Deleted outdated plans (BACKEND_TEST_PLAN, DATA_LOADING_VERIFICATION, DOCKER_MIGRATION_PLAN, ENDPOINT_AUDIT, ROADMAP, SIMPLIFICATION_PLAN, STATEMENT_OF_INTENT, backend/TEST_PLAN) - Added new files: DEVELOPMENT_PLAN.md, backend/ARCHITECTURAL_REPORT.md, backend/SIMPLIFICATION_SUMMARY.md, backend/run.py, backend/.dockerignore
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Fix schemas/__init__.py by removing proto_messages and protocol_constants imports."""
|
||||
|
||||
init_path = 'app/schemas/__init__.py'
|
||||
|
||||
with open(init_path, 'r') as f:
|
||||
lines = f.readlines()
|
||||
|
||||
# Find and remove the proto_messages import block
|
||||
new_lines = []
|
||||
skip_until_close_paren = False
|
||||
skip_comment = False
|
||||
|
||||
i = 0
|
||||
while i < len(lines):
|
||||
line = lines[i]
|
||||
|
||||
# Skip proto_messages import block
|
||||
if 'from app.schemas.proto_messages import' in line:
|
||||
# Skip until we find the closing paren
|
||||
while i < len(lines) and ')' not in lines[i]:
|
||||
i += 1
|
||||
i += 1 # skip the closing paren line
|
||||
continue
|
||||
|
||||
# Skip protocol_constants import block
|
||||
if 'from app.schemas.protocol_constants import' in line:
|
||||
while i < len(lines) and ')' not in lines[i]:
|
||||
i += 1
|
||||
i += 1
|
||||
continue
|
||||
|
||||
# Skip proto_messages and protocol_constants entries in __all__
|
||||
if '# Proto Messages' in line:
|
||||
skip_comment = True
|
||||
i += 1
|
||||
continue
|
||||
|
||||
if '# Protocol Constants' in line:
|
||||
i += 1
|
||||
continue
|
||||
|
||||
if skip_comment:
|
||||
# Skip lines until we hit the next comment or end of __all__
|
||||
if line.strip().startswith('"') and not line.strip().startswith('"):'):
|
||||
# This is still part of the proto/protocol entries
|
||||
i += 1
|
||||
continue
|
||||
else:
|
||||
skip_comment = False
|
||||
new_lines.append(line)
|
||||
i += 1
|
||||
continue
|
||||
|
||||
new_lines.append(line)
|
||||
i += 1
|
||||
|
||||
with open(init_path, 'w') as f:
|
||||
f.writelines(new_lines)
|
||||
|
||||
print(f"Fixed {init_path}")
|
||||
print(f"Original: {len(lines)} lines, New: {len(new_lines)} lines")
|
||||
Reference in New Issue
Block a user