hpcflow-new2 0.2.0a177__py3-none-any.whl → 0.2.0a178__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.
hpcflow/_version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.2.0a177"
1
+ __version__ = "0.2.0a178"
hpcflow/sdk/cli.py CHANGED
@@ -31,8 +31,13 @@ from hpcflow.sdk.cli_common import (
31
31
  zip_path_opt,
32
32
  zip_overwrite_opt,
33
33
  zip_log_opt,
34
+ zip_include_execute_opt,
35
+ zip_include_rechunk_backups_opt,
34
36
  unzip_path_opt,
35
37
  unzip_log_opt,
38
+ rechunk_backup_opt,
39
+ rechunk_chunk_size_opt,
40
+ rechunk_status_opt,
36
41
  )
37
42
  from hpcflow.sdk.helper.cli import get_helper_CLI
38
43
  from hpcflow.sdk.log import TimeIt
@@ -425,11 +430,28 @@ def _make_workflow_CLI(app):
425
430
  @zip_path_opt
426
431
  @zip_overwrite_opt
427
432
  @zip_log_opt
433
+ @zip_include_execute_opt
434
+ @zip_include_rechunk_backups_opt
428
435
  @click.pass_context
429
- def zip_workflow(ctx, path, overwrite, log):
436
+ def zip_workflow(
437
+ ctx,
438
+ path,
439
+ overwrite,
440
+ log,
441
+ include_execute,
442
+ include_rechunk_backups,
443
+ ):
430
444
  """Generate a copy of the workflow in the zip file format in the current working
431
445
  directory."""
432
- click.echo(ctx.obj["workflow"].zip(path=path, overwrite=overwrite, log=log))
446
+ click.echo(
447
+ ctx.obj["workflow"].zip(
448
+ path=path,
449
+ overwrite=overwrite,
450
+ log=log,
451
+ include_execute=include_execute,
452
+ include_rechunk_backups=include_rechunk_backups,
453
+ )
454
+ )
433
455
 
434
456
  @workflow.command(name="unzip")
435
457
  @unzip_path_opt
@@ -440,6 +462,37 @@ def _make_workflow_CLI(app):
440
462
  current working directory."""
441
463
  click.echo(ctx.obj["workflow"].unzip(path=path, log=log))
442
464
 
465
+ @workflow.command(name="rechunk")
466
+ @rechunk_backup_opt
467
+ @rechunk_chunk_size_opt
468
+ @rechunk_status_opt
469
+ @click.pass_context
470
+ def rechunk(ctx, backup, chunk_size, status):
471
+ """Rechunk metadata/runs and parameters/base arrays."""
472
+ ctx.obj["workflow"].rechunk(backup=backup, chunk_size=chunk_size, status=status)
473
+
474
+ @workflow.command(name="rechunk-runs")
475
+ @rechunk_backup_opt
476
+ @rechunk_chunk_size_opt
477
+ @rechunk_status_opt
478
+ @click.pass_context
479
+ def rechunk_runs(ctx, backup, chunk_size, status):
480
+ """Rechunk the metadata/runs array."""
481
+ ctx.obj["workflow"].rechunk_runs(
482
+ backup=backup, chunk_size=chunk_size, status=status
483
+ )
484
+
485
+ @workflow.command(name="rechunk-parameter-base")
486
+ @rechunk_backup_opt
487
+ @rechunk_chunk_size_opt
488
+ @rechunk_status_opt
489
+ @click.pass_context
490
+ def rechunk_parameter_base(ctx, backup, chunk_size, status):
491
+ """Rechunk the parameters/base array."""
492
+ ctx.obj["workflow"].rechunk_parameter_base(
493
+ backup=backup, chunk_size=chunk_size, status=status
494
+ )
495
+
443
496
  workflow.help = workflow.help.format(app_name=app.name)
444
497
 
445
498
  workflow.add_command(_make_workflow_submission_CLI(app))
@@ -711,8 +764,18 @@ def _make_zip_CLI(app):
711
764
  @zip_path_opt
712
765
  @zip_overwrite_opt
713
766
  @zip_log_opt
767
+ @zip_include_execute_opt
768
+ @zip_include_rechunk_backups_opt
714
769
  @workflow_ref_type_opt
715
- def zip_workflow(workflow_ref, path, overwrite, log, ref_type):
770
+ def zip_workflow(
771
+ workflow_ref,
772
+ path,
773
+ overwrite,
774
+ log,
775
+ include_execute,
776
+ include_rechunk_backups,
777
+ ref_type,
778
+ ):
716
779
  """Generate a copy of the specified workflow in the zip file format in the
717
780
  current working directory.
718
781
 
