| Conditions | 5 |
| Total Lines | 22 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import os |
||
| 10 | def main(): |
||
| 11 | # Determine if we run python or python3 |
||
| 12 | if platform.system() == "Windows": |
||
| 13 | py = "python" |
||
| 14 | else: |
||
| 15 | py = "python3" |
||
| 16 | |||
| 17 | if len(sys.argv) > 1: |
||
| 18 | config_file_path = sys.argv[1] |
||
| 19 | else: |
||
| 20 | config_file_path = setup_utils.get_default_config_file_path() |
||
| 21 | print(f"Using config file at {config_file_path}") |
||
| 22 | port, auth_on, prefix = setup_utils.parse_config(config_file_path) |
||
| 23 | if auth_on: |
||
| 24 | auth_args = setup_utils.get_creds() |
||
| 25 | else: |
||
| 26 | auth_args = [] |
||
| 27 | |||
| 28 | directory = str(Path(__file__).resolve().parent / "scripts") |
||
| 29 | # Deploy each model in the scripts directory |
||
| 30 | for filename in os.listdir(directory): |
||
| 31 | subprocess.run([py, f"{directory}/{filename}", config_file_path] + auth_args) |
||
| 32 | |||
| 36 |