-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathscratch_diff.py
More file actions
31 lines (25 loc) · 785 Bytes
/
scratch_diff.py
File metadata and controls
31 lines (25 loc) · 785 Bytes
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
import re
import os
with open('core_talib.txt', 'r') as f:
core_inds = [line.strip() for line in f if line.strip()]
with open('quantwave-polars/src/lib.rs', 'r') as f:
polars_content = f.read()
missing = []
found = 0
for ind in core_inds:
pattern_generic = re.compile(rf'<{ind}>', re.IGNORECASE)
if not pattern_generic.search(polars_content):
func_name = ind.lower()
if ind.startswith("Ta"):
func_name = "ta_" + ind[2:].lower()
if f"fn {func_name}(" not in polars_content:
missing.append(ind)
else:
found += 1
else:
found += 1
print(f"Total checked: {len(core_inds)}")
print(f"Found: {found}")
print(f"Missing: {len(missing)}")
for m in sorted(missing):
print(m)