forked from jangruenwaldt/devops-digital-twin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate_twin.py
20 lines (14 loc) · 883 Bytes
/
create_twin.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import argparse
from features.twins.twin_builder import TwinBuilder
def main(repo_url, twin_name, wipe_db, enable_logs):
TwinBuilder.construct_from_github_data_repo(repo_url=repo_url, twin_name=twin_name,
debug_options={'enable_logs': enable_logs},
wipe_db=wipe_db)
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--repo_url", type=str, required=True, help="Twin data repository URL")
parser.add_argument("--twin_name", type=str, required=True, help="Twin name")
parser.add_argument("--wipe_db", type=bool, default=True, help="Wipe DB")
parser.add_argument("--enable_logs", type=bool, default=True, help="Enable Logs")
args = parser.parse_args()
main(args.repo_url, args.twin_name, args.wipe_db, args.enable_logs)