7 from typing
import Optional, List
8 from os.path
import exists
15 Wrapper around the pot-process command.
19 self, pot_process_tool: Optional[str] =
None, dry_run: bool =
False):
23 f
"pot-process tool does not exist {self.pot_process_tool}"
29 lagrange_output_file: str,
30 lagrange_degree: Optional[int]) -> bool:
31 lagrange_degree = lagrange_degree
or pot_degree
33 [
"--out", lagrange_output_file,
34 "--lagrange-degree",
str(lagrange_degree),
38 def _exec(self, args: List[str]) -> bool:
41 print(f
"CMD: {' '.join(args)}")
43 subprocess.run(args=args, check=
False).returncode == 0
46 def _default_tool() -> str:
47 from os.path
import join, dirname
49 dirname(__file__),
"..",
"..",
"build",
"mpc_tools",
"pot-process")