@@ -721,7 +784,15 @@ def _make_zip_CLI(app):
721
784
  """
722
785
  workflow_path = app._resolve_workflow_reference(workflow_ref, ref_type)
723
786
  wk = app.Workflow(workflow_path)
724
- click.echo(wk.zip(path=path, overwrite=overwrite, log=log))
787
+ click.echo(
788
+ wk.zip(
789
+ path=path,
790
+ overwrite=overwrite,
791
+ log=log,
792
+ include_execute=include_execute,
793
+ include_rechunk_backups=include_rechunk_backups,
794
+ )
795
+ )
725
796
 
726
797
  return zip_workflow
727
798
 
@@ -760,6 +831,27 @@ def _make_cancel_CLI(app):
760
831
  return cancel
761
832
 
762
833
 
834
+ def _make_rechunk_CLI(app):
835
+ @click.command(name="rechunk")
836
+ @click.argument("workflow_ref")
837
+ @workflow_ref_type_opt
838
+ @rechunk_backup_opt
839
+ @rechunk_chunk_size_opt
840
+ @rechunk_status_opt
841
+ def rechunk(workflow_ref, ref_type, backup, chunk_size, status):
842
+ """Rechunk metadata/runs and parameters/base arrays.
843
+
844
+ WORKFLOW_REF is the local ID (that provided by the `show` command}) or the
845
+ workflow path.
846
+
847
+ """
848
+ workflow_path = app._resolve_workflow_reference(workflow_ref, ref_type)
849
+ wk = app.Workflow(workflow_path)
850
+ wk.rechunk(backup=backup, chunk_size=chunk_size, status=status)
851
+
852
+ return rechunk
853
+
854
+
763
855
  def _make_open_CLI(app):
764
856
  @click.group(name="open")
765
857
  def open_file():
@@ -1129,6 +1221,7 @@ def make_cli(app):
1129
1221
  new_CLI.add_command(_make_cancel_CLI(app))
1130
1222
  new_CLI.add_command(_make_zip_CLI(app))
1131
1223
  new_CLI.add_command(_make_unzip_CLI(app))
1224
+ new_CLI.add_command(_make_rechunk_CLI(app))
1132
1225
  for cli_cmd in _make_API_CLI(app):
1133
1226
  new_CLI.add_command(cli_cmd)
1134
1227
 
hpcflow/sdk/cli_common.py CHANGED
@@ -141,6 +141,8 @@ zip_overwrite_opt = click.option(
141
141
  help="If set, any existing file will be overwritten.",
142
142
  )
143
143
  zip_log_opt = click.option("--log", help="Path to a log file to use during zipping.")
144
+ zip_include_execute_opt = click.option("--include-execute", is_flag=True)
145
+ zip_include_rechunk_backups_opt = click.option("--include-rechunk-backups", is_flag=True)
144
146
  unzip_path_opt = click.option(
145
147
  "--path",
146
148
  default=".",
@@ -151,3 +153,23 @@ unzip_path_opt = click.option(
151
153
  ),
152
154
  )
153
155
  unzip_log_opt = click.option("--log", help="Path to a log file to use during unzipping.")
156
+ rechunk_backup_opt = click.option(
157
+ "--backup/--no-backup",
158
+ default=True,
159
+ help=("First copy a backup of the array to a directory ending in `.bak`."),
160
+ )
161
+ rechunk_chunk_size_opt = click.option(
162
+ "--chunk-size",
163
+ type=click.INT,
164
+ default=None,
165
+ help=(
166
+ "New chunk size (array items per chunk). If unset (as by default), the array "
167
+ "will be rechunked to a single chunk array (i.e with a chunk size equal to the "
168
+ "array's shape)."
169
+ ),
170
+ )
171
+ rechunk_status_opt = click.option(
172
+ "--status/--no-status",
173
+ default=True,
174
+ help="If True, display a live status to track rechunking progress.",
175
+ )
@@ -1696,7 +1696,14 @@ class Workflow:
1696
1696
 
1697
1697
  return wk
1698
1698
 
1699
- def zip(self, path=".", log=None, overwrite=False) -> str:
1699
+ def zip(
1700
+ self,
1701
+ path=".",
1702
+ log=None,
1703
+ overwrite=False,
1704
+ include_execute=False,
1705
+ include_rechunk_backups=False,
1706
+ ) -> str:
1700
1707
  """
1701
1708
  Parameters
1702
1709
  ----------
@@ -1705,7 +1712,13 @@ class Workflow:
1705
1712
  directory, the zip file will be created within this directory. Otherwise,
1706
1713
  this path is assumed to be the full file path to the new zip file.
1707
1714
  """
1708
- return self._store.zip(path=path, log=log, overwrite=overwrite)
1715
+ return self._store.zip(
1716
+ path=path,
1717
+ log=log,
1718
+ overwrite=overwrite,
1719
+ include_execute=include_execute,
1720
+ include_rechunk_backups=include_rechunk_backups,
1721
+ )
1709
1722
 
1710
1723
  def unzip(self, path=".", log=None) -> str:
1711
1724
  """
@@ -2943,6 +2956,34 @@ class Workflow:
2943
2956
  final_runs[loop_name].append(final[0])
2944
2957
  return dict(final_runs)
2945
2958
 
2959
+ def rechunk_runs(
2960
+ self,
2961
+ chunk_size: Optional[int] = None,
2962
+ backup: Optional[bool] = True,
2963
+ status: Optional[bool] = True,
2964
+ ):
2965
+ self._store.rechunk_runs(chunk_size=chunk_size, backup=backup, status=status)
2966
+
2967
+ def rechunk_parameter_base(
2968
+ self,
2969
+ chunk_size: Optional[int] = None,
2970
+ backup: Optional[bool] = True,
2971
+ status: Optional[bool] = True,
2972
+ ):
2973
+ self._store.rechunk_parameter_base(
2974
+ chunk_size=chunk_size, backup=backup, status=status
2975
+ )
2976
+
2977
+ def rechunk(
2978
+ self,
2979
+ chunk_size: Optional[int] = None,
2980
+ backup: Optional[bool] = True,
2981
+ status: Optional[bool] = True,
2982
+ ):
2983
+ """Rechunk metadata/runs and parameters/base arrays."""
2984
+ self.rechunk_runs(chunk_size=chunk_size, backup=backup, status=status)
2985
+ self.rechunk_parameter_base(chunk_size=chunk_size, backup=backup, status=status)
2986
+
2946
2987
 
2947
2988
  @dataclass
2948
2989
  class WorkflowBlueprint:
@@ -5,6 +5,8 @@ from contextlib import contextmanager
5
5
  from dataclasses import dataclass
6
6
  from datetime import datetime
7
7
  from pathlib import Path
8
+ import shutil
9
+ import time
8
10
  from typing import Any, Dict, Iterable, Iterator, List, Optional, Tuple, Union
9
11
 
10
12
  import numpy as np
@@ -1152,7 +1154,14 @@ class ZarrPersistentStore(PersistentStore):
1152
1154
  with self.using_resource("attrs", action="read") as attrs:
1153
1155
  return attrs["name"]
1154
1156
 
