atlasai-dstoolkit-client 0.0.16__py3-none-any.whl → 0.0.17__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.
- atlasai/toolkit/workflows.py +8 -7
- {atlasai_dstoolkit_client-0.0.16.dist-info → atlasai_dstoolkit_client-0.0.17.dist-info}/METADATA +1 -1
- {atlasai_dstoolkit_client-0.0.16.dist-info → atlasai_dstoolkit_client-0.0.17.dist-info}/RECORD +6 -6
- {atlasai_dstoolkit_client-0.0.16.dist-info → atlasai_dstoolkit_client-0.0.17.dist-info}/LICENSE.txt +0 -0
- {atlasai_dstoolkit_client-0.0.16.dist-info → atlasai_dstoolkit_client-0.0.17.dist-info}/WHEEL +0 -0
- {atlasai_dstoolkit_client-0.0.16.dist-info → atlasai_dstoolkit_client-0.0.17.dist-info}/top_level.txt +0 -0
atlasai/toolkit/workflows.py
CHANGED
@@ -47,7 +47,7 @@ class Workflow:
|
|
47
47
|
def __init__(self, id=None):
|
48
48
|
# Allow the selection of an existing workflow and check the logs.
|
49
49
|
self.id = id
|
50
|
-
self.
|
50
|
+
self._run_results = []
|
51
51
|
|
52
52
|
@property
|
53
53
|
def status(self):
|
@@ -191,9 +191,9 @@ class Electrification(Workflow):
|
|
191
191
|
if not self.aoi_path and not self.aoi:
|
192
192
|
raise Exception('`aoi_path` or `aoi` must be specified.')
|
193
193
|
|
194
|
-
def _results(self, save_to=None):
|
195
|
-
if self.
|
196
|
-
return self.
|
194
|
+
def _results(self, save_to=None, force=False):
|
195
|
+
if self._run_results and not force:
|
196
|
+
return self._run_results
|
197
197
|
|
198
198
|
results = []
|
199
199
|
if not self.id:
|
@@ -211,7 +211,7 @@ class Electrification(Workflow):
|
|
211
211
|
for fut in as_completed(fut_map):
|
212
212
|
results.append(fut.result())
|
213
213
|
pbar.update(1)
|
214
|
-
self.
|
214
|
+
self._run_results = results
|
215
215
|
return results
|
216
216
|
|
217
217
|
def _download_file(self, name, url, to=None):
|
@@ -233,8 +233,9 @@ class Electrification(Workflow):
|
|
233
233
|
return local_path
|
234
234
|
|
235
235
|
def preview(self, from_=None, to_=None, selection=None, limit=None):
|
236
|
-
if not self.
|
236
|
+
if not self._run_results:
|
237
237
|
raise Exception('No result to be displayed. Run the workflow first and wait for its completion.')
|
238
|
+
|
238
239
|
_results = []
|
239
240
|
if selection is None:
|
240
241
|
selection = []
|
@@ -247,7 +248,7 @@ class Electrification(Workflow):
|
|
247
248
|
if to_:
|
248
249
|
to_ = datetime.strptime(to_, "%Y-%m-%d")
|
249
250
|
|
250
|
-
for f in sorted(self.
|
251
|
+
for f in sorted(self._run_results):
|
251
252
|
yyyy, mm = f.split('_')[-1].replace('.tif', '').split('-')
|
252
253
|
dt = datetime(year=int(yyyy), month=int(mm), day=1)
|
253
254
|
if selection:
|
{atlasai_dstoolkit_client-0.0.16.dist-info → atlasai_dstoolkit_client-0.0.17.dist-info}/RECORD
RENAMED
@@ -10,9 +10,9 @@ atlasai/toolkit/model.py,sha256=RUe0HbDpzvHOV9A4rzG3PgN9boMWDHQ2tR7IKHXzbx8,4126
|
|
10
10
|
atlasai/toolkit/output.py,sha256=FyDjrpVlbrEyfHfwOpxp8H57jx_qXahDjO1qpHIeuYM,473
|
11
11
|
atlasai/toolkit/requests.py,sha256=X86nIo07hAjUlilZcZ1lV8RB7KOsTKbTGtcY_SpFEXY,1223
|
12
12
|
atlasai/toolkit/utils.py,sha256=lYh3P2XOshRgHCjFeXJ0FOJWQW64sddgx8c2kL6Wqwc,1566
|
13
|
-
atlasai/toolkit/workflows.py,sha256=
|
14
|
-
atlasai_dstoolkit_client-0.0.
|
15
|
-
atlasai_dstoolkit_client-0.0.
|
16
|
-
atlasai_dstoolkit_client-0.0.
|
17
|
-
atlasai_dstoolkit_client-0.0.
|
18
|
-
atlasai_dstoolkit_client-0.0.
|
13
|
+
atlasai/toolkit/workflows.py,sha256=j91nsVTLzv689EE-aBOZyuOV0a7xlZh4DEkgWIzBFiU,9450
|
14
|
+
atlasai_dstoolkit_client-0.0.17.dist-info/LICENSE.txt,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
15
|
+
atlasai_dstoolkit_client-0.0.17.dist-info/METADATA,sha256=hiDgJIBsJ4WO47gGKD0FdUM-oekVgXZn704V7W08lds,1547
|
16
|
+
atlasai_dstoolkit_client-0.0.17.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
17
|
+
atlasai_dstoolkit_client-0.0.17.dist-info/top_level.txt,sha256=HRTbErU8nmHFDaJJ5R_XYbwpt21dqdjDpSva8xyy_0k,8
|
18
|
+
atlasai_dstoolkit_client-0.0.17.dist-info/RECORD,,
|
{atlasai_dstoolkit_client-0.0.16.dist-info → atlasai_dstoolkit_client-0.0.17.dist-info}/LICENSE.txt
RENAMED
File without changes
|
{atlasai_dstoolkit_client-0.0.16.dist-info → atlasai_dstoolkit_client-0.0.17.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|