-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcli.py
More file actions
executable file
·38 lines (30 loc) · 1.27 KB
/
cli.py
File metadata and controls
executable file
·38 lines (30 loc) · 1.27 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import click
from scripts.db_loader import upload_project as up
from scripts.delete_project import delete_project as dp
@click.group()
def manage():
pass
@manage.command()
@click.option('--matrix-stats', type=click.Path(exists=True),
help='Combo Matrix Statistics File (CSV format)',
prompt='Matrix Stats File')
@click.option('--well-stats', help='Combo Well Statistics File (CSV format)',
type=click.Path(exists=True), prompt='Well Stats File')
@click.option('--nlme-stats', help='NLME Stats File (CSV format)',
type=click.Path(exists=True), prompt='NLME Stats File')
@click.option('--name', '--project-name', prompt='Project Name',
help='Project Name', required=True)
def upload_project(matrix_stats, well_stats, nlme_stats, project_name):
"""Upload a project"""
up(combo_matrix_stats_path=matrix_stats, combo_well_stats_path=well_stats,
nlme_stats_path=nlme_stats, project_name=project_name)
@manage.command()
@click.option('--name', '--project-name', prompt='Project Name',
help='Project Name', required=True)
def delete_project(project_name):
"""Delete a project"""
dp(name=project_name)
if __name__ == '__main__':
manage()