1155
- def zip(self, path=".", log=None, overwrite=False):
1157
+ def zip(
1158
+ self,
1159
+ path=".",
1160
+ log=None,
1161
+ overwrite=False,
1162
+ include_execute=False,
1163
+ include_rechunk_backups=False,
1164
+ ):
1156
1165
  """
1157
1166
  Parameters
1158
1167
  ----------
@@ -1188,16 +1197,120 @@ class ZarrPersistentStore(PersistentStore):
1188
1197
  add_pw_to="target_options",
1189
1198
  )
1190
1199
  dst_zarr_store = zarr.storage.FSStore(url="", fs=zfs)
1200
+ excludes = []
1201
+ if not include_execute:
1202
+ excludes.append("execute")
1203
+ if not include_rechunk_backups:
1204
+ excludes.append("runs.bak")
1205
+ excludes.append("base.bak")
1206
+
1191
1207
  zarr.convenience.copy_store(
1192
1208
  src_zarr_store,
1193
1209
  dst_zarr_store,
1194
- excludes="execute",
1210
+ excludes=excludes or None,
1195
1211
  log=log,
1196
1212
  )
1197
1213
  del zfs # ZipFileSystem remains open for instance lifetime
1198
1214
  status.stop()
1199
1215
  return dst_path
1200
1216
 
1217
+ def _rechunk_arr(
1218
+ self,
1219
+ arr,
1220
+ chunk_size: Optional[int] = None,
1221
+ backup: Optional[bool] = True,
1222
+ status: Optional[bool] = True,
1223
+ ):
1224
+ arr_path = Path(self.workflow.path) / arr.path
1225
+ arr_name = arr.path.split("/")[-1]
1226
+
1227
+ if status:
1228
+ console = Console()
1229
+ status = console.status("Rechunking...")
1230
+ status.start()
1231
+ backup_time = None
1232
+
1233
+ if backup:
1234
+ if status:
1235
+ status.update("Backing up...")
1236
+ backup_path = arr_path.with_suffix(".bak")
1237
+ if backup_path.is_dir():
1238
+ pass
1239
+ else:
1240
+ tic = time.perf_counter()
1241
+ shutil.copytree(arr_path, backup_path)
1242
+ toc = time.perf_counter()
1243
+ backup_time = toc - tic
1244
+
1245
+ tic = time.perf_counter()
1246
+ arr_rc_path = arr_path.with_suffix(".rechunked")
1247
+ arr = zarr.open(arr_path)
1248
+ if status:
1249
+ status.update("Creating new array...")
1250
+ arr_rc = zarr.create(
1251
+ store=arr_rc_path,
1252
+ shape=arr.shape,
1253
+ chunks=arr.shape if chunk_size is None else chunk_size,
1254
+ dtype=object,
1255
+ object_codec=MsgPack(),
1256
+ )
1257
+ if status:
1258
+ status.update("Copying data...")
1259
+ data = np.empty(shape=arr.shape, dtype=object)
1260
+ bad_data = []
1261
+ for idx in range(len(arr)):
1262
+ try:
1263
+ data[idx] = arr[idx]
1264
+ except RuntimeError:
1265
+ # blosc decompression errors
1266
+ bad_data.append(idx)
1267
+ pass
1268
+ arr_rc[:] = data
1269
+
1270
+ arr_rc.attrs.put(arr.attrs.asdict())
1271
+
1272
+ if status:
1273
+ status.update("Deleting old array...")
1274
+ shutil.rmtree(arr_path)
1275
+
1276
+ if status:
1277
+ status.update("Moving new array into place...")
1278
+ shutil.move(arr_rc_path, arr_path)
1279
+
1280
+ toc = time.perf_counter()
1281
+ rechunk_time = toc - tic
1282
+
1283
+ if status:
1284
+ status.stop()
1285
+
1286
+ if backup_time:
1287
+ print(f"Time to backup {arr_name}: {backup_time:.1f} s")
1288
+
1289
+ print(f"Time to rechunk and move {arr_name}: {rechunk_time:.1f} s")
1290
+
1291
+ if bad_data:
1292
+ print(f"Bad data at {arr_name} indices: {bad_data}.")
1293
+
1294
+ return arr_rc
1295
+
1296
+ def rechunk_parameter_base(
1297
+ self,
1298
+ chunk_size: Optional[int] = None,
1299
+ backup: Optional[bool] = True,
1300
+ status: Optional[bool] = True,
1301
+ ):
1302
+ arr = self._get_parameter_base_array()
1303
+ return self._rechunk_arr(arr, chunk_size, backup, status)
1304
+
1305
+ def rechunk_runs(
1306
+ self,
1307
+ chunk_size: Optional[int] = None,
1308
+ backup: Optional[bool] = True,
1309
+ status: Optional[bool] = True,
1310
+ ):
1311
+ arr = self._get_EARs_arr()
1312
+ return self._rechunk_arr(arr, chunk_size, backup, status)
1313
+
1201
1314
 
1202
1315
  class ZarrZipPersistentStore(ZarrPersistentStore):
1203
1316
  """A store designed mainly as an archive format that can be uploaded to data
@@ -1257,3 +1370,12 @@ class ZarrZipPersistentStore(ZarrPersistentStore):
1257
1370
  def delete_no_confirm(self) -> None:
1258
1371
  # `ZipFileSystem.rm()` does not seem to be implemented.
1259
1372
  raise NotImplementedError()
1373
+
1374
+ def _rechunk_arr(
1375
+ self,
1376
+ arr,
1377
+ chunk_size: Optional[int] = None,
1378
+ backup: Optional[bool] = True,
1379
+ status: Optional[bool] = True,
1380
+ ):
1381
+ raise NotImplementedError
@@ -1,4 +1,6 @@
1
- from importlib import resources
1
+ from pathlib import Path
2
+ import numpy as np
3
+ import zarr
2
4
  import pytest
3
5
  from hpcflow.sdk.core.test_utils import make_test_data_YAML_workflow
4
6
  from hpcflow.sdk.persistence.base import StoreEAR, StoreElement, StoreElementIter
@@ -239,3 +241,118 @@ def test_make_zarr_store_no_compressor(null_config, tmp_path):
239
241
  store="zarr",
240
242
  store_kwargs={"compressor": None},
241
243
  )
