hpcflow-new2 0.2.0a153__tar.gz → 0.2.0a156__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 (152) hide show
  1. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/PKG-INFO +1 -1
  2. hpcflow_new2-0.2.0a156/hpcflow/_version.py +1 -0
  3. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/app.py +2 -2
  4. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/core/utils.py +22 -8
  5. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/demo/cli.py +2 -2
  6. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/unit/test_utils.py +13 -0
  7. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/pyproject.toml +2 -2
  8. hpcflow_new2-0.2.0a153/hpcflow/_version.py +0 -1
  9. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/README.md +0 -0
  10. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/__init__.py +0 -0
  11. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/__pyinstaller/__init__.py +0 -0
  12. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/__pyinstaller/hook-hpcflow.py +0 -0
  13. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/app.py +0 -0
  14. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/cli.py +0 -0
  15. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/data/demo_data_manifest/__init__.py +0 -0
  16. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/data/demo_data_manifest/demo_data_manifest.json +0 -0
  17. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/data/scripts/__init__.py +0 -0
  18. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/data/scripts/demo_task_1_generate_t1_infile_1.py +0 -0
  19. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/data/scripts/demo_task_1_generate_t1_infile_2.py +0 -0
  20. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/data/scripts/demo_task_1_parse_p3.py +0 -0
  21. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/data/scripts/generate_t1_file_01.py +0 -0
  22. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/data/scripts/main_script_test_direct_in_direct_out.py +0 -0
  23. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/data/scripts/main_script_test_direct_in_direct_out_all_iters_test.py +0 -0
  24. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/data/scripts/main_script_test_direct_in_direct_out_labels.py +0 -0
  25. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/data/scripts/main_script_test_direct_sub_param_in_direct_out.py +0 -0
  26. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/data/scripts/main_script_test_hdf5_in_obj.py +0 -0
  27. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/data/scripts/main_script_test_hdf5_out_obj.py +0 -0
  28. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/data/scripts/main_script_test_json_and_direct_in_json_out.py +0 -0
  29. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/data/scripts/main_script_test_json_in_json_and_direct_out.py +0 -0
  30. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/data/scripts/main_script_test_json_in_json_out.py +0 -0
  31. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/data/scripts/main_script_test_json_in_json_out_labels.py +0 -0
  32. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/data/scripts/main_script_test_json_in_obj.py +0 -0
  33. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/data/scripts/main_script_test_json_out_obj.py +0 -0
  34. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/data/scripts/main_script_test_json_sub_param_in_json_out_labels.py +0 -0
  35. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/data/scripts/parse_t1_file_01.py +0 -0
  36. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/data/template_components/__init__.py +0 -0
  37. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/data/template_components/command_files.yaml +0 -0
  38. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/data/template_components/environments.yaml +0 -0
  39. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/data/template_components/parameters.yaml +0 -0
  40. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/data/template_components/task_schemas.yaml +0 -0
  41. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/data/workflows/__init__.py +0 -0
  42. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/data/workflows/workflow_1.yaml +0 -0
  43. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/examples.ipynb +0 -0
  44. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/__init__.py +0 -0
  45. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/cli.py +0 -0
  46. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/cli_common.py +0 -0
  47. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/config/__init__.py +0 -0
  48. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/config/callbacks.py +0 -0
  49. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/config/cli.py +0 -0
  50. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/config/config.py +0 -0
  51. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/config/config_file.py +0 -0
  52. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/config/errors.py +0 -0
  53. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/core/__init__.py +0 -0
  54. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/core/actions.py +0 -0
  55. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/core/command_files.py +0 -0
  56. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/core/commands.py +0 -0
  57. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/core/element.py +0 -0
  58. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/core/environment.py +0 -0
  59. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/core/errors.py +0 -0
  60. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/core/json_like.py +0 -0
  61. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/core/loop.py +0 -0
  62. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/core/object_list.py +0 -0
  63. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/core/parallel.py +0 -0
  64. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/core/parameters.py +0 -0
  65. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/core/rule.py +0 -0
  66. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/core/task.py +0 -0
  67. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/core/task_schema.py +0 -0
  68. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/core/test_utils.py +0 -0
  69. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/core/validation.py +0 -0
  70. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/core/workflow.py +0 -0
  71. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/core/zarr_io.py +0 -0
  72. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/data/__init__.py +0 -0
  73. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/data/config_file_schema.yaml +0 -0
  74. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/data/config_schema.yaml +0 -0
  75. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/data/environments_spec_schema.yaml +0 -0
  76. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/data/files_spec_schema.yaml +0 -0
  77. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/data/parameters_spec_schema.yaml +0 -0
  78. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/data/task_schema_spec_schema.yaml +0 -0
  79. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/data/workflow_spec_schema.yaml +0 -0
  80. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/demo/__init__.py +0 -0
  81. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/helper/__init__.py +0 -0
  82. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/helper/cli.py +0 -0
  83. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/helper/helper.py +0 -0
  84. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/helper/watcher.py +0 -0
  85. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/log.py +0 -0
  86. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/persistence/__init__.py +0 -0
  87. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/persistence/base.py +0 -0
  88. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/persistence/json.py +0 -0
  89. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/persistence/pending.py +0 -0
  90. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/persistence/store_resource.py +0 -0
  91. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/persistence/utils.py +0 -0
  92. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/persistence/zarr.py +0 -0
  93. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/runtime.py +0 -0
  94. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/submission/__init__.py +0 -0
  95. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/submission/jobscript.py +0 -0
  96. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/submission/jobscript_info.py +0 -0
  97. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/submission/schedulers/__init__.py +0 -0
  98. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/submission/schedulers/direct.py +0 -0
  99. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/submission/schedulers/sge.py +0 -0
  100. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/submission/schedulers/slurm.py +0 -0
  101. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/submission/schedulers/utils.py +0 -0
  102. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/submission/shells/__init__.py +0 -0
  103. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/submission/shells/base.py +0 -0
  104. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/submission/shells/bash.py +0 -0
  105. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/submission/shells/os_version.py +0 -0
  106. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/submission/shells/powershell.py +0 -0
  107. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/submission/submission.py +0 -0
  108. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/sdk/typing.py +0 -0
  109. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/conftest.py +0 -0
  110. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/data/__init__.py +0 -0
  111. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/data/benchmark_N_elements.yaml +0 -0
  112. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/data/workflow_1.json +0 -0
  113. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/data/workflow_1.yaml +0 -0
  114. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/data/workflow_1_slurm.yaml +0 -0
  115. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/data/workflow_1_wsl.yaml +0 -0
  116. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/data/workflow_test_run_abort.yaml +0 -0
  117. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/schedulers/direct_linux/test_direct_linux_submission.py +0 -0
  118. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/schedulers/slurm/test_slurm_submission.py +0 -0
  119. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/scripts/test_main_scripts.py +0 -0
  120. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/shells/wsl/test_wsl_submission.py +0 -0
  121. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/unit/test_action.py +0 -0
  122. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/unit/test_action_rule.py +0 -0
  123. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/unit/test_app.py +0 -0
  124. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/unit/test_cli.py +0 -0
  125. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/unit/test_command.py +0 -0
  126. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/unit/test_config.py +0 -0
  127. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/unit/test_config_file.py +0 -0
  128. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/unit/test_element.py +0 -0
  129. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/unit/test_element_iteration.py +0 -0
  130. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/unit/test_element_set.py +0 -0
  131. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/unit/test_input_source.py +0 -0
  132. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/unit/test_input_value.py +0 -0
  133. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/unit/test_json_like.py +0 -0
  134. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/unit/test_loop.py +0 -0
  135. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/unit/test_object_list.py +0 -0
  136. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/unit/test_parameter.py +0 -0
  137. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/unit/test_persistence.py +0 -0
  138. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/unit/test_resources.py +0 -0
  139. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/unit/test_run.py +0 -0
  140. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/unit/test_runtime.py +0 -0
  141. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/unit/test_schema_input.py +0 -0
  142. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/unit/test_shell.py +0 -0
  143. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/unit/test_slurm.py +0 -0
  144. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/unit/test_submission.py +0 -0
  145. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/unit/test_task.py +0 -0
  146. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/unit/test_task_schema.py +0 -0
  147. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/unit/test_value_sequence.py +0 -0
  148. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/unit/test_workflow.py +0 -0
  149. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/unit/test_workflow_template.py +0 -0
  150. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/workflows/test_jobscript.py +0 -0
  151. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/hpcflow/tests/workflows/test_workflows.py +0 -0
  152. {hpcflow_new2-0.2.0a153 → hpcflow_new2-0.2.0a156}/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.0a153
