GLOBAL SOURCE CODE LOG: COMPLETE WORKSPACE MATRIX
import os
def print_header(title):
print("\n" + "="*80)
print(f"### {title}")
print("="*80 + "\n")
def dump_entire_workspace():
target_folders = ["core", "operators", "constitutive", "tests", "audit"]
print_header("GLOBAL SOURCE CODE LOG: COMPLETE WORKSPACE MATRIX")
found_files = 0
for folder in target_folders:
if os.path.isdir(folder):
for root, _, files in os.walk(folder):
for f in sorted(files):
# Skip compiled python cache files or hidden files
if f.endswith('.pyc') or f.startswith('.'):
continue
file_path = os.path.join(root, f)
found_files += 1
print(f"\n📁 FILE: {file_path}")
print("-" * 60)
try:
with open(file_path, "r", encoding="utf-8") as source_file:
content = source_file.read()
if content.strip() == "":
print("[Empty File / Initialization Flag]")
else:
print(content)
except Exception as e:
print(f"⚠️ Error reading file: {e}")
print("-" * 60)
if found_files == 0:
print("⚠️ Warning: No code files detected inside target directories.")
else:
print(f"\n🏁 ALL {found_files} SOURCE FILES DUMPED SUCCESSFULLY.")
# Execute total source snapshot
dump_entire_workspace()