244
+
245
+
246
+ @pytest.mark.integration
247
+ def test_zarr_rechunk_data_equivalent(null_config, tmp_path):
248
+ t1 = hf.Task(
249
+ schema=hf.task_schemas.test_t1_conditional_OS,
250
+ inputs={"p1": 101},
251
+ repeats=3,
252
+ )
253
+ wk = hf.Workflow.from_template_data(
254
+ tasks=[t1],
255
+ template_name="test_run_rechunk",
256
+ workflow_name="test_run_rechunk",
257
+ path=tmp_path,
258
+ )
259
+ wk.submit(wait=True, status=False, add_to_known=False)
260
+ wk.rechunk_runs(backup=True, status=False, chunk_size=None) # None -> one chunk
261
+
262
+ arr = wk._store._get_EARs_arr()
263
+ assert arr.chunks == arr.shape
264
+
265
+ bak_path = (Path(wk.path) / arr.path).with_suffix(".bak")
266
+ arr_bak = zarr.open(bak_path)
267
+
268
+ assert arr_bak.chunks == (1,)
269
+
270
+ # check backup and new runs data are equal:
271
+ assert np.all(arr[:] == arr_bak[:])
272
+
273
+ # check attributes are equal:
274
+ assert arr.attrs.asdict() == arr_bak.attrs.asdict()
275
+
276
+
277
+ @pytest.mark.integration
278
+ def test_zarr_rechunk_data_equivalent_custom_chunk_size(null_config, tmp_path):
279
+ t1 = hf.Task(
280
+ schema=hf.task_schemas.test_t1_conditional_OS,
281
+ inputs={"p1": 101},
282
+ repeats=3,
283
+ )
284
+ wk = hf.Workflow.from_template_data(
285
+ tasks=[t1],
286
+ template_name="test_run_rechunk",
287
+ workflow_name="test_run_rechunk",
288
+ path=tmp_path,
289
+ )
290
+ wk.submit(wait=True, status=False, add_to_known=False)
291
+ wk.rechunk_runs(backup=True, status=False, chunk_size=2)
292
+
293
+ arr = wk._store._get_EARs_arr()
294
+ assert arr.chunks == (2,)
295
+
296
+ bak_path = (Path(wk.path) / arr.path).with_suffix(".bak")
297
+ arr_bak = zarr.open(bak_path)
298
+
299
+ assert arr_bak.chunks == (1,)
300
+
301
+ # check backup and new runs data are equal:
302
+ assert np.all(arr[:] == arr_bak[:])
303
+
304
+
305
+ @pytest.mark.integration
306
+ def test_zarr_rechunk_data_no_backup_load_runs(null_config, tmp_path):
307
+ t1 = hf.Task(
308
+ schema=hf.task_schemas.test_t1_conditional_OS,
309
+ inputs={"p1": 101},
310
+ repeats=3,
311
+ )
312
+ wk = hf.Workflow.from_template_data(
313
+ tasks=[t1],
314
+ template_name="test_run_rechunk",
315
+ workflow_name="test_run_rechunk",
316
+ path=tmp_path,
317
+ )
318
+ wk.submit(wait=True, status=False, add_to_known=False)
319
+ wk.rechunk_runs(backup=False, status=False)
320
+
321
+ arr = wk._store._get_EARs_arr()
322
+
323
+ bak_path = (Path(wk.path) / arr.path).with_suffix(".bak")
324
+ assert not bak_path.is_file()
325
+
326
+ # check we can load runs:
327
+ runs = wk._store._get_persistent_EARs(id_lst=list(range(wk.num_EARs)))
328
+ run_ID = []
329
+ for i in runs.values():
330
+ run_ID.append(i.id_)
331
+
332
+
333
+ @pytest.mark.integration
334
+ def test_zarr_rechunk_data_no_backup_load_parameter_base(null_config, tmp_path):
335
+ t1 = hf.Task(
336
+ schema=hf.task_schemas.test_t1_conditional_OS,
337
+ inputs={"p1": 101},
338
+ repeats=3,
339
+ )
340
+ wk = hf.Workflow.from_template_data(
341
+ tasks=[t1],
342
+ template_name="test_run_rechunk",
343
+ workflow_name="test_run_rechunk",
344
+ path=tmp_path,
345
+ )
346
+ wk.submit(wait=True, status=False, add_to_known=False)
347
+ wk.rechunk_parameter_base(backup=False, status=False)
348
+
349
+ arr = wk._store._get_parameter_base_array()
350
+
351
+ bak_path = (Path(wk.path) / arr.path).with_suffix(".bak")
352
+ assert not bak_path.is_file()
353
+
354
+ # check we can load parameters:
355
+ params = wk.get_all_parameters()
356
+ param_IDs = []
357
+ for i in params:
358
+ param_IDs.append(i.id_)
@@ -0,0 +1,375 @@
1
+ © Copyright 2024 hpcflow developers
2
+
3
+ Mozilla Public License Version 2.0
4
+ ==================================
5
+
6
+ 1. Definitions
7
+ --------------
8
+
9
+ 1.1. "Contributor"
10
+ means each individual or legal entity that creates, contributes to
11
+ the creation of, or owns Covered Software.
12
+
13
+ 1.2. "Contributor Version"
14
+ means the combination of the Contributions of others (if any) used
15
+ by a Contributor and that particular Contributor's Contribution.
16
+
17
+ 1.3. "Contribution"
18
+ means Covered Software of a particular Contributor.
19
+
20
+ 1.4. "Covered Software"
21
+ means Source Code Form to which the initial Contributor has attached
22
+ the notice in Exhibit A, the Executable Form of such Source Code
23
+ Form, and Modifications of such Source Code Form, in each case
24
+ including portions thereof.
25
+
26
+ 1.5. "Incompatible With Secondary Licenses"
27
+ means
28
+
29
+ (a) that the initial Contributor has attached the notice described
30
+ in Exhibit B to the Covered Software; or
31
+
32
+ (b) that the Covered Software was made available under the terms of
33
+ version 1.1 or earlier of the License, but not also under the
34
+ terms of a Secondary License.
35
+
36
+ 1.6. "Executable Form"
37
+ means any form of the work other than Source Code Form.
38
+
39
+ 1.7. "Larger Work"
40
+ means a work that combines Covered Software with other material, in
41
+ a separate file or files, that is not Covered Software.
42
+
43
+ 1.8. "License"
44
+ means this document.
45
+
46
+ 1.9. "Licensable"
47
+ means having the right to grant, to the maximum extent possible,
48
+ whether at the time of the initial grant or subsequently, any and
49
+ all of the rights conveyed by this License.
50
+
51
+ 1.10. "Modifications"
52
+ means any of the following:
53
+
54
+ (a) any file in Source Code Form that results from an addition to,
55
+ deletion from, or modification of the contents of Covered
56
+ Software; or
57
+
58
+ (b) any new file in Source Code Form that contains any Covered
59
+ Software.
60
+
61
+ 1.11. "Patent Claims" of a Contributor
62
+ means any patent claim(s), including without limitation, method,
63
+ process, and apparatus claims, in any patent Licensable by such
64
+ Contributor that would be infringed, but for the grant of the
65
+ License, by the making, using, selling, offering for sale, having
66
+ made, import, or transfer of either its Contributions or its
67
+ Contributor Version.
68
+
69
+ 1.12. "Secondary License"
70
+ means either the GNU General Public License, Version 2.0, the GNU
71
+ Lesser General Public License, Version 2.1, the GNU Affero General
72
+ Public License, Version 3.0, or any later versions of those
73
+ licenses.
74
+
75
+ 1.13. "Source Code Form"
76
+ means the form of the work preferred for making modifications.
77
+
78
+ 1.14. "You" (or "Your")
79
+ means an individual or a legal entity exercising rights under this
80
+ License. For legal entities, "You" includes any entity that
81
+ controls, is controlled by, or is under common control with You. For
82
+ purposes of this definition, "control" means (a) the power, direct
83
+ or indirect, to cause the direction or management of such entity,
84
+ whether by contract or otherwise, or (b) ownership of more than
85
+ fifty percent (50%) of the outstanding shares or beneficial
86
+ ownership of such entity.
87
+
88
+ 2. License Grants and Conditions
89
+ --------------------------------
90
+
91
+ 2.1. Grants
92
+
93
+ Each Contributor hereby grants You a world-wide, royalty-free,
94
+ non-exclusive license:
95
+
96
+ (a) under intellectual property rights (other than patent or trademark)
97
+ Licensable by such Contributor to use, reproduce, make available,
98
+ modify, display, perform, distribute, and otherwise exploit its
99
+ Contributions, either on an unmodified basis, with Modifications, or
100
+ as part of a Larger Work; and
101
+
102
+ (b) under Patent Claims of such Contributor to make, use, sell, offer
103
+ for sale, have made, import, and otherwise transfer either its
104
+ Contributions or its Contributor Version.
105
+
106
+ 2.2. Effective Date
107
+
108
+ The licenses granted in Section 2.1 with respect to any Contribution
109
+ become effective for each Contribution on the date the Contributor first
110
+ distributes such Contribution.
111
+
112
+ 2.3. Limitations on Grant Scope
113
+
114
+ The licenses granted in this Section 2 are the only rights granted under
115
+ this License. No additional rights or licenses will be implied from the
116
+ distribution or licensing of Covered Software under this License.
117
+ Notwithstanding Section 2.1(b) above, no patent license is granted by a
118
+ Contributor:
119
+
120
+ (a) for any code that a Contributor has removed from Covered Software;
121
+ or
122
+
123
+ (b) for infringements caused by: (i) Your and any other third party's
124
+ modifications of Covered Software, or (ii) the combination of its
125
+ Contributions with other software (except as part of its Contributor
126
+ Version); or
127
+
128
+ (c) under Patent Claims infringed by Covered Software in the absence of
129
+ its Contributions.
130
+
131
+ This License does not grant any rights in the trademarks, service marks,
132
+ or logos of any Contributor (except as may be necessary to comply with
133
+ the notice requirements in Section 3.4).
134
+
135
+ 2.4. Subsequent Licenses
136
+
137
+ No Contributor makes additional grants as a result of Your choice to
138
+ distribute the Covered Software under a subsequent version of this
139
+ License (see Section 10.2) or under the terms of a Secondary License (if
140
+ permitted under the terms of Section 3.3).
141
+
142
+ 2.5. Representation
143
+
144
+ Each Contributor represents that the Contributor believes its
145
+ Contributions are its original creation(s) or it has sufficient rights
146
+ to grant the rights to its Contributions conveyed by this License.
147
+
148
+ 2.6. Fair Use
149
+
150
+ This License is not intended to limit any rights You have under
151
+ applicable copyright doctrines of fair use, fair dealing, or other
152
+ equivalents.
153
+
154
+ 2.7. Conditions
155
+
156
+ Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
157
+ in Section 2.1.
158
+
159
+ 3. Responsibilities
160
+ -------------------
161
+
162
+ 3.1. Distribution of Source Form
163
+
164
+ All distribution of Covered Software in Source Code Form, including any
165
+ Modifications that You create or to which You contribute, must be under
166
+ the terms of this License. You must inform recipients that the Source
167
+ Code Form of the Covered Software is governed by the terms of this
168
+ License, and how they can obtain a copy of this License. You may not
169
+ attempt to alter or restrict the recipients' rights in the Source Code
170
+ Form.
171
+
172
+ 3.2. Distribution of Executable Form
173
+
174
+ If You distribute Covered Software in Executable Form then:
175
+
176
+ (a) such Covered Software must also be made available in Source Code
177
+ Form, as described in Section 3.1, and You must inform recipients of
178
+ the Executable Form how they can obtain a copy of such Source Code
179
+ Form by reasonable means in a timely manner, at a charge no more
180
+ than the cost of distribution to the recipient; and
181
+
182
+ (b) You may distribute such Executable Form under the terms of this
183
+ License, or sublicense it under different terms, provided that the
184
+ license for the Executable Form does not attempt to limit or alter
185
+ the recipients' rights in the Source Code Form under this License.
186
+
187
+ 3.3. Distribution of a Larger Work
188
+
189
+ You may create and distribute a Larger Work under terms of Your choice,
190
+ provided that You also comply with the requirements of this License for
191
+ the Covered Software. If the Larger Work is a combination of Covered
192
+ Software with a work governed by one or more Secondary Licenses, and the
193
+ Covered Software is not Incompatible With Secondary Licenses, this
194
+ License permits You to additionally distribute such Covered Software
195
+ under the terms of such Secondary License(s), so that the recipient of
196
+ the Larger Work may, at their option, further distribute the Covered
197
+ Software under the terms of either this License or such Secondary
198
+ License(s).
199
+
200
+ 3.4. Notices
201
+
202
+ You may not remove or alter the substance of any license notices
203
+ (including copyright notices, patent notices, disclaimers of warranty,
204
+ or limitations of liability) contained within the Source Code Form of
205
+ the Covered Software, except that You may alter any license notices to
206
+ the extent required to remedy known factual inaccuracies.
207
+
208
+ 3.5. Application of Additional Terms
209
+
210
+ You may choose to offer, and to charge a fee for, warranty, support,
211
+ indemnity or liability obligations to one or more recipients of Covered
212
+ Software. However, You may do so only on Your own behalf, and not on
213
+ behalf of any Contributor. You must make it absolutely clear that any
214
+ such warranty, support, indemnity, or liability obligation is offered by
215
+ You alone, and You hereby agree to indemnify every Contributor for any
216
+ liability incurred by such Contributor as a result of warranty, support,
217
+ indemnity or liability terms You offer. You may include additional
218
+ disclaimers of warranty and limitations of liability specific to any
219
+ jurisdiction.
220
+
221
+ 4. Inability to Comply Due to Statute or Regulation
222
+ ---------------------------------------------------
223
+
224
+ If it is impossible for You to comply with any of the terms of this
225
+ License with respect to some or all of the Covered Software due to
226
+ statute, judicial order, or regulation then You must: (a) comply with
227
+ the terms of this License to the maximum extent possible; and (b)
228
+ describe the limitations and the code they affect. Such description must
229
+ be placed in a text file included with all distributions of the Covered
230
+ Software under this License. Except to the extent prohibited by statute
231
+ or regulation, such description must be sufficiently detailed for a
232
+ recipient of ordinary skill to be able to understand it.
233
+
234
+ 5. Termination
235
+ --------------
236
+
237
+ 5.1. The rights granted under this License will terminate automatically
238
+ if You fail to comply with any of its terms. However, if You become
239
+ compliant, then the rights granted under this License from a particular
240
+ Contributor are reinstated (a) provisionally, unless and until such
241
+ Contributor explicitly and finally terminates Your grants, and (b) on an
242
+ ongoing basis, if such Contributor fails to notify You of the
243
+ non-compliance by some reasonable means prior to 60 days after You have
244
+ come back into compliance. Moreover, Your grants from a particular
245
+ Contributor are reinstated on an ongoing basis if such Contributor
246
+ notifies You of the non-compliance by some reasonable means, this is the
247
+ first time You have received notice of non-compliance with this License
248
+ from such Contributor, and You become compliant prior to 30 days after
249
+ Your receipt of the notice.
250
+
251
+ 5.2. If You initiate litigation against any entity by asserting a patent
252
+ infringement claim (excluding declaratory judgment actions,
253
+ counter-claims, and cross-claims) alleging that a Contributor Version
254
+ directly or indirectly infringes any patent, then the rights granted to
255
+ You by any and all Contributors for the Covered Software under Section
256
+ 2.1 of this License shall terminate.
257
+
258
+ 5.3. In the event of termination under Sections 5.1 or 5.2 above, all
259
+ end user license agreements (excluding distributors and resellers) which
260
+ have been validly granted by You or Your distributors under this License
261
+ prior to termination shall survive termination.
262
+
263
+ ************************************************************************
264
+ * *
265
+ * 6. Disclaimer of Warranty *
266
+ * ------------------------- *
267
+ * *
268
+ * Covered Software is provided under this License on an "as is" *
269
+ * basis, without warranty of any kind, either expressed, implied, or *
270
+ * statutory, including, without limitation, warranties that the *
271
+ * Covered Software is free of defects, merchantable, fit for a *
272
+ * particular purpose or non-infringing. The entire risk as to the *
273
+ * quality and performance of the Covered Software is with You. *
274
+ * Should any Covered Software prove defective in any respect, You *
275
+ * (not any Contributor) assume the cost of any necessary servicing, *
276
+ * repair, or correction. This disclaimer of warranty constitutes an *
277
+ * essential part of this License. No use of any Covered Software is *
278
+ * authorized under this License except under this disclaimer. *
279
+ * *
280
+ ************************************************************************
281
+
282
+ ************************************************************************
283
+ * *
284
+ * 7. Limitation of Liability *
285
+ * -------------------------- *
286
+ * *
287
+ * Under no circumstances and under no legal theory, whether tort *
288
+ * (including negligence), contract, or otherwise, shall any *
289
+ * Contributor, or anyone who distributes Covered Software as *
290
+ * permitted above, be liable to You for any direct, indirect, *
291
+ * special, incidental, or consequential damages of any character *
292
+ * including, without limitation, damages for lost profits, loss of *
293
+ * goodwill, work stoppage, computer failure or malfunction, or any *
294
+ * and all other commercial damages or losses, even if such party *
295
+ * shall have been informed of the possibility of such damages. This *
296
+ * limitation of liability shall not apply to liability for death or *
297
+ * personal injury resulting from such party's negligence to the *
298
+ * extent applicable law prohibits such limitation. Some *
299
+ * jurisdictions do not allow the exclusion or limitation of *
300
+ * incidental or consequential damages, so this exclusion and *
301
+ * limitation may not apply to You. *
302
+ * *
303
+ ************************************************************************
304
+
305
+ 8. Litigation
306
+ -------------
307
+
308
+ Any litigation relating to this License may be brought only in the
309
+ courts of a jurisdiction where the defendant maintains its principal
310
+ place of business and such litigation shall be governed by laws of that
311
+ jurisdiction, without reference to its conflict-of-law provisions.
312
+ Nothing in this Section shall prevent a party's ability to bring
313
+ cross-claims or counter-claims.
314
+
315
+ 9. Miscellaneous
316
+ ----------------
317
+
318
+ This License represents the complete agreement concerning the subject
319
+ matter hereof. If any provision of this License is held to be
320
+ unenforceable, such provision shall be reformed only to the extent
321
+ necessary to make it enforceable. Any law or regulation which provides
322
+ that the language of a contract shall be construed against the drafter
323
+ shall not be used to construe this License against a Contributor.
324
+
325
+ 10. Versions of the License
326
+ ---------------------------
327
+
328
+ 10.1. New Versions
329
+
330
+ Mozilla Foundation is the license steward. Except as provided in Section
331
+ 10.3, no one other than the license steward has the right to modify or
332
+ publish new versions of this License. Each version will be given a
333
+ distinguishing version number.
334
+
335
+ 10.2. Effect of New Versions
336
+
337
+ You may distribute the Covered Software under the terms of the version
338
+ of the License under which You originally received the Covered Software,
339
+ or under the terms of any subsequent version published by the license
340
+ steward.
341
+
342
+ 10.3. Modified Versions
343
+
344
+ If you create software not governed by this License, and you want to
345
+ create a new license for such software, you may create and use a
346
+ modified version of this License if you rename the license and remove
347
+ any references to the name of the license steward (except to note that
348
+ such modified license differs from this License).
349
+
350
+ 10.4. Distributing Source Code Form that is Incompatible With Secondary
351
+ Licenses
352
+
353
+ If You choose to distribute Source Code Form that is Incompatible With
354
+ Secondary Licenses under the terms of this version of the License, the
355
+ notice described in Exhibit B of this License must be attached.
356
+
357
+ Exhibit A - Source Code Form License Notice
358
+ -------------------------------------------
359
+
360
+ This Source Code Form is subject to the terms of the Mozilla Public
361
+ License, v. 2.0. If a copy of the MPL was not distributed with this
362
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
363
+
364
+ If it is not possible or desirable to put the notice in a particular
365
+ file, then You may include the notice in a location (such as a LICENSE
366
+ file in a relevant directory) where a recipient would be likely to look
367
+ for such a notice.
368
+
369
+ You may add additional accurate notices of copyright ownership.
370
+
371
+ Exhibit B - "Incompatible With Secondary Licenses" Notice
372
+ ---------------------------------------------------------
373
+
374
+ This Source Code Form is "Incompatible With Secondary Licenses", as
375
+ defined by the Mozilla Public License, v. 2.0.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hpcflow-new2
3
- Version: 0.2.0a177
3
+ Version: 0.2.0a178
4
4
  Summary: Computational workflow management