3
+ Version: 0.2.0a156
4
4
  Summary: Computational workflow management
5
5
  License: MIT
6
6
  Author: aplowman
@@ -0,0 +1 @@
1
+ __version__ = "0.2.0a156"
@@ -822,12 +822,12 @@ class BaseApp(metaclass=Singleton):
822
822
  # load the file, modify, then dump to temp location:
823
823
  if builtin_path.suffix in (".yaml", ".yml"):
824
824
  # use round-trip loader to preserve comments:
825
- data = read_YAML_file(builtin_path, typ="rt")
825
+ data = read_YAML_file(builtin_path, typ="rt", variables=False)
826
826
  data.pop("doc", None)
827
827
  write_YAML_file(data, path, typ="rt")
828
828
 
829
829
  elif builtin_path.suffix in (".json", ".jsonc"):
830
- data = read_JSON_file(builtin_path)
830
+ data = read_JSON_file(builtin_path, variables=False)
831
831
  data.pop("doc", None)
832
832
  write_JSON_file(data, path)
833
833
 
@@ -387,22 +387,36 @@ def check_in_object_list(spec_name, spec_pos=1, obj_list_pos=2):
387
387
  return decorator
388
388
 
389
389
 
390
+ @TimeIt.decorator
390
391
  def substitute_string_vars(string, variables: Dict[str, str] = None):
