hpcflow-new2 0.2.0a199__tar.gz → 0.2.0a200__tar.gz

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.
Files changed (222) hide show
  1. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/PKG-INFO +1 -1
  2. hpcflow_new2-0.2.0a200/hpcflow/_version.py +1 -0
  3. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/app.py +16 -3
  4. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/core/utils.py +58 -12
  5. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/core/workflow.py +49 -20
  6. hpcflow_new2-0.2.0a200/hpcflow/tests/data/benchmark_script_runner.yaml +26 -0
  7. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_workflow_template.py +31 -0
  8. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/pyproject.toml +6 -2
  9. hpcflow_new2-0.2.0a199/hpcflow/_version.py +0 -1
  10. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/LICENSE +0 -0
  11. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/README.md +0 -0
  12. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/__init__.py +0 -0
  13. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/__pyinstaller/__init__.py +0 -0
  14. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/__pyinstaller/hook-hpcflow.py +0 -0
  15. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/app.py +0 -0
  16. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/cli.py +0 -0
  17. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/demo_data_manifest/__init__.py +0 -0
  18. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/demo_data_manifest/demo_data_manifest.json +0 -0
  19. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/__init__.py +0 -0
  20. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/bad_script.py +0 -0
  21. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/demo_task_1_generate_t1_infile_1.py +0 -0
  22. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/demo_task_1_generate_t1_infile_2.py +0 -0
  23. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/demo_task_1_parse_p3.py +0 -0
  24. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/do_nothing.py +0 -0
  25. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/env_specifier_test/input_file_generator_pass_env_spec.py +0 -0
  26. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/env_specifier_test/main_script_test_pass_env_spec.py +0 -0
  27. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/env_specifier_test/output_file_parser_pass_env_spec.py +0 -0
  28. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/env_specifier_test/v1/input_file_generator_basic.py +0 -0
  29. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/env_specifier_test/v1/main_script_test_direct_in_direct_out.py +0 -0
  30. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/env_specifier_test/v1/output_file_parser_basic.py +0 -0
  31. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/env_specifier_test/v2/main_script_test_direct_in_direct_out.py +0 -0
  32. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/generate_t1_file_01.py +0 -0
  33. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/input_file_generator_basic.py +0 -0
  34. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/input_file_generator_basic_FAIL.py +0 -0
  35. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/input_file_generator_test_stdout_stderr.py +0 -0
  36. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/main_script_test_direct_in.py +0 -0
  37. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/main_script_test_direct_in_direct_out.py +0 -0
  38. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/main_script_test_direct_in_direct_out_2.py +0 -0
  39. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/main_script_test_direct_in_direct_out_2_fail_allowed.py +0 -0
  40. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/main_script_test_direct_in_direct_out_2_fail_allowed_group.py +0 -0
  41. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/main_script_test_direct_in_direct_out_3.py +0 -0
  42. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/main_script_test_direct_in_direct_out_all_iters_test.py +0 -0
  43. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/main_script_test_direct_in_direct_out_env_spec.py +0 -0
  44. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/main_script_test_direct_in_direct_out_labels.py +0 -0
  45. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/main_script_test_direct_in_group_direct_out_3.py +0 -0
  46. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/main_script_test_direct_in_group_one_fail_direct_out_3.py +0 -0
  47. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/main_script_test_direct_sub_param_in_direct_out.py +0 -0
  48. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/main_script_test_hdf5_in_obj.py +0 -0
  49. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/main_script_test_hdf5_in_obj_2.py +0 -0
  50. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/main_script_test_hdf5_out_obj.py +0 -0
  51. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/main_script_test_json_and_direct_in_json_out.py +0 -0
  52. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/main_script_test_json_in_json_and_direct_out.py +0 -0
  53. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/main_script_test_json_in_json_out.py +0 -0
  54. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/main_script_test_json_in_json_out_labels.py +0 -0
  55. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/main_script_test_json_in_obj.py +0 -0
  56. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/main_script_test_json_out_FAIL.py +0 -0
  57. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/main_script_test_json_out_obj.py +0 -0
  58. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/main_script_test_json_sub_param_in_json_out_labels.py +0 -0
  59. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/main_script_test_shell_env_vars.py +0 -0
  60. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/main_script_test_std_out_std_err.py +0 -0
  61. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/output_file_parser_basic.py +0 -0
  62. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/output_file_parser_basic_FAIL.py +0 -0
  63. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/output_file_parser_test_stdout_stderr.py +0 -0
  64. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/parse_t1_file_01.py +0 -0
  65. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/scripts/script_exit_test.py +0 -0
  66. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/template_components/__init__.py +0 -0
  67. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/template_components/command_files.yaml +0 -0
  68. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/template_components/environments.yaml +0 -0
  69. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/template_components/parameters.yaml +0 -0
  70. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/template_components/task_schemas.yaml +0 -0
  71. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/workflows/__init__.py +0 -0
  72. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/data/workflows/workflow_1.yaml +0 -0
  73. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/examples.ipynb +0 -0
  74. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/__init__.py +0 -0
  75. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/cli.py +0 -0
  76. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/cli_common.py +0 -0
  77. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/config/__init__.py +0 -0
  78. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/config/callbacks.py +0 -0
  79. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/config/cli.py +0 -0
  80. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/config/config.py +0 -0
  81. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/config/config_file.py +0 -0
  82. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/config/errors.py +0 -0
  83. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/config/types.py +0 -0
  84. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/core/__init__.py +0 -0
  85. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/core/actions.py +0 -0
  86. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/core/app_aware.py +0 -0
  87. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/core/cache.py +0 -0
  88. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/core/command_files.py +0 -0
  89. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/core/commands.py +0 -0
  90. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/core/element.py +0 -0
  91. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/core/enums.py +0 -0
  92. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/core/environment.py +0 -0
  93. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/core/errors.py +0 -0
  94. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/core/execute.py +0 -0
  95. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/core/json_like.py +0 -0
  96. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/core/loop.py +0 -0
  97. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/core/loop_cache.py +0 -0
  98. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/core/object_list.py +0 -0
  99. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/core/parameters.py +0 -0
  100. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/core/rule.py +0 -0
  101. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/core/run_dir_files.py +0 -0
  102. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/core/skip_reason.py +0 -0
  103. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/core/task.py +0 -0
  104. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/core/task_schema.py +0 -0
  105. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/core/test_utils.py +0 -0
  106. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/core/types.py +0 -0
  107. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/core/validation.py +0 -0
  108. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/core/zarr_io.py +0 -0
  109. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/data/__init__.py +0 -0
  110. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/data/config_file_schema.yaml +0 -0
  111. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/data/config_schema.yaml +0 -0
  112. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/data/environments_spec_schema.yaml +0 -0
  113. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/data/files_spec_schema.yaml +0 -0
  114. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/data/parameters_spec_schema.yaml +0 -0
  115. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/data/task_schema_spec_schema.yaml +0 -0
  116. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/data/workflow_spec_schema.yaml +0 -0
  117. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/demo/__init__.py +0 -0
  118. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/demo/cli.py +0 -0
  119. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/helper/__init__.py +0 -0
  120. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/helper/cli.py +0 -0
  121. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/helper/helper.py +0 -0
  122. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/helper/watcher.py +0 -0
  123. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/log.py +0 -0
  124. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/persistence/__init__.py +0 -0
  125. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/persistence/base.py +0 -0
  126. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/persistence/defaults.py +0 -0
  127. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/persistence/discovery.py +0 -0
  128. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/persistence/json.py +0 -0
  129. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/persistence/pending.py +0 -0
  130. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/persistence/store_resource.py +0 -0
  131. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/persistence/types.py +0 -0
  132. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/persistence/utils.py +0 -0
  133. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/persistence/zarr.py +0 -0
  134. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/runtime.py +0 -0
  135. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/submission/__init__.py +0 -0
  136. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/submission/enums.py +0 -0
  137. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/submission/jobscript.py +0 -0
  138. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/submission/schedulers/__init__.py +0 -0
  139. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/submission/schedulers/direct.py +0 -0
  140. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/submission/schedulers/sge.py +0 -0
  141. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/submission/schedulers/slurm.py +0 -0
  142. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/submission/schedulers/utils.py +0 -0
  143. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/submission/shells/__init__.py +0 -0
  144. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/submission/shells/base.py +0 -0
  145. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/submission/shells/bash.py +0 -0
  146. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/submission/shells/os_version.py +0 -0
  147. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/submission/shells/powershell.py +0 -0
  148. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/submission/submission.py +0 -0
  149. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/submission/types.py +0 -0
  150. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/typing.py +0 -0
  151. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/utils/arrays.py +0 -0
  152. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/utils/deferred_file.py +0 -0
  153. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/utils/hashing.py +0 -0
  154. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/utils/patches.py +0 -0
  155. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/sdk/utils/strings.py +0 -0
  156. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/api/test_api.py +0 -0
  157. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/conftest.py +0 -0
  158. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/data/__init__.py +0 -0
  159. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/data/benchmark_N_elements.yaml +0 -0
  160. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/data/multi_path_sequences.yaml +0 -0
  161. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/data/workflow_1.json +0 -0
  162. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/data/workflow_1.yaml +0 -0
  163. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/data/workflow_1_slurm.yaml +0 -0
  164. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/data/workflow_1_wsl.yaml +0 -0
  165. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/data/workflow_test_run_abort.yaml +0 -0
  166. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/schedulers/direct_linux/test_direct_linux_submission.py +0 -0
  167. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/schedulers/sge/test_sge_submission.py +0 -0
  168. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/schedulers/slurm/test_slurm_submission.py +0 -0
  169. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/scripts/test_input_file_generators.py +0 -0
  170. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/scripts/test_main_scripts.py +0 -0
  171. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/scripts/test_non_snippet_script.py +0 -0
  172. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/scripts/test_ouput_file_parsers.py +0 -0
  173. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/shells/wsl/test_wsl_submission.py +0 -0
  174. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_action.py +0 -0
  175. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_action_rule.py +0 -0
  176. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_app.py +0 -0
  177. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_cache.py +0 -0
  178. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_cli.py +0 -0
  179. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_command.py +0 -0
  180. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_config.py +0 -0
  181. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_config_file.py +0 -0
  182. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_element.py +0 -0
  183. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_element_iteration.py +0 -0
  184. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_element_set.py +0 -0
  185. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_group.py +0 -0
  186. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_input_source.py +0 -0
  187. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_input_value.py +0 -0
  188. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_jobscript_unit.py +0 -0
  189. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_json_like.py +0 -0
  190. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_loop.py +0 -0
  191. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_meta_task.py +0 -0
  192. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_multi_path_sequences.py +0 -0
  193. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_object_list.py +0 -0
  194. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_parameter.py +0 -0
  195. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_persistence.py +0 -0
  196. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_resources.py +0 -0
  197. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_run.py +0 -0
  198. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_run_directories.py +0 -0
  199. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_runtime.py +0 -0
  200. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_schema_input.py +0 -0
  201. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_shell.py +0 -0
  202. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_slurm.py +0 -0
  203. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_submission.py +0 -0
  204. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_task.py +0 -0
  205. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_task_schema.py +0 -0
  206. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_utils.py +0 -0
  207. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_value_sequence.py +0 -0
  208. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/test_workflow.py +0 -0
  209. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/utils/test_arrays.py +0 -0
  210. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/utils/test_deferred_file_writer.py +0 -0
  211. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/utils/test_hashing.py +0 -0
  212. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/utils/test_patches.py +0 -0
  213. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/unit/utils/test_redirect_std.py +0 -0
  214. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/workflows/__init__.py +0 -0
  215. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/workflows/test_directory_structure.py +0 -0
  216. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/workflows/test_jobscript.py +0 -0
  217. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/workflows/test_run_status.py +0 -0
  218. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/workflows/test_skip_downstream.py +0 -0
  219. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/workflows/test_submission.py +0 -0
  220. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/workflows/test_workflows.py +0 -0
  221. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/tests/workflows/test_zip.py +0 -0
  222. {hpcflow_new2-0.2.0a199 → hpcflow_new2-0.2.0a200}/hpcflow/viz_demo.ipynb +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hpcflow-new2
