tri-star-symbolic-assembly-lang 0.1.49__py3-none-any.whl → 0.1.51__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tri_star_symbolic_assembly_lang-0.1.49.dist-info → tri_star_symbolic_assembly_lang-0.1.51.dist-info}/METADATA +1 -1
- {tri_star_symbolic_assembly_lang-0.1.49.dist-info → tri_star_symbolic_assembly_lang-0.1.51.dist-info}/RECORD +9 -8
- tsal/tools/__init__.py +3 -0
- tsal/tools/proactive_scanner.py +62 -0
- tsal/tools/watchdog.py +35 -2
- {tri_star_symbolic_assembly_lang-0.1.49.dist-info → tri_star_symbolic_assembly_lang-0.1.51.dist-info}/WHEEL +0 -0
- {tri_star_symbolic_assembly_lang-0.1.49.dist-info → tri_star_symbolic_assembly_lang-0.1.51.dist-info}/entry_points.txt +0 -0
- {tri_star_symbolic_assembly_lang-0.1.49.dist-info → tri_star_symbolic_assembly_lang-0.1.51.dist-info}/licenses/LICENSE +0 -0
- {tri_star_symbolic_assembly_lang-0.1.49.dist-info → tri_star_symbolic_assembly_lang-0.1.51.dist-info}/top_level.txt +0 -0
@@ -2,7 +2,7 @@ crawler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
crawler/madmonkey_crawler.py,sha256=itsyxObNBb_9Au3J1Ft6RTNw3dE65fO-WALLD0WFmBM,541
|
3
3
|
madmonkey/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
4
|
madmonkey/intake.py,sha256=R48YOPWn3ljts5dFASZLHpPsycKeONeOCvvIzucyMzU,378
|
5
|
-
tri_star_symbolic_assembly_lang-0.1.
|
5
|
+
tri_star_symbolic_assembly_lang-0.1.51.dist-info/licenses/LICENSE,sha256=mN9d_5LOKa9NB-vFLGwqAp8bggJwjaQ0Pm4DHFMBmIs,2123
|
6
6
|
tsal/__init__.py,sha256=vstGaTBj_Ss0-NKInAkTN5YGn5NmOPnRzn1tocwwYT4,2956
|
7
7
|
tsal/agents/__init__.py,sha256=a3HUdwlTN8d0ripzeftDXuG--R0uA964Rz1tx4EslIs,133
|
8
8
|
tsal/agents/priority_research_team.py,sha256=cHaG52YeApAa9Z7H9fCHtQTF0LgEHTy3azqldnJ58yE,1330
|
@@ -59,7 +59,7 @@ tsal/rl/madmonkey.py,sha256=fW3XfeXKoyfpLnENWkU9y5qqlAysBybhsEs77mLASVc,1870
|
|
59
59
|
tsal/schemas/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
60
60
|
tsal/schemas/python.json,sha256=zt84E7uxy6EvegP4o8A4Pho0vjtkJMdaP_pgV0flCec,691
|
61
61
|
tsal/singer/__init__.py,sha256=Ihe-bvSOoKR3T6H2QJSylYawE3vewyQEghqZyvx1Tfg,282
|
62
|
-
tsal/tools/__init__.py,sha256=
|
62
|
+
tsal/tools/__init__.py,sha256=w8fucCdBoOb6GVBU6SJ1ZHf4D3ox3HBLNUrMNIzxn1A,1373
|
63
63
|
tsal/tools/aletheia_checker.py,sha256=7amOD-8ab_rh2GXbER8qtI4t_9ONcjTWLttP_X3Q1Fo,1529
|
64
64
|
tsal/tools/alignment_guard.py,sha256=kKGtgk7ldFlon-cUNhrh41onIB_WuiQtQWTSQ-i7IEQ,602
|
65
65
|
tsal/tools/archetype_fetcher.py,sha256=PBbuDVK38z_QHu4IxkLwU3NYH78JvN4qSbDFRlXpOZg,1323
|
@@ -70,11 +70,12 @@ tsal/tools/issue_agent.py,sha256=GplkP9i2R0CsbI1HdOTujmHOWLJ7SRmC0sXy35MdhXA,238
|
|
70
70
|
tsal/tools/meshkeeper.py,sha256=Y3R8P6M3jWXCwfp7EMp7jWcqFcmnH1v3YfagZS4yHqE,2474
|
71
71
|
tsal/tools/module_draft.py,sha256=jfS9bU9nJMq1yp7EHD6oTwJQ6eBYzFdr4L1pen_JrIQ,1739
|
72
72
|
tsal/tools/party_tricks.py,sha256=AhIchNiRvCW0BEtA0cdclI0udm7xf17_9DM99KE1h-U,3797
|
73
|
+
tsal/tools/proactive_scanner.py,sha256=D9CH67RB9pjEIuFxtHRHBagxffXCKMknbBXUnHIT1YQ,1787
|
73
74
|
tsal/tools/reflect.py,sha256=ZKX8FczfGgoHAiJF3uYXAbgTUUbamF5UyJA3zVt60kI,1296
|
74
75
|
tsal/tools/spiral_audit.py,sha256=i6lYYpdkHlMGumt5V_rqReAqQEG2YHpUmEjebYRM8_o,2542
|
75
76
|
tsal/tools/state_tracker.py,sha256=OoJlXNlBpypBve5-IJIRZ3E1NxQaI7sUYt437cF-D4c,1539
|
76
77
|
tsal/tools/task_agent.py,sha256=gzavIKgrGinKOBZFZMsdh0AoUVdT7WtCryDIQ4c2Tuo,1403
|
77
|
-
tsal/tools/watchdog.py,sha256=
|
78
|
+
tsal/tools/watchdog.py,sha256=3BXnqFJOl8x6c0J1b7aSmZn5N-PTe-hos_kzTlrcbpk,2094
|
78
79
|
tsal/tools/brian/__init__.py,sha256=PBoCVe7g_Y-Q7irOBRzPvdbmqJrlvqdd_q-qnKK7g3c,191
|
79
80
|
tsal/tools/brian/optimizer.py,sha256=CzdUrEmFfQt5x5iYdhK6Trk-ViIsdnxO5hngwF9p3Ws,7308
|
80
81
|
tsal/tools/kintsugi/__init__.py,sha256=xp3FdbFCEghceasAdl4UEi2OHJ3fZTJzAr4zZd5wIgM,38
|
@@ -94,8 +95,8 @@ tsal/utils/language_db.py,sha256=mw8gVeMK4I6Z0QeQHNAfHYTriAeDfhVVmB911oFdPqM,151
|
|
94
95
|
tsal/utils/octopus_api.py,sha256=1JrhYjbbAbN1-bkCAiInuUNh8bb7EJxB4SHh3Fwq3qs,1315
|
95
96
|
tsal/utils/system_status.py,sha256=cHjG3Ow4YJADYJY383_OdEMEiJAngxyq01z0ADCzV4s,1054
|
96
97
|
tsal/utils/wikipedia_api.py,sha256=W5kf423wzH9FoqO5eDRuJQMuTpTpiUGjVXHa0fLlXSQ,1303
|
97
|
-
tri_star_symbolic_assembly_lang-0.1.
|
98
|
-
tri_star_symbolic_assembly_lang-0.1.
|
99
|
-
tri_star_symbolic_assembly_lang-0.1.
|
100
|
-
tri_star_symbolic_assembly_lang-0.1.
|
101
|
-
tri_star_symbolic_assembly_lang-0.1.
|
98
|
+
tri_star_symbolic_assembly_lang-0.1.51.dist-info/METADATA,sha256=Ve3ceqJ9tl8NQCMIOx1G7HKCrg-3isRXnc679Y8Ck7U,13737
|
99
|
+
tri_star_symbolic_assembly_lang-0.1.51.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
100
|
+
tri_star_symbolic_assembly_lang-0.1.51.dist-info/entry_points.txt,sha256=O8cY2PLbPf53e8gNbI8lFqupalxXYgrnex0eNtvvaNw,426
|
101
|
+
tri_star_symbolic_assembly_lang-0.1.51.dist-info/top_level.txt,sha256=r1-Vpw1iGasgah8k-86xzqpGDT8o-A0P-_6ZNrQ39i0,23
|
102
|
+
tri_star_symbolic_assembly_lang-0.1.51.dist-info/RECORD,,
|
tsal/tools/__init__.py
CHANGED
@@ -14,6 +14,7 @@ from .state_tracker import update_entry, show_entry
|
|
14
14
|
from .archetype_fetcher import fetch_online_mesh, merge_mesh
|
15
15
|
from .task_agent import load_tasks, run_task
|
16
16
|
from .issue_agent import create_issue, handle_http_error
|
17
|
+
from .proactive_scanner import scan_todos, scan_typos
|
17
18
|
|
18
19
|
__all__ = [
|
19
20
|
"real_time_codec",
|
@@ -43,4 +44,6 @@ __all__ = [
|
|
43
44
|
"run_task",
|
44
45
|
"create_issue",
|
45
46
|
"handle_http_error",
|
47
|
+
"scan_todos",
|
48
|
+
"scan_typos",
|
46
49
|
]
|
@@ -0,0 +1,62 @@
|
|
1
|
+
"""Proactive source checks."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
import json
|
6
|
+
from pathlib import Path
|
7
|
+
from typing import Dict, List, Tuple
|
8
|
+
|
9
|
+
from .aletheia_checker import scan_file as _scan_file
|
10
|
+
|
11
|
+
|
12
|
+
def scan_todos(base: str = "src") -> Dict[str, List[Tuple[int, str]]]:
|
13
|
+
"""Return TODO comments grouped by file."""
|
14
|
+
root = Path(base)
|
15
|
+
results: Dict[str, List[Tuple[int, str]]] = {}
|
16
|
+
for path in root.rglob("*.py"):
|
17
|
+
hits: List[Tuple[int, str]] = []
|
18
|
+
with open(path, "r", encoding="utf-8", errors="ignore") as fh:
|
19
|
+
for lineno, line in enumerate(fh, 1):
|
20
|
+
if "TODO" in line:
|
21
|
+
hits.append((lineno, line.strip()))
|
22
|
+
if hits:
|
23
|
+
results[str(path)] = hits
|
24
|
+
return results
|
25
|
+
|
26
|
+
|
27
|
+
def _scan_root(root: Path) -> Dict[str, List[Tuple[int, str]]]:
|
28
|
+
typos: Dict[str, List[Tuple[int, str]]] = {}
|
29
|
+
for file in root.rglob("*.py"):
|
30
|
+
hits = _scan_file(file)
|
31
|
+
if hits:
|
32
|
+
typos[str(file)] = hits
|
33
|
+
return typos
|
34
|
+
|
35
|
+
|
36
|
+
def scan_typos(base: str = "src") -> Dict[str, List[Tuple[int, str]]]:
|
37
|
+
"""Return probable typos grouped by file."""
|
38
|
+
return _scan_root(Path(base))
|
39
|
+
|
40
|
+
|
41
|
+
def main() -> None:
|
42
|
+
import argparse
|
43
|
+
|
44
|
+
parser = argparse.ArgumentParser(description="Run proactive code scans")
|
45
|
+
parser.add_argument("--path", default="src/tsal")
|
46
|
+
parser.add_argument("--todos", action="store_true")
|
47
|
+
parser.add_argument("--typos", action="store_true")
|
48
|
+
args = parser.parse_args()
|
49
|
+
|
50
|
+
if not args.todos and not args.typos:
|
51
|
+
args.todos = args.typos = True
|
52
|
+
|
53
|
+
results = {}
|
54
|
+
if args.todos:
|
55
|
+
results["todos"] = scan_todos(args.path)
|
56
|
+
if args.typos:
|
57
|
+
results["typos"] = scan_typos(args.path)
|
58
|
+
print(json.dumps(results))
|
59
|
+
|
60
|
+
|
61
|
+
if __name__ == "__main__":
|
62
|
+
main()
|
tsal/tools/watchdog.py
CHANGED
@@ -7,9 +7,29 @@ import time
|
|
7
7
|
from pathlib import Path
|
8
8
|
|
9
9
|
from tsal.tools.brian import analyze_and_repair
|
10
|
+
from tsal.tools.aletheia_checker import scan_file as _scan_file
|
10
11
|
|
11
12
|
|
12
|
-
def
|
13
|
+
def _check_todo(path: Path) -> None:
|
14
|
+
text = path.read_text(encoding="utf-8", errors="ignore")
|
15
|
+
if "TODO" in text:
|
16
|
+
print(f"[Watchdog] TODO found in {path}")
|
17
|
+
|
18
|
+
|
19
|
+
def _check_typos(path: Path) -> None:
|
20
|
+
hits = _scan_file(path)
|
21
|
+
if hits:
|
22
|
+
print(f"[Watchdog] Typos found in {path}: {len(hits)}")
|
23
|
+
|
24
|
+
|
25
|
+
def watch(
|
26
|
+
path: str = "src/tsal",
|
27
|
+
interval: float = 30.0,
|
28
|
+
cycles: int = 0,
|
29
|
+
repair: bool = False,
|
30
|
+
todo: bool = False,
|
31
|
+
typos: bool = False,
|
32
|
+
) -> None:
|
13
33
|
"""Monitor ``path`` and run analyze_and_repair on changed files."""
|
14
34
|
base = Path(path)
|
15
35
|
seen = {f: f.stat().st_mtime for f in base.rglob("*.py")}
|
@@ -19,6 +39,10 @@ def watch(path: str = "src/tsal", interval: float = 30.0, cycles: int = 0, repai
|
|
19
39
|
mtime = file.stat().st_mtime
|
20
40
|
if file not in seen or mtime > seen[file]:
|
21
41
|
analyze_and_repair(str(file), repair=repair)
|
42
|
+
if todo:
|
43
|
+
_check_todo(file)
|
44
|
+
if typos:
|
45
|
+
_check_typos(file)
|
22
46
|
seen[file] = mtime
|
23
47
|
count += 1
|
24
48
|
if cycles and count >= cycles:
|
@@ -32,8 +56,17 @@ def main() -> None:
|
|
32
56
|
parser.add_argument("--repair", action="store_true")
|
33
57
|
parser.add_argument("--interval", type=float, default=30.0)
|
34
58
|
parser.add_argument("--cycles", type=int, default=0)
|
59
|
+
parser.add_argument("--todo", action="store_true")
|
60
|
+
parser.add_argument("--typos", action="store_true")
|
35
61
|
args = parser.parse_args()
|
36
|
-
watch(
|
62
|
+
watch(
|
63
|
+
args.path,
|
64
|
+
interval=args.interval,
|
65
|
+
cycles=args.cycles,
|
66
|
+
repair=args.repair,
|
67
|
+
todo=args.todo,
|
68
|
+
typos=args.typos,
|
69
|
+
)
|
37
70
|
|
38
71
|
|
39
72
|
if __name__ == "__main__":
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|