Skip to content
Snippets Groups Projects
Commit b2ef56f1 authored by Yngve Levinsen's avatar Yngve Levinsen
Browse files

adding new script tracewin_diff

can be used by e.g. git as a difftool
parent 164a4af0
No related branches found
No related tags found
No related merge requests found
Pipeline #97704 failed
#!/usr/bin/env python
"""
Usage:
tracewin_diff Project1.ini Project2.ini
"""
from ess import TraceWin
import sys
if len(sys.argv) < 3:
print(f"Usage: {sys.argv[0]} Project1.ini Project2.ini")
sys.exit(999)
p1 = TraceWin.project(sys.argv[1])
p2 = TraceWin.project(sys.argv[2])
diffs = p1.compare_to(p2)
if not len(diffs):
sys.exit(0)
print(f"Parameter {sys.argv[1]:>51} {sys.argv[2]:>25}")
for d in diffs:
print(f"{d[0]:35} {d[1]:>25} {d[2]:>25}")
print(len(diffs), "parameters were different")
sys.exit(1)
......@@ -28,5 +28,10 @@ setup(
],
packages=["ess"],
package_data={"ess": ["data/*.json"]},
scripts=["scripts/twcli", "scripts/tracewin_errorstudy", "scripts/ibsimu2tw"],
scripts=[
"scripts/twcli",
"scripts/ibsimu2tw",
"scripts/tracewin_errorstudy",
"scripts/tracewin_diff",
],
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment