From review of PR #81.
The dotnet initialization block is copy-pasted identically in 4 places (render, render_json, render_diff, render_diff_json) in src/python/src/cli_interface.py:
from pythonnet import load
load("coreclr")
import clr
clr.AddReference(os.path.join(os.path.dirname(__file__), '.dotnet', 'Microsoft.CodeAnalysis.dll'))
clr.AddReference(os.path.join(os.path.dirname(__file__), '.dotnet', 'Archlens.dll'))
from Archlens.CLI import Program
Should be extracted into a helper like _init_dotnet() that returns Program.
Similarly, the plantuml rendering block (calling os.system with python -m plantuml) is duplicated in render and render_diff.
From review of PR #81.
The dotnet initialization block is copy-pasted identically in 4 places (
render,render_json,render_diff,render_diff_json) insrc/python/src/cli_interface.py:Should be extracted into a helper like
_init_dotnet()that returnsProgram.Similarly, the plantuml rendering block (calling
os.systemwithpython -m plantuml) is duplicated inrenderandrender_diff.