3
- Version: 0.2.0a199
3
+ Version: 0.2.0a200
4
4
  Summary: Computational workflow management
5
5
  License: MPL-2.0
6
6
  Author: aplowman
@@ -0,0 +1 @@
1
+ __version__ = "0.2.0a200"
@@ -2370,10 +2370,23 @@ class BaseApp(metaclass=Singleton):
2370
2370
  else:
2371
2371
  print(contents)
2372
2372
 
2373
- def load_demo_workflow(self, name: str) -> _WorkflowTemplate:
2374
- """Load a WorkflowTemplate object from a builtin demo template file."""
2373
+ def load_demo_workflow(
2374
+ self, name: str, variables: dict[str, str] | Literal[False] | None = None
2375
+ ) -> _WorkflowTemplate:
2376
+ """Load a WorkflowTemplate object from a builtin demo template file.
2377
+
2378
+ Parameters
2379
+ ----------
2380
+ name:
2381
+ Name of the demo workflow to load.
2382
+ variables:
2383
+ String variables to substitute in the demo workflow. Substitutions will be
2384
+ attempted if the file looks to contain variable references (like
2385
+ "<<var:name>>"). If set to `False`, no substitutions will occur, which may
2386
+ result in an invalid workflow template!
2387
+ """
2375
2388
  with self.get_demo_workflow_template_file(name) as path:
