-
Notifications
You must be signed in to change notification settings - Fork 176
Expand file tree
/
Copy pathabel.py
More file actions
52 lines (46 loc) · 1.57 KB
/
Copy pathabel.py
File metadata and controls
52 lines (46 loc) · 1.57 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the License);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an AS IS BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Main module for DBO explorer."""
import sys
# pylint: disable=g-importing-member
from model.arg_parser import ParseArgs
from model.workflow import Workflow
def main(parsed_args: ParseArgs) -> None:
print(
'\nHow would you like to use ABEL?\n'
+ '1: Create a building config yaml file from a spreadsheet.\n'
+ '2: Create a spreadsheet from a building config.\n'
+ 'q: quit\n'
)
function_choice = input('Please select an option: ')
new_workflow = Workflow(
parsed_args.credential,
parsed_args.modified_types_filepath,
parsed_args.output_dir
)
if function_choice == '1':
new_workflow.SpreadsheetWorkflow(
parsed_args.spreadsheet_id,
parsed_args.building_config,
parsed_args.subscription,
parsed_args.timeout
)
elif function_choice == '2':
new_workflow.ConfigWorkflow(parsed_args.building_config)
elif function_choice == 'q':
print('Bye bye')
sys.exit()
if __name__ == '__main__':
args = ParseArgs().parse_args(sys.argv[1:])
main(args)