File size: 619 Bytes
20b4034
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env python3
from __future__ import annotations

import argparse
from pathlib import Path


def main() -> None:
    parser = argparse.ArgumentParser()
    parser.add_argument("--root", type=Path, default=Path(__file__).resolve().parents[1])
    args = parser.parse_args()
    root = args.root.resolve()
    template = root / "configs" / "stage2_covt.template.yaml"
    output = root / "configs" / "stage2_covt.yaml"
    content = template.read_text(encoding="utf-8").replace("__UMM_ROOT__", str(root))
    output.write_text(content, encoding="utf-8")
    print(output)


if __name__ == "__main__":
    main()