2376
- return self.WorkflowTemplate.from_file(path)
2389
+ return self.WorkflowTemplate.from_file(path, variables=variables)
2377
2390
 
2378
2391
  def template_components_from_json_like(
2379
2392
  self, json_like: dict[str, dict]
@@ -414,20 +414,44 @@ def substitute_string_vars(string: str, variables: dict[str, str]):
414
414
 
415
415
  @TimeIt.decorator
416
416
  def read_YAML_str(
417
- yaml_str: str, typ="safe", variables: dict[str, str] | None = None
417
+ yaml_str: str, typ="safe", variables: dict[str, str] | Literal[False] | None = None
418
418
  ) -> Any:
419
- """Load a YAML string. This will produce basic objects."""
420
- if variables is not None and "<<var:" in yaml_str:
421
- yaml_str = substitute_string_vars(yaml_str, variables=variables)
419
+ """Load a YAML string. This will produce basic objects.
420
+
421
+ Parameters
422
+ ----------
423
+ yaml_str:
424
+ The YAML string to parse.
425
+ typ:
426
+ Load type passed to the YAML library.
427
+ variables:
428
+ String variables to substitute in `yaml_str`. Substitutions will be attempted if
429
+ the file looks to contain variable references (like "<<var:name>>"). If set to
430
+ `False`, no substitutions will occur.
431
+ """
432
+ if variables is not False and "<<var:" in yaml_str:
433
+ yaml_str = substitute_string_vars(yaml_str, variables=variables or {})
422
434
  yaml = YAML(typ=typ)
423
435
  return yaml.load(yaml_str)
424
436
 
425
437
 
426
438
  @TimeIt.decorator
427
439
  def read_YAML_file(
428
- path: PathLike, typ="safe", variables: dict[str, str] | None = None
440
+ path: PathLike, typ="safe", variables: dict[str, str] | Literal[False] | None = None
429
441
  ) -> Any:
430
- """Load a YAML file. This will produce basic objects."""
442
+ """Load a YAML file. This will produce basic objects.
443
+
444
+ Parameters
445
+ ----------
446
+ path:
447
+ Path to the YAML file to parse.
448
+ typ:
449
+ Load type passed to the YAML library.
450
+ variables:
451
+ String variables to substitute in the file given by `path`. Substitutions will be
452
+ attempted if the file looks to contain variable references (like "<<var:name>>").
453
+ If set to `False`, no substitutions will occur.
454
+ """
431
455
  with fsspec.open(path, "rt") as f:
432
456
  yaml_str: str = f.read()
433
457
  return read_YAML_str(yaml_str, typ=typ, variables=variables)
@@ -440,15 +464,37 @@ def write_YAML_file(obj, path: str | Path, typ: str = "safe") -> None:
440
464
  yaml.dump(obj, fp)
441
465
 
442
466
 
443
- def read_JSON_string(json_str: str, variables: dict[str, str] | None = None) -> Any:
444
- """Load a JSON string. This will produce basic objects."""
445
- if variables is not None and "<<var:" in json_str:
446
- json_str = substitute_string_vars(json_str, variables=variables)
467
+ def read_JSON_string(
468
+ json_str: str, variables: dict[str, str] | Literal[False] | None = None
469
+ ) -> Any:
470
+ """Load a JSON string. This will produce basic objects.
471
+
472
+ Parameters
473
+ ----------
474
+ json_str:
475
+ The JSON string to parse.
476
+ variables:
477
+ String variables to substitute in `json_str`. Substitutions will be attempted if
478
+ the file looks to contain variable references (like "<<var:name>>"). If set to
479
+ `False`, no substitutions will occur.
480
+ """
481
+ if variables is not False and "<<var:" in json_str:
482
+ json_str = substitute_string_vars(json_str, variables=variables or {})
447
483
  return json.loads(json_str)
448
484
 
449
485
 
450
- def read_JSON_file(path, variables: dict[str, str] | None = None) -> Any:
451
- """Load a JSON file. This will produce basic objects."""
486
+ def read_JSON_file(path, variables: dict[str, str] | Literal[False] | None = None) -> Any:
487
+ """Load a JSON file. This will produce basic objects.
488
+
489
+ Parameters
490
+ ----------
491
+ path:
492
+ Path to the JSON file to parse.
493
+ variables:
494
+ String variables to substitute in the file given by `path`. Substitutions will be
495
+ attempted if the file looks to contain variable references (like "<<var:name>>").
496
+ If set to `False`, no substitutions will occur.
497
+ """
452
498
  with fsspec.open(path, "rt") as f:
453
499
  json_str: str = f.read()
454
500
  return read_JSON_string(json_str, variables=variables)
@@ -564,7 +564,7 @@ class WorkflowTemplate(JSONLike):
564
564
  def from_YAML_string(
565
565
  cls,
566
566
  string: str,
567
- variables: dict[str, str] | None = None,
567
+ variables: dict[str, str] | Literal[False] | None = None,
568
568
  ) -> WorkflowTemplate:
569
569
  """Load from a YAML string.
570
570
 
@@ -573,7 +573,10 @@ class WorkflowTemplate(JSONLike):
573
573
  string
574
574
  The YAML string containing the workflow template parametrisation.
575
575
  variables
576
- String variables to substitute in `string`.
576
+ String variables to substitute in `string`. Substitutions will be attempted if
577
+ the YAML string looks to contain variable references (like "<<var:name>>"). If
578
+ set to `False`, no substitutions will occur, which may result in an invalid
579
+ workflow template!
577
580
  """
578
581
  return cls._from_data(read_YAML_str(string, variables=variables))
579
582
 
@@ -597,7 +600,7 @@ class WorkflowTemplate(JSONLike):
597
600
  def from_YAML_file(
598
601
  cls,
599
602
  path: PathLike,
600
- variables: dict[str, str] | None = None,
603
+ variables: dict[str, str] | Literal[False] | None = None,
601
604
  ) -> WorkflowTemplate:
602
605
  """Load from a YAML file.
603
606
 
@@ -606,7 +609,10 @@ class WorkflowTemplate(JSONLike):
606
609
  path
607
610
  The path to the YAML file containing the workflow template parametrisation.
608
611
  variables
609
- String variables to substitute in the file given by `path`.
612
+ String variables to substitute in the file given by `path`. Substitutions will
613
+ be attempted if the YAML file looks to contain variable references (like
614
+ "<<var:name>>"). If set to `False`, no substitutions will occur, which may
615
+ result in an invalid workflow template!
610
616
 
611
617
  """
612
618
  cls._app.logger.debug("parsing workflow template from a YAML file")
@@ -620,7 +626,7 @@ class WorkflowTemplate(JSONLike):
620
626
  def from_JSON_string(
621
627
  cls,
622
628
  string: str,
623
- variables: dict[str, str] | None = None,
629
+ variables: dict[str, str] | Literal[False] | None = None,
624
630
  ) -> WorkflowTemplate:
625
631
  """Load from a JSON string.
626
632
 
@@ -629,7 +635,10 @@ class WorkflowTemplate(JSONLike):
629
635
  string
630
636
  The JSON string containing the workflow template parametrisation.
631
637
  variables
632
- String variables to substitute in `string`.
638
+ String variables to substitute in `string`. Substitutions will be attempted if
639
+ the JSON string looks to contain variable references (like "<<var:name>>"). If
640
+ set to `False`, no substitutions will occur, which may result in an invalid
641
+ workflow template!
633
642
  """
634
643
  return cls._from_data(read_JSON_string(string, variables=variables))
635
644
 
@@ -638,7 +647,7 @@ class WorkflowTemplate(JSONLike):
638
647
  def from_JSON_file(
639
648
  cls,
640
649
  path: PathLike,
641
- variables: dict[str, str] | None = None,
650
+ variables: dict[str, str] | Literal[False] | None = None,
642
651
  ) -> WorkflowTemplate:
643
652
  """Load from a JSON file.
644
653
 
@@ -647,7 +656,10 @@ class WorkflowTemplate(JSONLike):
647
656
  path
648
657
  The path to the JSON file containing the workflow template parametrisation.
649
658
  variables
650
- String variables to substitute in the file given by `path`.
659
+ String variables to substitute in the file given by `path`. Substitutions will
660
+ be attempted if the JSON file looks to contain variable references (like
661
+ "<<var:name>>"). If set to `False`, no substitutions will occur, which may
662
+ result in an invalid workflow template!
651
663
  """
652
664
  cls._app.logger.debug("parsing workflow template from a JSON file")
653
665
  data = read_JSON_file(path, variables=variables)
@@ -661,7 +673,7 @@ class WorkflowTemplate(JSONLike):
661
673
  cls,
662
674
  path: PathLike,
663
675
  template_format: Literal["yaml", "json"] | None = None,
664
- variables: dict[str, str] | None = None,
676
+ variables: dict[str, str] | Literal[False] | None = None,
665
677
  ) -> WorkflowTemplate:
666
678
  """Load from either a YAML or JSON file, depending on the file extension.
667
679
 
@@ -673,8 +685,10 @@ class WorkflowTemplate(JSONLike):
673
685
  The file format to expect at `path`. One of "json" or "yaml", if specified. By
674
686
  default, "yaml".
675
687
  variables
676
- String variables to substitute in the file given by `path`.
677
-
688
+ String variables to substitute in the file given by `path`. Substitutions will
689
+ be attempted if the file looks to contain variable references (like
690
+ "<<var:name>>"). If set to `False`, no substitutions will occur, which may
691
+ result in an invalid workflow template!
678
692
  """
679
693
  path_ = Path(path or ".")
680
694
  fmt = template_format.lower() if template_format else None
@@ -983,7 +997,7 @@ class Workflow(AppAware):
983
997
  ts_fmt: str | None = None,
984
998
  ts_name_fmt: str | None = None,
985
999
  store_kwargs: dict[str, Any] | None = None,
986
- variables: dict[str, str] | None = None,
1000
+ variables: dict[str, str] | Literal[False] | None = None,
987
1001
  ) -> Workflow:
988
1002
  """Generate from a YAML file.
989
1003
 
@@ -1013,7 +1027,10 @@ class Workflow(AppAware):
1013
1027
  store_kwargs:
1014
1028
  Keyword arguments to pass to the store's `write_empty_workflow` method.
1015
1029
  variables:
1016
- String variables to substitute in the file given by `YAML_path`.
1030
+ String variables to substitute in the file given by `YAML_path`. Substitutions
1031
+ will be attempted if the YAML file looks to contain variable references (like
1032
+ "<<var:name>>"). If set to `False`, no substitutions will occur, which may
1033
+ result in an invalid workflow template!
1017
1034
  """
