File tree Expand file tree Collapse file tree 3 files changed +2454
-3
lines changed
Expand file tree Collapse file tree 3 files changed +2454
-3
lines changed Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python
2+
3+ from argparse import ArgumentError
4+ import warnings
5+ import os , sys
6+
7+ def confirm_y_n ():
8+ while True :
9+ resp = str (input ("Continue with operation? (Y/n): " )).lower ().strip ()
10+ if resp [0 ] == 'y' :
11+ return True
12+ if resp [0 ] == 'n' :
13+ print ("Exiting application..." )
14+ sys .exit (0 )
15+ print ("Please enter y or n." )
16+
17+
18+ def bootstrap ():
19+ """
20+ Retrieve data files needed to build AlzKB from scratch and organize them
21+ into the required directory structure.
22+ """
23+ pass
24+
25+ def build ():
26+ """
27+ Populate the AlzKB ontology using the local copies of the source databases.
28+ """
29+ pass
30+
31+ def install ():
32+ """
33+ Import the contents of the AlzKB populated ontology into Neoj4.
34+ """
35+ pass
36+
37+ def main ():
38+ args = sys .argv
39+
40+ try :
41+ assert len (args ) > 1
42+ except AssertionError :
43+ raise ArgumentError ("Error - must provide one of `bootstrap`, `build`, or `install` as an argument to `alzkb`. See the README for more information." )
44+
45+ if len (args ) > 2 :
46+ warnings .warn ("Multiple arguments provided - only the first will be used." )
47+
48+ op_arg = args [1 ].lower ()
49+
50+ if op_arg == 'bootstrap' :
51+ bootstrap ()
52+ elif op_arg == 'build' :
53+ build ()
54+ elif op_arg == 'install' :
55+ install ()
56+ else :
57+ raise ArgumentError ("Error - must provide one of `bootstrap`, `build`, or `install` as an argument to `alzkb`. See the README for more information." )
You can’t perform that action at this time.
0 commit comments