5
5
  License: MIT
6
6
  Author: aplowman
@@ -1,7 +1,7 @@
1
1
  hpcflow/__init__.py,sha256=WIETuRHeOp2SqUqHUzpjQ-lk9acbYv-6aWOhZPRdlhs,64
2
2
  hpcflow/__pyinstaller/__init__.py,sha256=YOzBlPSck6slucv6lJM9K80JtsJWxXRL00cv6tRj3oc,98
3
3
  hpcflow/__pyinstaller/hook-hpcflow.py,sha256=SeMopsPkhCyd9gqIrzwFNRj3ZlkUlUYl-74QYz61mo4,1089
4
- hpcflow/_version.py,sha256=c6sVLAvL-ZtlEF_CBbI6lCJoA-qh3KPMN5Smq6FFaPk,26
4
+ hpcflow/_version.py,sha256=Aly54M0zR3W7D8mDCqLBInigz_HpeKNFLimAxo_N7ng,26
5
5
  hpcflow/app.py,sha256=d-kgfnZNlqlCi2H8bK26714brD_u3ibN3FaEZgjF9aA,1332
6
6
  hpcflow/cli.py,sha256=G2J3D9v6MnMWOWMMWK6UEKLn_6wnV9lT_qygEBBxg-I,66
7
7
  hpcflow/data/demo_data_manifest/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -36,8 +36,8 @@ hpcflow/data/workflows/workflow_1.yaml,sha256=lF7Re2SVc_5gQk5AwB0gXaq-n-T5ia4su3