1018
1035
  template = cls._app.WorkflowTemplate.from_YAML_file(
1019
1036
  path=YAML_path,
@@ -1041,7 +1058,7 @@ class Workflow(AppAware):
1041
1058
  ts_fmt: str | None = None,
1042
1059
  ts_name_fmt: str | None = None,
1043
1060
  store_kwargs: dict[str, Any] | None = None,
1044
- variables: dict[str, str] | None = None,
1061
+ variables: dict[str, str] | Literal[False] | None = None,
1045
1062
  status: Status | None = None,
1046
1063
  ) -> Workflow:
1047
1064
  """Generate from a YAML string.
@@ -1072,7 +1089,10 @@ class Workflow(AppAware):
1072
1089
  store_kwargs:
1073
1090
  Keyword arguments to pass to the store's `write_empty_workflow` method.
1074
1091
  variables:
1075
- String variables to substitute in the string `YAML_str`.
1092
+ String variables to substitute in the string `YAML_str`. Substitutions will be
1093
+ attempted if the YAML string looks to contain variable references (like
1094
+ "<<var:name>>"). If set to `False`, no substitutions will occur, which may
1095
+ result in an invalid workflow template!
1076
1096
  """
1077
1097
  template = cls._app.WorkflowTemplate.from_YAML_string(
1078
1098
  string=YAML_str,
@@ -1101,7 +1121,7 @@ class Workflow(AppAware):
1101
1121
  ts_fmt: str | None = None,
1102
1122
  ts_name_fmt: str | None = None,
1103
1123
  store_kwargs: dict[str, Any] | None = None,
1104
- variables: dict[str, str] | None = None,
1124
+ variables: dict[str, str] | Literal[False] | None = None,
1105
1125
  status: Status | None = None,
1106
1126
  ) -> Workflow:
1107
1127
  """Generate from a JSON file.
@@ -1132,7 +1152,10 @@ class Workflow(AppAware):
1132
1152
  store_kwargs:
1133
1153
  Keyword arguments to pass to the store's `write_empty_workflow` method.
1134
1154
  variables:
1135
- String variables to substitute in the file given by `JSON_path`.
1155
+ String variables to substitute in the file given by `JSON_path`. Substitutions
1156
+ will be attempted if the JSON file looks to contain variable references (like
1157
+ "<<var:name>>"). If set to `False`, no substitutions will occur, which may
1158
+ result in an invalid workflow template!
1136
1159
  """
1137
1160
  template = cls._app.WorkflowTemplate.from_JSON_file(
1138
1161
  path=JSON_path,
@@ -1161,7 +1184,7 @@ class Workflow(AppAware):
1161
1184
  ts_fmt: str | None = None,
1162
1185
  ts_name_fmt: str | None = None,
1163
1186
  store_kwargs: dict[str, Any] | None = None,
1164
- variables: dict[str, str] | None = None,
1187
+ variables: dict[str, str] | Literal[False] | None = None,
1165
1188
  status: Status | None = None,
1166
1189
  ) -> Workflow:
1167
1190
  """Generate from a JSON string.
@@ -1192,7 +1215,10 @@ class Workflow(AppAware):
1192
1215
  store_kwargs:
1193
1216
  Keyword arguments to pass to the store's `write_empty_workflow` method.
1194
1217
  variables:
1195
- String variables to substitute in the string `JSON_str`.
1218
+ String variables to substitute in the string `JSON_str`. Substitutions will be
1219
+ attempted if the JSON string looks to contain variable references (like
1220
+ "<<var:name>>"). If set to `False`, no substitutions will occur, which may
1221
+ result in an invalid workflow template!
1196
1222
  """
