hpcflow-new2 0.2.0a186__py3-none-any.whl → 0.2.0a188__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.0a186"
1
+ __version__ = "0.2.0a188"
hpcflow/sdk/app.py CHANGED
@@ -481,11 +481,7 @@ class BaseApp(metaclass=Singleton):
481
481
  components = {}
482
482
  for comp_type in TEMPLATE_COMP_TYPES:
483
483
  resource = f"{comp_type}.yaml"
484
- try:
485
- fh = resources.files(package).joinpath(resource).open("rt")
486
- except AttributeError:
487
- # < python 3.9; `resource.open_text` deprecated since 3.11
488
- fh = resources.open_text(package, resource)
484
+ fh = resources.files(package).joinpath(resource).open("rt")
489
485
  SDK_logger.info(f"Parsing file as YAML: {fh.name!r}")
490
486
  comp_dat = fh.read()
491
487
  components[comp_type] = read_YAML_str(comp_dat)
@@ -905,11 +901,7 @@ class BaseApp(metaclass=Singleton):
905
901
  # TODO: load custom directories / custom functions (via decorator)
906
902
  scripts_package = f"{self.package_name}.{self.scripts_dir}"
907
903
 
908
- try:
909
- ctx = resources.as_file(resources.files(scripts_package))
910
- except AttributeError:
911
- # < python 3.9; `resource.path` deprecated since 3.11
912
- ctx = resources.path(scripts_package, "")
904
+ ctx = resources.as_file(resources.files(scripts_package))
913
905
 
914
906
  scripts = {}
915
907
  with ctx as path:
@@ -930,11 +922,7 @@ class BaseApp(metaclass=Singleton):
930
922
  """Get all builtin demo workflow template file paths."""
931
923
  templates = {}
932
924
  pkg = f"{self.package_name}.{self.workflows_dir}"
933
- try:
934
- files = resources.files(pkg).iterdir()
935
- except AttributeError:
936
- # python 3.8; `resources.contents` deprecated since 3.11
937
- files = resources.contents(pkg)
925
+ files = resources.files(pkg).iterdir()
938
926
  for i in files:
939
927
  if i.suffix in (".yaml", ".yml", ".json", ".jsonc"):
940
928
  templates[i.stem] = i
@@ -1778,11 +1766,7 @@ class BaseApp(metaclass=Singleton):
1778
1766
  test_args = (self.pytest_args or []) + list(args)
1779
1767
  pkg = self.package_name
1780
1768
  tests_dir = "tests"
1781
- try:
1782
- ctx_man = resources.as_file(resources.files(pkg).joinpath(tests_dir))
1783
- except AttributeError:
1784
- # < Python 3.9
1785
- ctx_man = resources.path(pkg, tests_dir)
1769
+ ctx_man = resources.as_file(resources.files(pkg).joinpath(tests_dir))
1786
1770
  with ctx_man as test_dir:
1787
1771
  return pytest.main([str(test_dir)] + test_args)
1788
1772
 
@@ -2473,11 +2457,7 @@ class BaseApp(metaclass=Singleton):
2473
2457
  )
2474
2458
  package = self.demo_data_manifest_dir
2475
2459
  resource = "demo_data_manifest.json"
2476
- try:
2477
- fh = resources.files(package).joinpath(resource).open("rt")
2478
- except AttributeError:
2479
- # < python 3.9; `resource.open_text` deprecated since 3.11
2480
- fh = resources.open_text(package, resource)
2460
+ fh = resources.files(package).joinpath(resource).open("rt")
2481
2461
  manifest = json.load(fh)
2482
2462
  fh.close()
2483
2463
  return manifest
@@ -2561,12 +2541,6 @@ class BaseApp(metaclass=Singleton):
2561
2541
  try:
2562
2542
  ctx_man = resources.as_file(resources.files(package).joinpath(src_fn))
2563
2543
  # raises ModuleNotFoundError
2564
- except AttributeError:
2565
- # < python 3.9
2566
- try:
2567
- ctx_man = resources.path(package, src_fn)
2568
- except ModuleNotFoundError:
2569
- resource_exists = False
2570
2544
  except ModuleNotFoundError:
2571
2545
  resource_exists = False
2572
2546
 