36
36
  hpcflow/examples.ipynb,sha256=cLKp4QsxwwMXRanDnfWY9kqsV23q6G4raOpu6IZXnMw,28553
37
37
  hpcflow/sdk/__init__.py,sha256=SdzVm7dydLv2kmr2tqrH14Gf1GEAEhsEuAuqiGBLHhM,5700
38
38
  hpcflow/sdk/app.py,sha256=lS9sl6YEbB02LZbltlgs8neokZNmxfl4aT46-2UuDTQ,96661
39
- hpcflow/sdk/cli.py,sha256=uIzF2YEFQFxmJNFwZM_OZWpzgJK0BnqNY3zwa9sfVzM,35028
40
- hpcflow/sdk/cli_common.py,sha256=kDSIe90mxD37lQqvIXDyRauLtTRRnNueSljcRPF_w0M,4738
39
+ hpcflow/sdk/cli.py,sha256=t2p4xxo7yaxO8jZZPcgz1xusjmiOwbqvGtP-2y0Jp8A,37715
40
+ hpcflow/sdk/cli_common.py,sha256=ZtJkol29G-Sztuhl013RqRdS3eOWsCCuh6aKfh7A6jY,5540
41
41
  hpcflow/sdk/config/__init__.py,sha256=qJrrxcAN4f1u_RyTtXgz-xlTLwNafE9v0VEMP1x6-bU,70
