feat(src): Resolve imports and create sloppy.py entry point

This commit is contained in:
2026-03-04 10:01:55 -05:00
parent a0276e0894
commit c102392320
44 changed files with 90 additions and 21 deletions

20
scripts/update_paths.py Normal file
View File

@@ -0,0 +1,20 @@
import os
import glob
pattern = 'sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))'
replacement = pattern + '\nsys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))'
# Files to update
files = glob.glob("tests/*.py") + glob.glob("simulation/*.py") + glob.glob("scripts/*.py")
for file_path in files:
if not os.path.isfile(file_path):
continue
with open(file_path, 'r', encoding='utf-8') as f:
content = f.read()
if pattern in content and replacement not in content:
print(f"Updating {file_path}")
new_content = content.replace(pattern, replacement)
with open(file_path, 'w', encoding='utf-8') as f:
f.write(new_content)