@@ -193,30 +193,26 @@ def make_workflow(
193
193
  return wk
194
194
 
195
195
 
196
- def make_test_data_YAML_workflow(workflow_name, path, **kwargs):
196
+ def make_test_data_YAML_workflow(
197
+ workflow_name, path, app=None, pkg="hpcflow.tests.data", **kwargs
198
+ ):
197
199
  """Generate a workflow whose template file is defined in the test data directory."""
198
- pkg = "hpcflow.tests.data"
199
- try:
200
- script_ctx = resources.as_file(resources.files(pkg).joinpath(workflow_name))
201
- except AttributeError:
202
- # < python 3.9; `resource.path` deprecated since 3.11
203
- script_ctx = resources.path(pkg, workflow_name)
200
+ app = hf if app is None else app
201
+ script_ctx = resources.as_file(resources.files(pkg).joinpath(workflow_name))
204
202
 
205
203
  with script_ctx as file_path:
206
- return hf.Workflow.from_YAML_file(YAML_path=file_path, path=path, **kwargs)
204
+ return app.Workflow.from_YAML_file(YAML_path=file_path, path=path, **kwargs)
207
205
 
208
206
 
209
- def make_test_data_YAML_workflow_template(workflow_name, **kwargs):
207
+ def make_test_data_YAML_workflow_template(
208
+ workflow_name, app=None, pkg="hpcflow.tests.data", **kwargs
209
+ ):
210
210
  """Generate a workflow template whose file is defined in the test data directory."""
211
- pkg = "hpcflow.tests.data"
212
- try:
213
- script_ctx = resources.as_file(resources.files(pkg).joinpath(workflow_name))
214
- except AttributeError:
215
- # < python 3.9; `resource.path` deprecated since 3.11
216
- script_ctx = resources.path(pkg, workflow_name)
211
+ app = hf if app is None else app
212
+ script_ctx = resources.as_file(resources.files(pkg).joinpath(workflow_name))
217
213
 
218
214
  with script_ctx as file_path:
219
- return hf.WorkflowTemplate.from_file(path=file_path, **kwargs)
215
+ return app.WorkflowTemplate.from_file(path=file_path, **kwargs)
220
216
 
221
217
 
222
218
  @dataclass
@@ -18,11 +18,7 @@ def get_schema(filename):
18
18
  (:py:mod:`hpcflow.sdk.data`).
19
19
  """
20
20
  package = "hpcflow.sdk.data"
21
- try:
22
- fh = resources.files(package).joinpath(filename).open("rt")
23
- except AttributeError:
24
- # < python 3.9; `resource.open_text` deprecated since 3.11
25
- fh = resources.open_text(package, filename)
21
+ fh = resources.files(package).joinpath(filename).open("rt")
26
22
  schema_dat = fh.read()
27
23
  fh.close()
28
24
  schema = Schema.from_yaml(schema_dat)
@@ -1,14 +1,13 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hpcflow-new2
3
- Version: 0.2.0a186
3
+ Version: 0.2.0a188
4
4
  Summary: Computational workflow management
5
5
  License: MIT
6
6
  Author: aplowman
7
7
  Author-email: adam.plowman@manchester.ac.uk
8
- Requires-Python: >=3.8,<3.13
8
+ Requires-Python: >=3.9,<3.13
9
9
  Classifier: License :: OSI Approved :: MIT License
10
10
  Classifier: Programming Language :: Python :: 3
11
- Classifier: Programming Language :: Python :: 3.8
12
11
  Classifier: Programming Language :: Python :: 3.9
13
12
  Classifier: Programming Language :: Python :: 3.10
14
13
  Classifier: Programming Language :: Python :: 3.11
@@ -19,8 +18,7 @@ Requires-Dist: colorama (>=0.4.6,<0.5.0)
19
18
  Requires-Dist: fsspec (>=2022.2.0,<2023.0.0)
20
19
  Requires-Dist: h5py (>=3.9.0,<4.0.0)
21
20
  Requires-Dist: msgpack (>=1.0.4,<2.0.0)
22
- Requires-Dist: numpy (>=1.24.4,<2.0.0) ; python_version < "3.9"
23
- Requires-Dist: numpy (>=1.26.4,<2.0.0) ; python_version >= "3.9"
21
+ Requires-Dist: numpy (>=1.26.4,<2.0.0)
24
22
  Requires-Dist: paramiko (>=3.2.0,<4.0.0)
25
23
  Requires-Dist: platformdirs (>=4.2.1,<5.0.0)
26
24
  Requires-Dist: psutil (>=5.9.4,<6.0.0)
@@ -32,8 +30,7 @@ Requires-Dist: ruamel-yaml (>=0.18.6,<0.19.0)
32
30
  Requires-Dist: termcolor (>=1.1.0,<2.0.0)
33
31
  Requires-Dist: valida (>=0.7.5,<0.8.0)
34
32
  Requires-Dist: watchdog (>=2.1.9,<3.0.0)
35
- Requires-Dist: zarr (==2.17.2) ; python_version >= "3.9"
36
- Requires-Dist: zarr (>=2.16.1,<3.0.0) ; python_version < "3.9"
33
+ Requires-Dist: zarr (>=2.17.2,<3.0.0)
37
34
  Description-Content-Type: text/markdown
38
35
 
39
36
  <div align="center">
@@ -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=sJkU41hH7ZR8N7Wo3VRZhspndULQ0OhTLlLwedaZzE0,26
4
+ hpcflow/_version.py,sha256=XYYOD4slAoYEv4hijR18gRSw9NN2hA72hrVGVHXJkLE,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=Hsq0jT8EXM13wu1MpGy5FQgyuz56ygep4VWOnulFn50,41
@@ -35,7 +35,7 @@ hpcflow/data/workflows/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
35
35
  hpcflow/data/workflows/workflow_1.yaml,sha256=lF7Re2SVc_5gQk5AwB0gXaq-n-T5ia4su3zNQ9oMRV0,220
36
36
  hpcflow/examples.ipynb,sha256=cLKp4QsxwwMXRanDnfWY9kqsV23q6G4raOpu6IZXnMw,28553
37
37
  hpcflow/sdk/__init__.py,sha256=5DGawWK-NhDA_pYL_NRr4AL8Zk17Ra7Yk_4LuCaUUEU,5785
38
- hpcflow/sdk/app.py,sha256=k3QHqVmLHKe0Q_-kjjdmB4zfmMHdHB2ZH_jFCXW2JeY,100626
38
+ hpcflow/sdk/app.py,sha256=BbpyVdBKdzG3Xwk2J5xSDkoh6iFdShTJ9gu4WNuDSMc,99550
39
39
  hpcflow/sdk/cli.py,sha256=h3igMZAjfvQvmF0uKTKLYClPnRxTONIyiv6Cjr0rllo,38015
40
40
  hpcflow/sdk/cli_common.py,sha256=F5IXERXVRTlIwjrqYgYeNKLhK9MjpOnv6aAc_xIyIo0,7199
41
41
  hpcflow/sdk/config/__init__.py,sha256=7WUK7nb7UW64ZUDzaHa39BFAWWIfGRfgEPjSPxWjgWA,119
@@ -62,9 +62,9 @@ hpcflow/sdk/core/rule.py,sha256=cWpGaBiYsRHKeaG1XfbI_Rgwhpz6rfM-sQ1nUeTKKhA,5625
62
62
  hpcflow/sdk/core/run_dir_files.py,sha256=wtgWuvtWuNFo5YG5v1k3EBvYQFqGkr27mv4NqMlp4lQ,2410
63
63
  hpcflow/sdk/core/task.py,sha256=zwGW-YewQIh9JSDDV5mrm7epPFT0SRT7ofpI2HUh6RM,131822
64
64
  hpcflow/sdk/core/task_schema.py,sha256=uuV8_2iEZ2Q-0ZMnkdgbUsR6b7KOLrGFG69QD7zE9wQ,34717
65
- hpcflow/sdk/core/test_utils.py,sha256=vkpZesJNFNfBxjIDDr_WKIxFx2tUkde_kPn6eDjtwxs,10303
65
+ hpcflow/sdk/core/test_utils.py,sha256=9v0Bom2R16wj-ZNSY8Q__wsZO3nVuiBfnSG1fXKTDSw,10085
66
66
  hpcflow/sdk/core/utils.py,sha256=9PHfwfUyREJTSQYlCbRbKHwrx1SA6c7Uh_TFrg9xynQ,28591
67
- hpcflow/sdk/core/validation.py,sha256=jWBJiHOv2_pL-Dua9dpsd6Qc2KmDZOQeVhFri4vMn6U,704
67
+ hpcflow/sdk/core/validation.py,sha256=2Fxo3MldIcftwVUKs07ZeSlfTSRqFnq9J6T9327ukHI,545
68
68
  hpcflow/sdk/core/workflow.py,sha256=nd_NWNPZUgpc4GvX5Ivy1oF__Dj2Q_kIAfvQbBohXjs,120067
69
69
  hpcflow/sdk/core/zarr_io.py,sha256=RgJia3jgE3Y16ERU4nWNzHNDkK-qDS1znZMB1IfOUd4,6182
70
70
  hpcflow/sdk/data/__init__.py,sha256=-YzROirohSKU2UGYj5vkCe_J2KejbzhIjUXNaJwKHLk,568
@@ -151,8 +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.0a186.dist-info/LICENSE,sha256=Xhxf_KsrJNJFGMogumZhXSTPhUOVHCWf7nU-TDzqg0E,16763
155
- hpcflow_new2-0.2.0a186.dist-info/METADATA,sha256=EXxdKVjcIvnVtzxtat-tDl17UIjjidUhsvhCiu0Vipg,2465
156
- hpcflow_new2-0.2.0a186.dist-info/WHEEL,sha256=kLuE8m1WYU0Ig0_YEGrXyTtiJvKPpLpDEiChiNyei5Y,88
157
- hpcflow_new2-0.2.0a186.dist-info/entry_points.txt,sha256=aoGtCnFdfPcXfBdu2zZyMOJoz6fPgdR0elqsgrE-USU,106
158
- hpcflow_new2-0.2.0a186.dist-info/RECORD,,
154
+ hpcflow_new2-0.2.0a188.dist-info/LICENSE,sha256=Xhxf_KsrJNJFGMogumZhXSTPhUOVHCWf7nU-TDzqg0E,16763
155
+ hpcflow_new2-0.2.0a188.dist-info/METADATA,sha256=4r0GLNdUp2dxLl8EtHecYltzm4ZV38GDljiiOUeiir0,2243
156
+ hpcflow_new2-0.2.0a188.dist-info/WHEEL,sha256=kLuE8m1WYU0Ig0_YEGrXyTtiJvKPpLpDEiChiNyei5Y,88
157
+ hpcflow_new2-0.2.0a188.dist-info/entry_points.txt,sha256=aoGtCnFdfPcXfBdu2zZyMOJoz6fPgdR0elqsgrE-USU,106
158
+ hpcflow_new2-0.2.0a188.dist-info/RECORD,,