42
42
  hpcflow/sdk/config/callbacks.py,sha256=7z0rFX7ULUTAo24IJr6kLzPmZCgmkaQ8P5e-AfYTcY8,5339
43
43
  hpcflow/sdk/config/cli.py,sha256=PsmqrC21GAXx_-UHWVgqg-3luVe4r_MG0HjFRv2Yy1Y,10638
@@ -65,7 +65,7 @@ hpcflow/sdk/core/task_schema.py,sha256=TipXzC2guu9zilv0En-rHt6lUCTSIj5faI4lVWQdU
65
65
  hpcflow/sdk/core/test_utils.py,sha256=IhCLvRzDuG4hVNGeGulGKfZEgg7Ow-vgiEqewzMiaZ4,9762
66
66
  hpcflow/sdk/core/utils.py,sha256=cpwfoHgbHanZQXmVZRN3VRW8X-zZxb1I6T0v2tWgBK0,25811
67
67
  hpcflow/sdk/core/validation.py,sha256=KBKiy5DdfGiGmMaB0HdKTY0V972u5dJzvkYkX0_KtCo,518
68
- hpcflow/sdk/core/workflow.py,sha256=ziKn1cA4s_eHKPMzyKfHF4bVNF7bfho4dko5qtyZKjU,113111
68
+ hpcflow/sdk/core/workflow.py,sha256=8Xl74KrSXJ5TE5J42w5zLF1Wi-ofALZ0rVlhRDzHAeM,114306
69
69
  hpcflow/sdk/core/zarr_io.py,sha256=V_Zm6uSiuaCbXyHFJUO74K1pAr4Zqrj3aLCBjohCwvs,5724
