outerbounds 0.3.52rc2__py3-none-any.whl → 0.3.52rc4__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- outerbounds/command_groups/local_setup_cli.py +14 -49
- {outerbounds-0.3.52rc2.dist-info → outerbounds-0.3.52rc4.dist-info}/METADATA +1 -1
- {outerbounds-0.3.52rc2.dist-info → outerbounds-0.3.52rc4.dist-info}/RECORD +5 -5
- {outerbounds-0.3.52rc2.dist-info → outerbounds-0.3.52rc4.dist-info}/WHEEL +0 -0
- {outerbounds-0.3.52rc2.dist-info → outerbounds-0.3.52rc4.dist-info}/entry_points.txt +0 -0
@@ -805,22 +805,6 @@ def switch_perimeter(output="", id=None, force=False):
|
|
805
805
|
"Perimeter was successfully switched!",
|
806
806
|
)
|
807
807
|
|
808
|
-
if "WORKSTATION_ID" not in os.environ:
|
809
|
-
click.secho(
|
810
|
-
"outerbounds switch-perimeter is only supported on workstations.",
|
811
|
-
fg="red",
|
812
|
-
err=True,
|
813
|
-
)
|
814
|
-
switch_perimeter_step.update(
|
815
|
-
status=OuterboundsCommandStatus.FAIL,
|
816
|
-
reason="outerbounds switch-perimeter is only supported on workstations.",
|
817
|
-
mitigation="",
|
818
|
-
)
|
819
|
-
switch_perimeter_response.add_step(switch_perimeter_step)
|
820
|
-
if output == "json":
|
821
|
-
click.echo(json.dumps(switch_perimeter_response.as_dict(), indent=4))
|
822
|
-
return
|
823
|
-
|
824
808
|
metaflow_home_dir = path.expanduser(
|
825
809
|
os.environ.get("METAFLOW_HOME", "~/.metaflowconfig")
|
826
810
|
)
|
@@ -881,6 +865,7 @@ def switch_perimeter(output="", id=None, force=False):
|
|
881
865
|
click.secho(
|
882
866
|
"Force flag is set. Perimeter will be switched, but can have unintended consequences on other running processes.",
|
883
867
|
fg="yellow",
|
868
|
+
err=True,
|
884
869
|
)
|
885
870
|
|
886
871
|
ob_config_dict = {"OB_CURRENT_PERIMETER": id}
|
@@ -889,9 +874,12 @@ def switch_perimeter(output="", id=None, force=False):
|
|
889
874
|
with os.fdopen(fd, "w") as file:
|
890
875
|
json.dump(ob_config_dict, file, indent=4)
|
891
876
|
|
892
|
-
click.secho("Perimeter switched to {}".format(id), fg="green")
|
877
|
+
click.secho("Perimeter switched to {}".format(id), fg="green", err=True)
|
893
878
|
except BlockingIOError:
|
894
879
|
# This exception is raised if the file is already locked (non-blocking mode)
|
880
|
+
# Note that its the metaflow package (the extension actually) that acquires a shared read lock
|
881
|
+
# on the file whenever a process imports metaflow.
|
882
|
+
# In the future we might want to get smarter about it and show which process is holding the lock.
|
895
883
|
click.secho(
|
896
884
|
"Can't switch perimeter while Metaflow is in use. Please make sure there are no running python processes or notebooks using metaflow.",
|
897
885
|
fg="red",
|
@@ -926,22 +914,6 @@ def show_current_perimeter(output=""):
|
|
926
914
|
"Current Perimeter Fetch Successful.",
|
927
915
|
)
|
928
916
|
|
929
|
-
if "WORKSTATION_ID" not in os.environ:
|
930
|
-
click.secho(
|
931
|
-
"outerbounds switch-perimeter is only supported on workstations.",
|
932
|
-
fg="red",
|
933
|
-
err=True,
|
934
|
-
)
|
935
|
-
show_current_perimeter_step.update(
|
936
|
-
status=OuterboundsCommandStatus.FAIL,
|
937
|
-
reason="outerbounds show-current-perimeter is only supported on workstations.",
|
938
|
-
mitigation="",
|
939
|
-
)
|
940
|
-
show_current_perimeter_response.add_step(show_current_perimeter_step)
|
941
|
-
if output == "json":
|
942
|
-
click.echo(json.dumps(show_current_perimeter_response.as_dict(), indent=4))
|
943
|
-
return
|
944
|
-
|
945
917
|
metaflow_home_dir = path.expanduser(
|
946
918
|
os.environ.get("METAFLOW_HOME", "~/.metaflowconfig")
|
947
919
|
)
|
@@ -1000,6 +972,7 @@ def show_current_perimeter(output=""):
|
|
1000
972
|
click.secho(
|
1001
973
|
"Current Perimeter: {}".format(ob_config_dict["OB_CURRENT_PERIMETER"]),
|
1002
974
|
fg="green",
|
975
|
+
err=True,
|
1003
976
|
)
|
1004
977
|
show_current_perimeter_response.add_or_update_data(
|
1005
978
|
"current_perimeter", ob_config_dict["OB_CURRENT_PERIMETER"]
|
@@ -1043,22 +1016,6 @@ def list_perimeters(output=""):
|
|
1043
1016
|
"ListPerimeters", OuterboundsCommandStatus.OK, "Perimeter Fetch Successful."
|
1044
1017
|
)
|
1045
1018
|
|
1046
|
-
if "WORKSTATION_ID" not in os.environ:
|
1047
|
-
click.secho(
|
1048
|
-
"outerbounds list-perimeters is only supported on workstations.",
|
1049
|
-
fg="red",
|
1050
|
-
err=True,
|
1051
|
-
)
|
1052
|
-
list_perimeters_step.update(
|
1053
|
-
status=OuterboundsCommandStatus.FAIL,
|
1054
|
-
reason="outerbounds list-perimeters is only supported on workstations.",
|
1055
|
-
mitigation="",
|
1056
|
-
)
|
1057
|
-
list_perimeters_response.add_step(list_perimeters_step)
|
1058
|
-
if output == "json":
|
1059
|
-
click.echo(json.dumps(list_perimeters_response.as_dict(), indent=4))
|
1060
|
-
return
|
1061
|
-
|
1062
1019
|
metaflow_home_dir = path.expanduser(
|
1063
1020
|
os.environ.get("METAFLOW_HOME", "~/.metaflowconfig")
|
1064
1021
|
)
|
@@ -1134,8 +1091,12 @@ def list_perimeters(output=""):
|
|
1134
1091
|
),
|
1135
1092
|
)
|
1136
1093
|
list_perimeters_response.add_step(list_perimeters_step)
|
1094
|
+
if output == "json":
|
1095
|
+
click.echo(json.dumps(list_perimeters_response.as_dict(), indent=4))
|
1137
1096
|
return
|
1138
1097
|
|
1098
|
+
click.secho("Perimeter: {} (active)".format(active_perimeter), fg="green", err=True)
|
1099
|
+
|
1139
1100
|
perimeter_list = []
|
1140
1101
|
for file in os.listdir(metaflow_home_dir):
|
1141
1102
|
if file.startswith("config_") and file.endswith(".json"):
|
@@ -1144,6 +1105,10 @@ def list_perimeters(output=""):
|
|
1144
1105
|
{"id": perimeter_id, "active": perimeter_id == active_perimeter}
|
1145
1106
|
)
|
1146
1107
|
|
1108
|
+
if perimeter_id != active_perimeter:
|
1109
|
+
click.secho("Perimeter: {}".format(perimeter_id), err=True)
|
1110
|
+
|
1147
1111
|
list_perimeters_response.add_or_update_data("perimeters", perimeter_list)
|
1112
|
+
|
1148
1113
|
if output == "json":
|
1149
1114
|
click.echo(json.dumps(list_perimeters_response.as_dict(), indent=4))
|
@@ -2,13 +2,13 @@ outerbounds/__init__.py,sha256=GPdaubvAYF8pOFWJ3b-sPMKCpyfpteWVMZWkmaYhxRw,32
|
|
2
2
|
outerbounds/cli_main.py,sha256=e9UMnPysmc7gbrimq2I4KfltggyU7pw59Cn9aEguVcU,74
|
3
3
|
outerbounds/command_groups/__init__.py,sha256=QPWtj5wDRTINDxVUL7XPqG3HoxHNvYOg08EnuSZB2Hc,21
|
4
4
|
outerbounds/command_groups/cli.py,sha256=61VsBlPG2ykP_786eCyllqeM8DMhPAOfj2FhktrSd7k,207
|
5
|
-
outerbounds/command_groups/local_setup_cli.py,sha256=
|
5
|
+
outerbounds/command_groups/local_setup_cli.py,sha256=fHZJTFJJO49X0_uhAmDwyOMtvOZVlbMxAF9iLs8euwo,40672
|
6
6
|
outerbounds/command_groups/workstations_cli.py,sha256=rV8_DlF7coEmJ84VLEtqo6-HyY3ALAyU_ig6Cy-8npk,18605
|
7
7
|
outerbounds/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
8
|
outerbounds/utils/kubeconfig.py,sha256=l1mUP1j9VIq3fsffi5bJ1Nk-hYlwd1dIqkpj7DvVS1E,7936
|
9
9
|
outerbounds/utils/metaflowconfig.py,sha256=_Khqzu0KE6X05KkVbb39GXN6CFpG2WRr6Xs35pT2l7A,3299
|
10
10
|
outerbounds/utils/schema.py,sha256=4_ONlvZGpBb51KKd-q6mNSKWI9P1huOKafrsf9kVqp8,2152
|
11
|
-
outerbounds-0.3.
|
12
|
-
outerbounds-0.3.
|
13
|
-
outerbounds-0.3.
|
14
|
-
outerbounds-0.3.
|
11
|
+
outerbounds-0.3.52rc4.dist-info/METADATA,sha256=LJHnhTVbFMczpzkSvjtj1YsPo70s2jnxDCuEy-tJLf4,1367
|
12
|
+
outerbounds-0.3.52rc4.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
|
13
|
+
outerbounds-0.3.52rc4.dist-info/entry_points.txt,sha256=7ye0281PKlvqxu15rjw60zKg2pMsXI49_A8BmGqIqBw,47
|
14
|
+
outerbounds-0.3.52rc4.dist-info/RECORD,,
|
File without changes
|
File without changes
|