1197
1223
  template = cls._app.WorkflowTemplate.from_JSON_string(
1198
1224
  string=JSON_str,
@@ -1223,7 +1249,7 @@ class Workflow(AppAware):
1223
1249
  ts_fmt: str | None = None,
1224
1250
  ts_name_fmt: str | None = None,
1225
1251
  store_kwargs: dict[str, Any] | None = None,
1226
- variables: dict[str, str] | None = None,
1252
+ variables: dict[str, str] | Literal[False] | None = None,
1227
1253
  status: Status | None = None,
1228
1254
  ) -> Workflow:
1229
1255
  """Generate from either a YAML or JSON file, depending on the file extension.
@@ -1259,6 +1285,9 @@ class Workflow(AppAware):
1259
1285
  Keyword arguments to pass to the store's `write_empty_workflow` method.
1260
1286
  variables:
1261
1287
  String variables to substitute in the file given by `template_path`.
1288
+ Substitutions will be attempted if the file looks to contain variable
1289
+ references (like "<<var:name>>"). If set to `False`, no substitutions will
1290
+ occur, which may result in an invalid workflow template!
1262
1291
  """
1263
1292
  try:
1264
1293
  template = cls._app.WorkflowTemplate.from_file(
@@ -0,0 +1,26 @@
1
+ doc: |
2
+ A workflow for benchmarking the overhead introduced by hpcflow in running a Python
3
+ script `N` times.
4
+
5
+ template_components:
6
+ task_schemas:
7
+ - objective: run_script
8
+ inputs:
9
+ - parameter: p1
10
+ outputs:
11
+ - parameter: p2
12
+ actions:
13
+ - environments:
14
+ - scope:
15
+ type: any
16
+ environment: python_env
17
+ script: <<script:main_script_test_direct_in_direct_out.py>>
18
+ script_exe: python_script
19
+ script_data_in: direct
20
+ script_data_out: direct
21
+
22
+ tasks:
23
+ - schema: run_script
24
+ inputs:
25
+ p1: 101
26
+ repeats: <<var:N[default=1]>>
@@ -1,5 +1,7 @@
1
+ from textwrap import dedent
1
2
  import pytest
2
3
  from hpcflow.app import app as hf
4
+ from hpcflow.sdk.core.errors import MissingVariableSubstitutionError
3
5
  from hpcflow.sdk.core.test_utils import (
4
6
  make_test_data_YAML_workflow_template,
5
7
  )
@@ -38,6 +40,35 @@ def test_workflow_template_vars(tmp_path, new_null_config):
38
40
  assert wkt.tasks[0].element_sets[0].repeats[0]["number"] == num_repeats
39
41
 
40
42
 
43
+ def test_workflow_template_vars_raise_no_vars(tmp_path, new_null_config):
44
+ # no default value for the variable is provided in `benchmark_N_elements`, so should
45
+ # raise if the variables dict is not passed:
46
+ with pytest.raises(MissingVariableSubstitutionError):
47
+ make_test_data_YAML_workflow_template("benchmark_N_elements.yaml")
48
+
49
+
50
+ def test_workflow_template_vars_defaults_used(tmp_path, new_null_config):
51
+ # `benchmark_script_runner` contains a default value for the variable `N`, so that
52
+ # should be used, since we don't pass any variables:
53
+ wkt = make_test_data_YAML_workflow_template("benchmark_script_runner.yaml")
54
+ assert wkt.tasks[0].element_sets[0].repeats[0]["number"] == 1
55
+
56
+
57
+ def test_workflow_template_vars_False_no_substitution(tmp_path, new_null_config):
58
+ # read a yaml template, check variables are not substituted, when `variables=False`:
59
+ wkt_yaml = dedent(
60
+ """\
61
+ name: workflow_1
62
+ tasks:
63
+ - schema: test_t1_conditional_OS
64
+ inputs:
65
+ p1: <<var:my_var>>
66
+ """
67
+ )
68
+ wkt = hf.WorkflowTemplate.from_YAML_string(wkt_yaml, variables=False)
69
+ assert wkt.tasks[0].element_sets[0].inputs[0].value == "<<var:my_var>>"
70
+
71
+
41
72
  def test_env_preset_merge_simple(null_config):
42
73
  s1 = hf.TaskSchema(
43
74
  objective="s1",
@@ -1,7 +1,7 @@
1
1
 
2
2
  [tool.poetry]
3
3
  name = "hpcflow-new2"
4
- version = "0.2.0a199"
4
+ version = "0.2.0a200"
5
5
 
6
6
  description = "Computational workflow management"
7
7
  authors = ["aplowman <adam.plowman@manchester.ac.uk>"]
@@ -55,6 +55,10 @@ sphinx-design = "^0.4.1"
55
55
  sphinx-togglebutton = "^0.3.2"
56
56
  pydata-sphinx-theme = "^0.13.3"
57
57
  ipykernel = "^6.25.1"
58
+ myst-nb = [
59
+ {version = "0.17.2", python = "<3.9"},
60
+ {version = "1.1.1", python = ">=3.9"}
61
+ ]
58
62
 
59
63
  [tool.poetry.group.test.dependencies]
60
64
  pytest = "^7.2.0"
@@ -89,7 +93,7 @@ hook-dirs = "hpcflow.__pyinstaller:get_hook_dirs"
89
93
 
90
94
  [tool.commitizen]
91
95
  name = "cz_conventional_commits"
92
- version = "0.2.0a199"
96
+ version = "0.2.0a200"
93
97
  tag_format = "v$version"
94
98
  version_files = [
95
99
  "pyproject.toml:version",
@@ -1 +0,0 @@
1
- __version__ = "0.2.0a199"