70
70
  hpcflow/sdk/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
71
71
  hpcflow/sdk/data/config_file_schema.yaml,sha256=7i3z_m3GBRtLyB4c7qPngnlQWqcIq1CyCcOysDyq4es,791
@@ -88,7 +88,7 @@ hpcflow/sdk/persistence/json.py,sha256=55F4Txa50I9HzfETPqwo6gAOBRaoewMHGR3V4-2Fi
88
88
  hpcflow/sdk/persistence/pending.py,sha256=XktGkRpJmlyjceOiDY0GEL2xRl6k-gbjt057LmEj5oc,25656
89
89
  hpcflow/sdk/persistence/store_resource.py,sha256=oEyocRqa8Uym-57UFosrwate-Xw9O7i2FM82TxHc4m0,4307
90
90
  hpcflow/sdk/persistence/utils.py,sha256=yQT6gS-Ipj2N6grtlV5d0czxxKE0CaeqAkXA1247XGo,1522
91
- hpcflow/sdk/persistence/zarr.py,sha256=otZbR17O3ZNIot7uVAP1UdWs_L0PHS682LuWk3z1_1g,45708
91
+ hpcflow/sdk/persistence/zarr.py,sha256=PSZCOZiNeTcNdxg__dxyrOllPaEBnOLZF1nw0Zzp154,49147
92
92
  hpcflow/sdk/runtime.py,sha256=_in5ojiy9R8fD1ZNbdE6PDmZx6kSaiG9WPB6kVBFE7k,9217
93
93
  hpcflow/sdk/submission/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
94
94
  hpcflow/sdk/submission/jobscript.py,sha256=Z9NUzkIcmoFw-XAtG8FdLpO2LtMt3czk1v1BnbM1eZw,44678
@@ -134,7 +134,7 @@ hpcflow/tests/unit/test_json_like.py,sha256=aGCiGfT-tNiFu3yzW6d_T-oDc5QLwSUgq3pN
134
134
  hpcflow/tests/unit/test_loop.py,sha256=GNKMGAXP0AaB7fl1TShluyh-PoG7O96X7SGUg6vnK6Y,45149
135
135
  hpcflow/tests/unit/test_object_list.py,sha256=nDpbRpCu4XqoYxKMr1_QmDS1s2_6nQOpIEBRHSAXoVg,3049
136
136
  hpcflow/tests/unit/test_parameter.py,sha256=39CVido_NJGX-Xj9NDSlazpGzWqMG4zp0GmIKwzO7lI,6659
137
- hpcflow/tests/unit/test_persistence.py,sha256=DPXFiuY2v8vj0zZ7299nf-KtgYT8LhHI52fq7UPoa6Y,8128
137
+ hpcflow/tests/unit/test_persistence.py,sha256=6NfYzqDHLlTiv3OIcTfIkWusL748cjYi-i4Be9Uo02M,11519
138
138
  hpcflow/tests/unit/test_resources.py,sha256=2RRFIn5brKyD1UNmkmnvyjPZowa-dokQd0EuCEeo7so,7799
139
139
  hpcflow/tests/unit/test_run.py,sha256=uvG2BbVOD0JJAJCbdh0MMRJME8tVzOm7H4PTLzPLWZY,2613
140
140
  hpcflow/tests/unit/test_runtime.py,sha256=HjHPTS3UkX1LcwheFgpp4px_VlRis8KAE2HoeqxRbA8,322
@@ -151,7 +151,8 @@ hpcflow/tests/unit/test_workflow_template.py,sha256=fF7LNveMwCledgncNCRfD9Nd9dL9
151
151
  hpcflow/tests/workflows/test_jobscript.py,sha256=9sp1o0g72JZbv2QlOl5v7wCZEFjotxiIKGNUxVaFgaA,724
152
152
  hpcflow/tests/workflows/test_workflows.py,sha256=xai6FRtGqG4lStJk6KmsqPUSuvqs9FrsBOxMVALshIs,13400
153
153
  hpcflow/viz_demo.ipynb,sha256=1QdnVsk72vihv2L6hOGyk318uEa22ZSgGxQCa7hW2oo,6238
154
- hpcflow_new2-0.2.0a177.dist-info/METADATA,sha256=I1tkrIUSwRwNsKxjcTy7lrpcOhZp9Z3HUGV_Wdoo9qw,2466
155
- hpcflow_new2-0.2.0a177.dist-info/WHEEL,sha256=kLuE8m1WYU0Ig0_YEGrXyTtiJvKPpLpDEiChiNyei5Y,88
156
- hpcflow_new2-0.2.0a177.dist-info/entry_points.txt,sha256=aoGtCnFdfPcXfBdu2zZyMOJoz6fPgdR0elqsgrE-USU,106
157
- hpcflow_new2-0.2.0a177.dist-info/RECORD,,
154
+ hpcflow_new2-0.2.0a178.dist-info/LICENSE,sha256=Xhxf_KsrJNJFGMogumZhXSTPhUOVHCWf7nU-TDzqg0E,16763
155
+ hpcflow_new2-0.2.0a178.dist-info/METADATA,sha256=tSf_ZfRDd8QHkfe2y0Aqt_eLn8T9WE34D-D1Cl7sfSg,2466
156
+ hpcflow_new2-0.2.0a178.dist-info/WHEEL,sha256=kLuE8m1WYU0Ig0_YEGrXyTtiJvKPpLpDEiChiNyei5Y,88
157
+ hpcflow_new2-0.2.0a178.dist-info/entry_points.txt,sha256=aoGtCnFdfPcXfBdu2zZyMOJoz6fPgdR0elqsgrE-USU,106
158
+ hpcflow_new2-0.2.0a178.dist-info/RECORD,,