391
392
  variables = variables or {}
392
393
 
393
394
  def var_repl(match_obj):
394
- var_name = match_obj.group(1)
395
+ kwargs = {}
396
+ var_name, kwargs_str = match_obj.groups()
397
+ if kwargs_str:
398
+ kwargs_lst = kwargs_str.split(",")
399
+ for i in kwargs_lst:
400
+ k, v = i.strip().split("=")
401
+ kwargs[k.strip()] = v.strip()
395
402
  try:
396
403
  out = str(variables[var_name])
397
404
  except KeyError:
398
- raise MissingVariableSubstitutionError(
399
- f"The variable {var_name!r} referenced in the string does not match any "
400
- f"of the provided variables: {list(variables)!r}."
401
- )
405
+ if "default" in kwargs:
406
+ out = kwargs["default"]
407
+ print(
408
+ f"Using default value ({out!r}) for workflow template string "
409
+ f"variable {var_name!r}."
410
+ )
411
+ else:
412
+ raise MissingVariableSubstitutionError(
413
+ f"The variable {var_name!r} referenced in the string does not match "
414
+ f"any of the provided variables: {list(variables)!r}."
415
+ )
402
416
  return out
403
417
 
404
418
  new_str = re.sub(
405
- pattern=r"\<\<var:(.*?)\>\>",
419
+ pattern=r"\<\<var:(.*?)(?:\[(.*)\])?\>\>",
406
420
  repl=var_repl,
407
421
  string=string,
408
422
  )
@@ -412,7 +426,7 @@ def substitute_string_vars(string, variables: Dict[str, str] = None):
412
426
  @TimeIt.decorator
413
427
  def read_YAML_str(yaml_str, typ="safe", variables: Dict[str, str] = None):
414
428
  """Load a YAML string."""
415
- if variables:
429
+ if variables is not False and "<<var:" in yaml_str:
416
430
  yaml_str = substitute_string_vars(yaml_str, variables=variables)
417
431
  yaml = YAML(typ=typ)
418
432
  return yaml.load(yaml_str)
@@ -432,7 +446,7 @@ def write_YAML_file(obj, path: PathLike, typ="safe"):
432
446
 
433
447
 
434
448
  def read_JSON_string(json_str: str, variables: Dict[str, str] = None):
435
- if variables:
449
+ if variables is not False and "<<var:" in json_str:
436
450
  json_str = substitute_string_vars(json_str, variables=variables)
437
451
  return json.loads(json_str)
438
452
 
@@ -120,7 +120,7 @@ def get_demo_workflow_CLI(app):
120
120
  store=store,
121
121
  ts_fmt=ts_fmt,
122
122
  ts_name_fmt=ts_name_fmt,
123
- variables=variables,
123
+ variables=dict(variables),
124
124
  )
125
125
  click.echo(wk.path)
126
126
 
@@ -164,7 +164,7 @@ def get_demo_workflow_CLI(app):
164
164
  store=store,
165
165
  ts_fmt=ts_fmt,
166
166
  ts_name_fmt=ts_name_fmt,
167
- variables=variables,
167
+ variables=dict(variables),
168
168
  JS_parallelism=js_parallelism,
169
169
  wait=wait,
170
170
  add_to_known=add_to_known,
@@ -515,3 +515,16 @@ def test_substitute_string_vars_raise_missing():
515
515
 
516
516
  def test_substitute_string_vars_non_str():
517
517
  assert substitute_string_vars("<<var:a>>", variables={"a": 2}) == "2"
518
+
519
+
520
+ def test_substitute_string_vars_default_value():
521
+ assert substitute_string_vars("hello <<var:my_name[default=bill]>>!") == "hello bill!"
522
+
523
+
524
+ def test_substitute_string_vars_default_value_with_specified():
525
+ assert (
526
+ substitute_string_vars(
527
+ "hello <<var:my_name[default=bill]>>!", variables={"my_name": "bob"}
528
+ )
529
+ == "hello bob!"
530
+ )
@@ -1,7 +1,7 @@
1
1
 
2
2
  [tool.poetry]
3
3
  name = "hpcflow-new2"
4
- version = "0.2.0a153"
4
+ version = "0.2.0a156"
5
5
 
6
6
  description = "Computational workflow management"
7
7
  authors = ["aplowman <adam.plowman@manchester.ac.uk>"]
@@ -77,7 +77,7 @@ hook-dirs = "hpcflow.__pyinstaller:get_hook_dirs"
77
77
 
78
78
  [tool.commitizen]
79
79
  name = "cz_conventional_commits"
80
- version = "0.2.0a153"
80
+ version = "0.2.0a156"
81
81
  tag_format = "v$version"
82
82
  version_files = [
83
83
  "pyproject.toml:version",
@@ -1 +0,0 @@
1
- __version__ = "0.2.0a153"