-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpmap.py
More file actions
38 lines (33 loc) · 1.3 KB
/
pmap.py
File metadata and controls
38 lines (33 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import click
from make import generate_dbi_for_pmap_project
from project import run_configure_existing_project, run_configure_pmap_project
def run_select_pmap_options(ctx, option):
if option:
if option == "project":
choice = "1"
elif option == "existing":
choice = "2"
elif option == "dbi-connect":
choice = "3"
else:
click.secho("Invalid option.", fg="red", bold=True)
exit(1)
else:
click.secho("🧬 PMAP Tools\n", fg="green", bold=True)
click.secho("Select from one of the below options:\n", fg="green")
click.secho("(1) Configure a new PMAP project", fg="white")
click.secho("(2) Configure an existing PMAP project", fg="white")
click.secho("(3) Create a DBI connection file for an existing PMAP project", fg="white")
click.secho("(4) Cancel\n", fg="white")
choice = click.prompt("Enter your choice", type=click.Choice(["1", "2", "3", "4"]))
if choice == "1":
run_configure_pmap_project()
elif choice == "2":
run_configure_existing_project(project_type="pmap")
elif choice == "3":
generate_dbi_for_pmap_project()
elif choice == "4":
click.secho("Cancelled.", fg="red", bold=True)
exit(1)
else:
exit(0)