vswmc-cli 2.2.1__py2.py3-none-any.whl → 2.2.2.dev412__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vswmc/cli/cp.py +1 -1
- vswmc/cli/ls.py +2 -2
- vswmc/cli/save.py +8 -7
- vswmc/client.py +21 -9
- {vswmc_cli-2.2.1.dist-info → vswmc_cli-2.2.2.dev412.dist-info}/METADATA +1 -1
- {vswmc_cli-2.2.1.dist-info → vswmc_cli-2.2.2.dev412.dist-info}/RECORD +10 -10
- {vswmc_cli-2.2.1.dist-info → vswmc_cli-2.2.2.dev412.dist-info}/WHEEL +0 -0
- {vswmc_cli-2.2.1.dist-info → vswmc_cli-2.2.2.dev412.dist-info}/entry_points.txt +0 -0
- {vswmc_cli-2.2.1.dist-info → vswmc_cli-2.2.2.dev412.dist-info}/licenses/LICENSE +0 -0
- {vswmc_cli-2.2.1.dist-info → vswmc_cli-2.2.2.dev412.dist-info}/top_level.txt +0 -0
vswmc/cli/cp.py
CHANGED
|
@@ -26,7 +26,7 @@ def do_cp(args):
|
|
|
26
26
|
def do_cp_new(args):
|
|
27
27
|
client = utils.create_client(args)
|
|
28
28
|
run, src_file = args.src.split(":")
|
|
29
|
-
content = client.
|
|
29
|
+
content = client.get_run_result_presign_content(run, src_file)
|
|
30
30
|
_, src_filename = os.path.split(src_file)
|
|
31
31
|
|
|
32
32
|
if os.path.isdir(args.dst):
|
vswmc/cli/ls.py
CHANGED
|
@@ -23,9 +23,9 @@ def do_ls(args):
|
|
|
23
23
|
|
|
24
24
|
def do_ls_new(args):
|
|
25
25
|
client = utils.create_client(args)
|
|
26
|
-
|
|
26
|
+
results = client.list_run_results(args.run)
|
|
27
27
|
rows = []
|
|
28
|
-
for result in
|
|
28
|
+
for result in results:
|
|
29
29
|
if args.l:
|
|
30
30
|
rows.append(
|
|
31
31
|
[
|
vswmc/cli/save.py
CHANGED
|
@@ -17,14 +17,15 @@ def do_save(args):
|
|
|
17
17
|
|
|
18
18
|
def do_save_new(args):
|
|
19
19
|
client = utils.create_client(args)
|
|
20
|
-
|
|
21
|
-
if not
|
|
22
|
-
print("No
|
|
20
|
+
results = client.list_run_results(args.run)
|
|
21
|
+
if not results:
|
|
22
|
+
print("No results available for run {}".format(args.run))
|
|
23
23
|
return
|
|
24
|
-
os.
|
|
25
|
-
for
|
|
26
|
-
content = client.
|
|
27
|
-
target_file = os.path.join(args.run,
|
|
24
|
+
os.makedirs(args.run, exist_ok=True)
|
|
25
|
+
for result in results:
|
|
26
|
+
content = client.get_run_result_presign_content(args.run, result["path"])
|
|
27
|
+
target_file = os.path.join(args.run, result["path"])
|
|
28
|
+
os.makedirs(os.path.dirname(target_file), exist_ok=True)
|
|
28
29
|
print("Saving {}".format(target_file))
|
|
29
30
|
with open(target_file, "wb") as f:
|
|
30
31
|
f.write(content)
|
vswmc/client.py
CHANGED
|
@@ -97,22 +97,34 @@ class VswmcClient(object):
|
|
|
97
97
|
path = "{}/runs/{}".format(self.api_root, run)
|
|
98
98
|
return self._request("get", path=path).json()
|
|
99
99
|
|
|
100
|
-
def
|
|
101
|
-
path = "{}/runs/{}/
|
|
100
|
+
def list_run_results(self, run):
|
|
101
|
+
path = "{}/runs/{}/results".format(self.api_root, run)
|
|
102
102
|
return self._request("get", path=path).json()
|
|
103
103
|
|
|
104
|
-
def
|
|
105
|
-
path = "{}/runs/{}/
|
|
104
|
+
def get_run_result(self, run, name):
|
|
105
|
+
path = "{}/runs/{}/results/{}".format(self.api_root, run, name)
|
|
106
106
|
return self._request("get", path=path).content
|
|
107
107
|
|
|
108
|
-
def
|
|
109
|
-
path = "{}/runs/{}/
|
|
108
|
+
def get_run_result_presign_url(self, run, name):
|
|
109
|
+
path = "{}/runs/{}/results/{}/presign".format(self.api_root, run, name)
|
|
110
110
|
return self._request("get", path=path).json()
|
|
111
111
|
|
|
112
|
-
def
|
|
113
|
-
presign = self.
|
|
112
|
+
def get_run_result_presign_content(self, run, name):
|
|
113
|
+
presign = self.get_run_result_presign_url(run, name)
|
|
114
114
|
return requests.get(url=presign["url"]).content
|
|
115
115
|
|
|
116
|
+
def list_run_outputs(self, run):
|
|
117
|
+
return self.list_run_results(run)
|
|
118
|
+
|
|
119
|
+
def get_run_output(self, run, name):
|
|
120
|
+
return self.get_run_result(run, name)
|
|
121
|
+
|
|
122
|
+
def get_run_output_presign_url(self, run, name):
|
|
123
|
+
return self.get_run_result_presign_url(run, name)
|
|
124
|
+
|
|
125
|
+
def get_run_output_presign_content(self, run, name):
|
|
126
|
+
return self.get_run_result_presign_content(run, name)
|
|
127
|
+
|
|
116
128
|
def download_logs(self, run):
|
|
117
129
|
path = "{}/runs/{}/log".format(self.api_root, run)
|
|
118
130
|
return self._request("get", path=path, params={"raw": "yes"}).content
|
|
@@ -122,7 +134,7 @@ class VswmcClient(object):
|
|
|
122
134
|
return self._request("get", path=path).content
|
|
123
135
|
|
|
124
136
|
def download_results(self, run):
|
|
125
|
-
path = "{}/runs/{}/results".format(self.api_root, run)
|
|
137
|
+
path = "{}/runs/{}/results/archive".format(self.api_root, run)
|
|
126
138
|
return self._request("get", path=path).content
|
|
127
139
|
|
|
128
140
|
def follow_logs(self, run, on_data):
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
vswmc/__init__.py,sha256=IPsitsCPgSqTEDw0JGVZvpBuNFE5ERXtYKnxuJm-EZE,41
|
|
2
|
-
vswmc/client.py,sha256=
|
|
2
|
+
vswmc/client.py,sha256=u7fREVoxtQvQ3nxAeo3r1KnDUegOM7RMXTuBdPupQbU,7486
|
|
3
3
|
vswmc/sockjs.py,sha256=E4Ng4cgILrL8J6UUSdp7I478CdrzDPb45tCwdIWrwPQ,2459
|
|
4
4
|
vswmc/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
vswmc/cli/__main__.py,sha256=ayilQ5mMSiZNC0U5NPWw2LLpW20PTZ1rMNKVGoJZjQ4,3433
|
|
6
|
-
vswmc/cli/cp.py,sha256=
|
|
6
|
+
vswmc/cli/cp.py,sha256=4yp40TaCK0PgTeMNc3DXFtE44QhMt0Ik3qpY2MtULP0,1141
|
|
7
7
|
vswmc/cli/logs.py,sha256=YKOklqEp4uvGDib4GO25byoQDBa57S4mgdD0Ia6kGDA,741
|
|
8
|
-
vswmc/cli/ls.py,sha256=
|
|
8
|
+
vswmc/cli/ls.py,sha256=FDckp4Kb7OTDOW_yK9GpSKCs00dEu_Q2ROaLA9TZ8vY,1129
|
|
9
9
|
vswmc/cli/models.py,sha256=q4zUzBlH0kceoPrwp7O4o90JjywMlZ9P-xffpPr5eho,1012
|
|
10
10
|
vswmc/cli/products.py,sha256=wYhwgT_JjEBzDL_OfWuynZb08nMGEKWFceTuXbxns4Y,3719
|
|
11
11
|
vswmc/cli/ps.py,sha256=PlTzf55iFNiV2nDGNMkDcqY8dNyl0_EUpkU96YUoZNA,1035
|
|
12
12
|
vswmc/cli/rm.py,sha256=iqIyp08CAWJYtwu9LVX4mzFnpQ0qHdZZDu-OLN_ceNo,352
|
|
13
13
|
vswmc/cli/run.py,sha256=mRMLkWs9KMuEGhOJyxiPvYeKpsa55rgomjQjW2eeXEo,2368
|
|
14
|
-
vswmc/cli/save.py,sha256=
|
|
14
|
+
vswmc/cli/save.py,sha256=KeXppOqlI4vrPxlVfx0O05Lcr4mwnLMfnJo0ImjsZEE,1082
|
|
15
15
|
vswmc/cli/simulations.py,sha256=lP0lBV-VGUBQ8WBL-lCCz2_vcJDxfu15zIZlmaPJj-s,1509
|
|
16
16
|
vswmc/cli/stop.py,sha256=txJ3DRxBsTe6EZ1WOL8rKt0rOluzkLhPCaHa19CCZq8,352
|
|
17
17
|
vswmc/cli/utils.py,sha256=IJChPtvrV04G5tYxcm5_89ylpRW0Bx2bS0aM4jid0yY,1583
|
|
@@ -19,9 +19,9 @@ vswmc/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
19
19
|
vswmc/core/auth.py,sha256=YclGruWgPZb2SyZiX_uJIuVbDYvsYbxg9fEMSV6FUKU,95
|
|
20
20
|
vswmc/core/exceptions.py,sha256=nbQEgCg1SSnJYr9iomXJaKzK-Heu2njpW_SioibR9UY,443
|
|
21
21
|
vswmc/core/helpers.py,sha256=BeIpbz9CpCE4cS9TTQwTtVi35cUsWN-6e7lmVu82sDY,719
|
|
22
|
-
vswmc_cli-2.2.
|
|
23
|
-
vswmc_cli-2.2.
|
|
24
|
-
vswmc_cli-2.2.
|
|
25
|
-
vswmc_cli-2.2.
|
|
26
|
-
vswmc_cli-2.2.
|
|
27
|
-
vswmc_cli-2.2.
|
|
22
|
+
vswmc_cli-2.2.2.dev412.dist-info/licenses/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
|
|
23
|
+
vswmc_cli-2.2.2.dev412.dist-info/METADATA,sha256=94tAKXtUoeTJsmC6hDBZMWlg-cUkYc1AgZM6dNMRgLQ,4751
|
|
24
|
+
vswmc_cli-2.2.2.dev412.dist-info/WHEEL,sha256=TdQ5LtNwLuxTCjgxN51AgdU5w-KkB9ttmLbzjTH02pg,109
|
|
25
|
+
vswmc_cli-2.2.2.dev412.dist-info/entry_points.txt,sha256=Lc1-M9eBt4eCnnRb8Q-NWM1OSwyO6UDdK7l97nQ_RO0,50
|
|
26
|
+
vswmc_cli-2.2.2.dev412.dist-info/top_level.txt,sha256=SSaXSamS4BaN_CDCtVo95MfjZ2bo7x7KYnVvPN_CtY4,6
|
|
27
|
+
vswmc_cli-2.2.2.dev412.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|