metaflow 2.12.39__tar.gz → 2.13.1__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 (374) hide show
  1. {metaflow-2.12.39/metaflow.egg-info → metaflow-2.13.1}/PKG-INFO +2 -2
  2. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/__init__.py +1 -1
  3. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/cli.py +111 -36
  4. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/cli_args.py +2 -2
  5. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/cli_components/run_cmds.py +3 -1
  6. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/datastore/flow_datastore.py +2 -2
  7. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/exception.py +8 -2
  8. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/flowspec.py +48 -36
  9. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/graph.py +28 -27
  10. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/includefile.py +2 -2
  11. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/lint.py +35 -20
  12. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/metadata_provider/heartbeat.py +23 -8
  13. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/metaflow_config.py +7 -0
  14. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/parameters.py +11 -4
  15. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/argo/argo_client.py +0 -2
  16. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/argo/argo_workflows.py +86 -104
  17. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/argo/argo_workflows_cli.py +0 -1
  18. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/argo/argo_workflows_decorator.py +2 -4
  19. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/argo/argo_workflows_deployer_objects.py +42 -0
  20. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/argo/jobset_input_paths.py +0 -1
  21. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/aws/aws_utils.py +6 -1
  22. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/aws/batch/batch_client.py +1 -3
  23. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/aws/batch/batch_decorator.py +11 -11
  24. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.py +13 -10
  25. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/aws/step_functions/dynamo_db_client.py +0 -3
  26. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/aws/step_functions/production_token.py +1 -1
  27. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/aws/step_functions/step_functions.py +1 -1
  28. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/aws/step_functions/step_functions_cli.py +0 -1
  29. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/aws/step_functions/step_functions_decorator.py +0 -1
  30. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/aws/step_functions/step_functions_deployer_objects.py +0 -1
  31. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/cards/card_creator.py +1 -0
  32. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/cards/card_decorator.py +46 -8
  33. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/kubernetes/kube_utils.py +55 -1
  34. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/kubernetes/kubernetes.py +33 -80
  35. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/kubernetes/kubernetes_cli.py +22 -5
  36. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/kubernetes/kubernetes_decorator.py +49 -2
  37. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/kubernetes/kubernetes_job.py +3 -6
  38. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/kubernetes/kubernetes_jobsets.py +22 -5
  39. metaflow-2.13.1/metaflow/plugins/pypi/bootstrap.py +308 -0
  40. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/pypi/conda_environment.py +83 -27
  41. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/pypi/micromamba.py +77 -36
  42. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/pypi/pip.py +9 -6
  43. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/pypi/utils.py +4 -2
  44. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/runner/click_api.py +175 -39
  45. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/runner/deployer_impl.py +6 -1
  46. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/runner/metaflow_runner.py +6 -1
  47. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/runner/utils.py +5 -0
  48. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/user_configs/config_options.py +87 -34
  49. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/user_configs/config_parameters.py +44 -25
  50. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/util.py +2 -2
  51. metaflow-2.13.1/metaflow/version.py +1 -0
  52. {metaflow-2.12.39 → metaflow-2.13.1/metaflow.egg-info}/PKG-INFO +2 -2
  53. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow.egg-info/requires.txt +1 -1
  54. metaflow-2.12.39/metaflow/plugins/pypi/bootstrap.py +0 -140
  55. metaflow-2.12.39/metaflow/version.py +0 -1
  56. {metaflow-2.12.39 → metaflow-2.13.1}/LICENSE +0 -0
  57. {metaflow-2.12.39 → metaflow-2.13.1}/MANIFEST.in +0 -0
  58. {metaflow-2.12.39 → metaflow-2.13.1}/README.md +0 -0
  59. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/R.py +0 -0
  60. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/__init__.py +0 -0
  61. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/click/__init__.py +0 -0
  62. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/click/_bashcomplete.py +0 -0
  63. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/click/_compat.py +0 -0
  64. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/click/_termui_impl.py +0 -0
  65. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/click/_textwrap.py +0 -0
  66. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/click/_unicodefun.py +0 -0
  67. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/click/_winconsole.py +0 -0
  68. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/click/core.py +0 -0
  69. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/click/decorators.py +0 -0
  70. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/click/exceptions.py +0 -0
  71. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/click/formatting.py +0 -0
  72. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/click/globals.py +0 -0
  73. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/click/parser.py +0 -0
  74. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/click/termui.py +0 -0
  75. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/click/testing.py +0 -0
  76. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/click/types.py +0 -0
  77. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/click/utils.py +0 -0
  78. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/importlib_metadata/__init__.py +0 -0
  79. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/importlib_metadata/_adapters.py +0 -0
  80. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/importlib_metadata/_collections.py +0 -0
  81. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/importlib_metadata/_compat.py +0 -0
  82. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/importlib_metadata/_functools.py +0 -0
  83. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/importlib_metadata/_itertools.py +0 -0
  84. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/importlib_metadata/_meta.py +0 -0
  85. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/importlib_metadata/_text.py +0 -0
  86. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/importlib_metadata/py.typed +0 -0
  87. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/packaging/__init__.py +0 -0
  88. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/packaging/_elffile.py +0 -0
  89. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/packaging/_manylinux.py +0 -0
  90. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/packaging/_musllinux.py +0 -0
  91. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/packaging/_parser.py +0 -0
  92. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/packaging/_structures.py +0 -0
  93. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/packaging/_tokenizer.py +0 -0
  94. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/packaging/markers.py +0 -0
  95. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/packaging/py.typed +0 -0
  96. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/packaging/requirements.py +0 -0
  97. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/packaging/specifiers.py +0 -0
  98. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/packaging/tags.py +0 -0
  99. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/packaging/utils.py +0 -0
  100. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/packaging/version.py +0 -0
  101. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/typeguard/__init__.py +0 -0
  102. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/typeguard/_checkers.py +0 -0
  103. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/typeguard/_config.py +0 -0
  104. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/typeguard/_decorators.py +0 -0
  105. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/typeguard/_exceptions.py +0 -0
  106. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/typeguard/_functions.py +0 -0
  107. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/typeguard/_importhook.py +0 -0
  108. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/typeguard/_memo.py +0 -0
  109. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/typeguard/_pytest_plugin.py +0 -0
  110. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/typeguard/_suppression.py +0 -0
  111. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/typeguard/_transformer.py +0 -0
  112. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/typeguard/_union_transformer.py +0 -0
  113. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/typeguard/_utils.py +0 -0
  114. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/typeguard/py.typed +0 -0
  115. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/typing_extensions.py +0 -0
  116. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/v3_5/__init__.py +0 -0
  117. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/v3_5/importlib_metadata/__init__.py +0 -0
  118. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/v3_5/importlib_metadata/_compat.py +0 -0
  119. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/v3_5/zipp.py +0 -0
  120. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/v3_6/__init__.py +0 -0
  121. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/v3_6/importlib_metadata/__init__.py +0 -0
  122. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/v3_6/importlib_metadata/_adapters.py +0 -0
  123. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/v3_6/importlib_metadata/_collections.py +0 -0
  124. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/v3_6/importlib_metadata/_compat.py +0 -0
  125. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/v3_6/importlib_metadata/_functools.py +0 -0
  126. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/v3_6/importlib_metadata/_itertools.py +0 -0
  127. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/v3_6/importlib_metadata/_meta.py +0 -0
  128. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/v3_6/importlib_metadata/_text.py +0 -0
  129. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/v3_6/importlib_metadata/py.typed +0 -0
  130. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/v3_6/typing_extensions.py +0 -0
  131. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/v3_6/zipp.py +0 -0
  132. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/_vendor/zipp.py +0 -0
  133. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/cards.py +0 -0
  134. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/cli_components/__init__.py +0 -0
  135. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/cli_components/dump_cmd.py +0 -0
  136. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/cli_components/init_cmd.py +0 -0
  137. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/cli_components/step_cmd.py +0 -0
  138. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/cli_components/utils.py +0 -0
  139. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/client/__init__.py +0 -0
  140. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/client/core.py +0 -0
  141. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/client/filecache.py +0 -0
  142. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/clone_util.py +0 -0
  143. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/cmd/__init__.py +0 -0
  144. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/cmd/configure_cmd.py +0 -0
  145. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/cmd/develop/__init__.py +0 -0
  146. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/cmd/develop/stub_generator.py +0 -0
  147. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/cmd/develop/stubs.py +0 -0
  148. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/cmd/main_cli.py +0 -0
  149. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/cmd/tutorials_cmd.py +0 -0
  150. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/cmd/util.py +0 -0
  151. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/cmd_with_io.py +0 -0
  152. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/datastore/__init__.py +0 -0
  153. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/datastore/content_addressed_store.py +0 -0
  154. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/datastore/datastore_set.py +0 -0
  155. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/datastore/datastore_storage.py +0 -0
  156. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/datastore/exceptions.py +0 -0
  157. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/datastore/inputs.py +0 -0
  158. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/datastore/task_datastore.py +0 -0
  159. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/debug.py +0 -0
  160. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/decorators.py +0 -0
  161. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/event_logger.py +0 -0
  162. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/events.py +0 -0
  163. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/extension_support/__init__.py +0 -0
  164. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/extension_support/_empty_file.py +0 -0
  165. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/extension_support/cmd.py +0 -0
  166. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/extension_support/integrations.py +0 -0
  167. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/extension_support/plugins.py +0 -0
  168. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/info_file.py +0 -0
  169. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/integrations.py +0 -0
  170. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/metadata_provider/__init__.py +0 -0
  171. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/metadata_provider/metadata.py +0 -0
  172. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/metadata_provider/util.py +0 -0
  173. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/metaflow_config_funcs.py +0 -0
  174. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/metaflow_current.py +0 -0
  175. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/metaflow_environment.py +0 -0
  176. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/metaflow_profile.py +0 -0
  177. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/metaflow_version.py +0 -0
  178. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/mflog/__init__.py +0 -0
  179. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/mflog/mflog.py +0 -0
  180. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/mflog/save_logs.py +0 -0
  181. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/mflog/save_logs_periodically.py +0 -0
  182. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/mflog/tee.py +0 -0
  183. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/monitor.py +0 -0
  184. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/multicore_utils.py +0 -0
  185. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/package.py +0 -0
  186. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/__init__.py +0 -0
  187. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/airflow/__init__.py +0 -0
  188. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/airflow/airflow.py +0 -0
  189. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/airflow/airflow_cli.py +0 -0
  190. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/airflow/airflow_decorator.py +0 -0
  191. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/airflow/airflow_utils.py +0 -0
  192. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/airflow/dag.py +0 -0
  193. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/airflow/exception.py +0 -0
  194. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/airflow/plumbing/__init__.py +0 -0
  195. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/airflow/plumbing/set_parameters.py +0 -0
  196. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/airflow/sensors/__init__.py +0 -0
  197. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/airflow/sensors/base_sensor.py +0 -0
  198. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/airflow/sensors/external_task_sensor.py +0 -0
  199. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/airflow/sensors/s3_sensor.py +0 -0
  200. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/argo/__init__.py +0 -0
  201. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/argo/argo_events.py +0 -0
  202. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/argo/argo_workflows_deployer.py +0 -0
  203. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/argo/capture_error.py +0 -0
  204. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/argo/generate_input_paths.py +0 -0
  205. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/aws/__init__.py +0 -0
  206. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/aws/aws_client.py +0 -0
  207. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/aws/batch/__init__.py +0 -0
  208. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/aws/batch/batch.py +0 -0
  209. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/aws/batch/batch_cli.py +0 -0
  210. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/aws/secrets_manager/__init__.py +0 -0
  211. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/aws/step_functions/__init__.py +0 -0
  212. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/aws/step_functions/event_bridge_client.py +0 -0
  213. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/aws/step_functions/schedule_decorator.py +0 -0
  214. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/aws/step_functions/set_batch_environment.py +0 -0
  215. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/aws/step_functions/step_functions_client.py +0 -0
  216. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/aws/step_functions/step_functions_deployer.py +0 -0
  217. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/azure/__init__.py +0 -0
  218. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/azure/azure_credential.py +0 -0
  219. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/azure/azure_exceptions.py +0 -0
  220. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/azure/azure_secret_manager_secrets_provider.py +0 -0
  221. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/azure/azure_tail.py +0 -0
  222. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/azure/azure_utils.py +0 -0
  223. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/azure/blob_service_client_factory.py +0 -0
  224. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/azure/includefile_support.py +0 -0
  225. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/cards/__init__.py +0 -0
  226. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/cards/card_cli.py +0 -0
  227. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/cards/card_client.py +0 -0
  228. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/cards/card_datastore.py +0 -0
  229. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/cards/card_modules/__init__.py +0 -0
  230. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/cards/card_modules/base.html +0 -0
  231. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/cards/card_modules/basic.py +0 -0
  232. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/cards/card_modules/bundle.css +0 -0
  233. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/cards/card_modules/card.py +0 -0
  234. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/cards/card_modules/chevron/__init__.py +0 -0
  235. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/cards/card_modules/chevron/main.py +0 -0
  236. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/cards/card_modules/chevron/metadata.py +0 -0
  237. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/cards/card_modules/chevron/renderer.py +0 -0
  238. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/cards/card_modules/chevron/tokenizer.py +0 -0
  239. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/cards/card_modules/components.py +0 -0
  240. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/cards/card_modules/convert_to_native_type.py +0 -0
  241. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/cards/card_modules/main.js +0 -0
  242. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/cards/card_modules/renderer_tools.py +0 -0
  243. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/cards/card_modules/test_cards.py +0 -0
  244. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/cards/card_resolver.py +0 -0
  245. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/cards/card_server.py +0 -0
  246. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/cards/card_viewer/viewer.html +0 -0
  247. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/cards/component_serializer.py +0 -0
  248. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/cards/exception.py +0 -0
  249. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/catch_decorator.py +0 -0
  250. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/datastores/__init__.py +0 -0
  251. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/datastores/azure_storage.py +0 -0
  252. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/datastores/gs_storage.py +0 -0
  253. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/datastores/local_storage.py +0 -0
  254. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/datastores/s3_storage.py +0 -0
  255. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/datatools/__init__.py +0 -0
  256. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/datatools/local.py +0 -0
  257. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/datatools/s3/__init__.py +0 -0
  258. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/datatools/s3/s3.py +0 -0
  259. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/datatools/s3/s3op.py +0 -0
  260. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/datatools/s3/s3tail.py +0 -0
  261. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/datatools/s3/s3util.py +0 -0
  262. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/debug_logger.py +0 -0
  263. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/debug_monitor.py +0 -0
  264. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/env_escape/__init__.py +0 -0
  265. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/env_escape/client.py +0 -0
  266. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/env_escape/client_modules.py +0 -0
  267. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/env_escape/communication/__init__.py +0 -0
  268. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/env_escape/communication/bytestream.py +0 -0
  269. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/env_escape/communication/channel.py +0 -0
  270. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/env_escape/communication/socket_bytestream.py +0 -0
  271. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/env_escape/communication/utils.py +0 -0
  272. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/env_escape/configurations/emulate_test_lib/__init__.py +0 -0
  273. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/env_escape/configurations/emulate_test_lib/overrides.py +0 -0
  274. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/env_escape/configurations/emulate_test_lib/server_mappings.py +0 -0
  275. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/env_escape/configurations/test_lib_impl/__init__.py +0 -0
  276. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/env_escape/configurations/test_lib_impl/test_lib.py +0 -0
  277. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/env_escape/consts.py +0 -0
  278. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/env_escape/data_transferer.py +0 -0
  279. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/env_escape/exception_transferer.py +0 -0
  280. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/env_escape/override_decorators.py +0 -0
  281. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/env_escape/server.py +0 -0
  282. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/env_escape/stub.py +0 -0
  283. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/env_escape/utils.py +0 -0
  284. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/environment_decorator.py +0 -0
  285. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/events_decorator.py +0 -0
  286. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/frameworks/__init__.py +0 -0
  287. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/frameworks/pytorch.py +0 -0
  288. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/gcp/__init__.py +0 -0
  289. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/gcp/gcp_secret_manager_secrets_provider.py +0 -0
  290. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/gcp/gs_exceptions.py +0 -0
  291. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/gcp/gs_storage_client_factory.py +0 -0
  292. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/gcp/gs_tail.py +0 -0
  293. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/gcp/gs_utils.py +0 -0
  294. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/gcp/includefile_support.py +0 -0
  295. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/kubernetes/__init__.py +0 -0
  296. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/kubernetes/kubernetes_client.py +0 -0
  297. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/logs_cli.py +0 -0
  298. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/metadata_providers/__init__.py +0 -0
  299. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/metadata_providers/local.py +0 -0
  300. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/metadata_providers/service.py +0 -0
  301. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/package_cli.py +0 -0
  302. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/parallel_decorator.py +0 -0
  303. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/project_decorator.py +0 -0
  304. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/pypi/__init__.py +0 -0
  305. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/pypi/conda_decorator.py +0 -0
  306. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/pypi/pypi_decorator.py +0 -0
  307. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/pypi/pypi_environment.py +0 -0
  308. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/resources_decorator.py +0 -0
  309. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/retry_decorator.py +0 -0
  310. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/secrets/__init__.py +0 -0
  311. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/secrets/inline_secrets_provider.py +0 -0
  312. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/secrets/secrets_decorator.py +0 -0
  313. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/storage_executor.py +0 -0
  314. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/tag_cli.py +0 -0
  315. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/test_unbounded_foreach_decorator.py +0 -0
  316. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/plugins/timeout_decorator.py +0 -0
  317. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/procpoll.py +0 -0
  318. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/py.typed +0 -0
  319. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/pylint_wrapper.py +0 -0
  320. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/runner/__init__.py +0 -0
  321. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/runner/deployer.py +0 -0
  322. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/runner/nbdeploy.py +0 -0
  323. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/runner/nbrun.py +0 -0
  324. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/runner/subprocess_manager.py +0 -0
  325. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/runtime.py +0 -0
  326. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/sidecar/__init__.py +0 -0
  327. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/sidecar/sidecar.py +0 -0
  328. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/sidecar/sidecar_messages.py +0 -0
  329. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/sidecar/sidecar_subprocess.py +0 -0
  330. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/sidecar/sidecar_worker.py +0 -0
  331. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/system/__init__.py +0 -0
  332. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/system/system_logger.py +0 -0
  333. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/system/system_monitor.py +0 -0
  334. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/system/system_utils.py +0 -0
  335. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/tagging_util.py +0 -0
  336. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/task.py +0 -0
  337. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/tracing/__init__.py +0 -0
  338. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/tracing/propagator.py +0 -0
  339. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/tracing/span_exporter.py +0 -0
  340. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/tracing/tracing_modules.py +0 -0
  341. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/tuple_util.py +0 -0
  342. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/tutorials/00-helloworld/README.md +0 -0
  343. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/tutorials/00-helloworld/helloworld.py +0 -0
  344. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/tutorials/01-playlist/README.md +0 -0
  345. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/tutorials/01-playlist/movies.csv +0 -0
  346. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/tutorials/01-playlist/playlist.ipynb +0 -0
  347. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/tutorials/01-playlist/playlist.py +0 -0
  348. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/tutorials/02-statistics/README.md +0 -0
  349. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/tutorials/02-statistics/movies.csv +0 -0
  350. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/tutorials/02-statistics/stats.ipynb +0 -0
  351. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/tutorials/02-statistics/stats.py +0 -0
  352. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/tutorials/03-playlist-redux/README.md +0 -0
  353. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/tutorials/03-playlist-redux/playlist.py +0 -0
  354. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/tutorials/04-playlist-plus/README.md +0 -0
  355. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/tutorials/04-playlist-plus/playlist.py +0 -0
  356. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/tutorials/05-hello-cloud/README.md +0 -0
  357. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/tutorials/05-hello-cloud/hello-cloud.ipynb +0 -0
  358. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/tutorials/05-hello-cloud/hello-cloud.py +0 -0
  359. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/tutorials/06-statistics-redux/README.md +0 -0
  360. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/tutorials/06-statistics-redux/stats.ipynb +0 -0
  361. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/tutorials/07-worldview/README.md +0 -0
  362. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/tutorials/07-worldview/worldview.ipynb +0 -0
  363. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/tutorials/08-autopilot/README.md +0 -0
  364. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/tutorials/08-autopilot/autopilot.ipynb +0 -0
  365. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/unbounded_foreach.py +0 -0
  366. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/user_configs/__init__.py +0 -0
  367. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/user_configs/config_decorators.py +0 -0
  368. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow/vendor.py +0 -0
  369. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow.egg-info/SOURCES.txt +0 -0
  370. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow.egg-info/dependency_links.txt +0 -0
  371. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow.egg-info/entry_points.txt +0 -0
  372. {metaflow-2.12.39 → metaflow-2.13.1}/metaflow.egg-info/top_level.txt +0 -0
  373. {metaflow-2.12.39 → metaflow-2.13.1}/setup.cfg +0 -0
  374. {metaflow-2.12.39 → metaflow-2.13.1}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: metaflow
3
- Version: 2.12.39
3
+ Version: 2.13.1
4
4
  Summary: Metaflow: More Data Science, Less Engineering
5
5
  Author: Metaflow Developers
6
6
  Author-email: help@metaflow.org
@@ -26,7 +26,7 @@ License-File: LICENSE
26
26
  Requires-Dist: requests
27
27
  Requires-Dist: boto3
28
28
  Provides-Extra: stubs
29
- Requires-Dist: metaflow-stubs==2.12.39; extra == "stubs"
29
+ Requires-Dist: metaflow-stubs==2.13.1; extra == "stubs"
30
30
 
31
31
  ![Metaflow_Logo_Horizontal_FullColor_Ribbon_Dark_RGB](https://user-images.githubusercontent.com/763451/89453116-96a57e00-d713-11ea-9fa6-82b29d4d6eff.png)
32
32
 
@@ -103,7 +103,7 @@ from .flowspec import FlowSpec
103
103
 
104
104
  from .parameters import Parameter, JSONTypeClass, JSONType
105
105
 
106
- from .user_configs.config_parameters import Config, config_expr
106
+ from .user_configs.config_parameters import Config, ConfigValue, config_expr
107
107
  from .user_configs.config_decorators import CustomFlowDecorator, CustomStepDecorator
108
108
 
109
109
  # data layer
@@ -10,7 +10,8 @@ from metaflow._vendor import click
10
10
  from . import decorators, lint, metaflow_version, parameters, plugins
11
11
  from .cli_args import cli_args
12
12
  from .cli_components.utils import LazyGroup, LazyPluginCommandCollection
13
- from .datastore import FlowDataStore
13
+ from .datastore import FlowDataStore, TaskDataStoreSet
14
+ from .debug import debug
14
15
  from .exception import CommandException, MetaflowException
15
16
  from .flowspec import _FlowState
16
17
  from .graph import FlowGraph
@@ -35,7 +36,7 @@ from .plugins import (
35
36
  )
36
37
  from .pylint_wrapper import PyLint
37
38
  from .R import metaflow_r_version, use_r
38
- from .util import resolve_identity
39
+ from .util import get_latest_run_id, resolve_identity
39
40
  from .user_configs.config_options import LocalFileInput, config_options
40
41
  from .user_configs.config_parameters import ConfigValue
41
42
 
@@ -169,7 +170,8 @@ def check(obj, warnings=False):
169
170
  @click.pass_obj
170
171
  def show(obj):
171
172
  echo_always("\n%s" % obj.graph.doc)
172
- for _, node in sorted((n.func_lineno, n) for n in obj.graph):
173
+ for node_name in obj.graph.sorted_nodes:
174
+ node = obj.graph[node_name]
173
175
  echo_always("\nStep *%s*" % node.name, err=False)
174
176
  echo_always(node.doc if node.doc else "?", indent=True, err=False)
175
177
  if node.type != "end":
@@ -328,8 +330,8 @@ def start(
328
330
  event_logger=None,
329
331
  monitor=None,
330
332
  local_config_file=None,
331
- config_file_options=None,
332
- config_value_options=None,
333
+ config_file=None,
334
+ config_value=None,
333
335
  **deco_options
334
336
  ):
335
337
  if quiet:
@@ -346,6 +348,33 @@ def start(
346
348
  echo(" executing *%s*" % ctx.obj.flow.name, fg="magenta", nl=False)
347
349
  echo(" for *%s*" % resolve_identity(), fg="magenta")
348
350
 
351
+ # Setup the context
352
+ cli_args._set_top_kwargs(ctx.params)
353
+ ctx.obj.echo = echo
354
+ ctx.obj.echo_always = echo_always
355
+ ctx.obj.is_quiet = quiet
356
+ ctx.obj.logger = logger
357
+ ctx.obj.pylint = pylint
358
+ ctx.obj.check = functools.partial(_check, echo)
359
+ ctx.obj.top_cli = cli
360
+ ctx.obj.package_suffixes = package_suffixes.split(",")
361
+
362
+ ctx.obj.datastore_impl = [d for d in DATASTORES if d.TYPE == datastore][0]
363
+
364
+ if datastore_root is None:
365
+ datastore_root = ctx.obj.datastore_impl.get_datastore_root_from_config(
366
+ ctx.obj.echo
367
+ )
368
+ if datastore_root is None:
369
+ raise CommandException(
370
+ "Could not find the location of the datastore -- did you correctly set the "
371
+ "METAFLOW_DATASTORE_SYSROOT_%s environment variable?" % datastore.upper()
372
+ )
373
+
374
+ ctx.obj.datastore_impl.datastore_root = datastore_root
375
+
376
+ FlowDataStore.default_storage_impl = ctx.obj.datastore_impl
377
+
349
378
  # At this point, we are able to resolve the user-configuration options so we can
350
379
  # process all those decorators that the user added that will modify the flow based
351
380
  # on those configurations. It is important to do this as early as possible since it
@@ -354,19 +383,76 @@ def start(
354
383
  # When we process the options, the first one processed will return None and the
355
384
  # second one processed will return the actual options. The order of processing
356
385
  # depends on what (and in what order) the user specifies on the command line.
357
- config_options = config_file_options or config_value_options
358
- ctx.obj.flow = ctx.obj.flow._process_config_decorators(config_options)
386
+ config_options = config_file or config_value
387
+
388
+ if (
389
+ hasattr(ctx, "saved_args")
390
+ and ctx.saved_args
391
+ and ctx.saved_args[0] == "resume"
392
+ and getattr(ctx.obj, "has_config_options", False)
393
+ ):
394
+ # In the case of resume, we actually need to load the configurations
395
+ # from the resumed run to process them. This can be slightly onerous so check
396
+ # if we need to in the first place
397
+ if getattr(ctx.obj, "has_cl_config_options", False):
398
+ raise click.UsageError(
399
+ "Cannot specify --config-file or --config-value with 'resume'"
400
+ )
401
+ # We now load the config artifacts from the original run id
402
+ run_id = None
403
+ try:
404
+ idx = ctx.saved_args.index("--origin-run-id")
405
+ except ValueError:
406
+ idx = -1
407
+ if idx >= 0:
408
+ run_id = ctx.saved_args[idx + 1]
409
+ else:
410
+ run_id = get_latest_run_id(ctx.obj.echo, ctx.obj.flow.name)
411
+ if run_id is None:
412
+ raise CommandException(
413
+ "A previous run id was not found. Specify --origin-run-id."
414
+ )
415
+ # We get the name of the parameters we need to load from the datastore -- these
416
+ # are accessed using the *variable* name and not necessarily the *parameter* name
417
+ config_var_names = []
418
+ config_param_names = []
419
+ for name, param in ctx.obj.flow._get_parameters():
420
+ if not param.IS_CONFIG_PARAMETER:
421
+ continue
422
+ config_var_names.append(name)
423
+ config_param_names.append(param.name)
424
+
425
+ # We just need a task datastore that will be thrown away -- we do this so
426
+ # we don't have to create the logger, monitor, etc.
427
+ debug.userconf_exec("Loading config parameters from run %s" % run_id)
428
+ for d in TaskDataStoreSet(
429
+ FlowDataStore(ctx.obj.flow.name),
430
+ run_id,
431
+ steps=["_parameters"],
432
+ prefetch_data_artifacts=config_var_names,
433
+ ):
434
+ param_ds = d
435
+
436
+ # We can now set the the CONFIGS value in the flow properly. This will overwrite
437
+ # anything that may have been passed in by default and we will use exactly what
438
+ # the original flow had. Note that these are accessed through the parameter name
439
+ ctx.obj.flow._flow_state[_FlowState.CONFIGS].clear()
440
+ d = ctx.obj.flow._flow_state[_FlowState.CONFIGS]
441
+ for param_name, var_name in zip(config_param_names, config_var_names):
442
+ val = param_ds[var_name]
443
+ debug.userconf_exec("Loaded config %s as: %s" % (param_name, val))
444
+ d[param_name] = val
445
+
446
+ elif getattr(ctx.obj, "delayed_config_exception", None):
447
+ # If we are not doing a resume, any exception we had parsing configs needs to
448
+ # be raised. For resume, since we ignore those options, we ignore the error.
449
+ raise ctx.obj.delayed_config_exception
450
+
451
+ new_cls = ctx.obj.flow._process_config_decorators(config_options)
452
+ if new_cls:
453
+ ctx.obj.flow = new_cls(use_cli=False)
359
454
 
360
- cli_args._set_top_kwargs(ctx.params)
361
- ctx.obj.echo = echo
362
- ctx.obj.echo_always = echo_always
363
- ctx.obj.is_quiet = quiet
364
455
  ctx.obj.graph = ctx.obj.flow._graph
365
- ctx.obj.logger = logger
366
- ctx.obj.pylint = pylint
367
- ctx.obj.check = functools.partial(_check, echo)
368
- ctx.obj.top_cli = cli
369
- ctx.obj.package_suffixes = package_suffixes.split(",")
370
456
 
371
457
  ctx.obj.environment = [
372
458
  e for e in ENVIRONMENTS + [MetaflowEnvironment] if e.TYPE == environment
@@ -389,21 +475,6 @@ def start(
389
475
  ctx.obj.environment, ctx.obj.flow, ctx.obj.event_logger, ctx.obj.monitor
390
476
  )
391
477
 
392
- ctx.obj.datastore_impl = [d for d in DATASTORES if d.TYPE == datastore][0]
393
-
394
- if datastore_root is None:
395
- datastore_root = ctx.obj.datastore_impl.get_datastore_root_from_config(
396
- ctx.obj.echo
397
- )
398
- if datastore_root is None:
399
- raise CommandException(
400
- "Could not find the location of the datastore -- did you correctly set the "
401
- "METAFLOW_DATASTORE_SYSROOT_%s environment variable?" % datastore.upper()
402
- )
403
-
404
- ctx.obj.datastore_impl.datastore_root = datastore_root
405
-
406
- FlowDataStore.default_storage_impl = ctx.obj.datastore_impl
407
478
  ctx.obj.flow_datastore = FlowDataStore(
408
479
  ctx.obj.flow.name,
409
480
  ctx.obj.environment,
@@ -463,7 +534,8 @@ def start(
463
534
  decorators._attach_decorators(ctx.obj.flow, all_decospecs)
464
535
  decorators._init(ctx.obj.flow)
465
536
  # Regenerate graph if we attached more decorators
466
- ctx.obj.graph = FlowGraph(ctx.obj.flow.__class__)
537
+ ctx.obj.flow.__class__._init_attrs()
538
+ ctx.obj.graph = ctx.obj.flow._graph
467
539
 
468
540
  decorators._init_step_decorators(
469
541
  ctx.obj.flow,
@@ -519,10 +591,13 @@ def _check(echo, graph, flow, environment, pylint=True, warnings=False, **kwargs
519
591
 
520
592
  def print_metaflow_exception(ex):
521
593
  echo_always(ex.headline, indent=True, nl=False, bold=True)
522
- if ex.line_no is None:
523
- echo_always(":")
524
- else:
525
- echo_always(" on line %d:" % ex.line_no, bold=True)
594
+ location = ""
595
+ if ex.source_file is not None:
596
+ location += " in file %s" % ex.source_file
597
+ if ex.line_no is not None:
598
+ location += " on line %d" % ex.line_no
599
+ location += ":"
600
+ echo_always(location, bold=True)
526
601
  echo_always(ex.message, indent=True, bold=False, padding_bottom=True)
527
602
 
528
603
 
@@ -72,10 +72,10 @@ class CLIArgs(object):
72
72
  # keyword in Python, so we call it 'decospecs' in click args
73
73
  if k == "decospecs":
74
74
  k = "with"
75
- if k in ("config_file_options", "config_value_options"):
75
+ if k in ("config_file", "config_value"):
76
76
  # Special handling here since we gather them all in one option but actually
77
77
  # need to send them one at a time using --config-value <name> kv.<name>.
78
- # Note it can be either config_file_options or config_value_options depending
78
+ # Note it can be either config_file or config_value depending
79
79
  # on click processing order.
80
80
  for config_name in v.keys():
81
81
  yield "--config-value"
@@ -41,7 +41,9 @@ def before_run(obj, tags, decospecs):
41
41
  if all_decospecs:
42
42
  decorators._attach_decorators(obj.flow, all_decospecs)
43
43
  decorators._init(obj.flow)
44
- obj.graph = FlowGraph(obj.flow.__class__)
44
+ # Regenerate graph if we attached more decorators
45
+ obj.flow.__class__._init_attrs()
46
+ obj.graph = obj.flow._graph
45
47
 
46
48
  obj.check(obj.graph, obj.flow, obj.environment, pylint=obj.pylint)
47
49
  # obj.environment.init_environment(obj.logger)
@@ -13,7 +13,7 @@ class FlowDataStore(object):
13
13
  def __init__(
14
14
  self,
15
15
  flow_name,
16
- environment,
16
+ environment=None,
17
17
  metadata=None,
18
18
  event_logger=None,
19
19
  monitor=None,
@@ -31,7 +31,7 @@ class FlowDataStore(object):
31
31
  ----------
32
32
  flow_name : str
33
33
  The name of the flow
34
- environment : MetaflowEnvironment
34
+ environment : MetaflowEnvironment, optional
35
35
  Environment this datastore is operating in
36
36
  metadata : MetadataProvider, optional
37
37
  The metadata provider to use and update if needed, by default None
@@ -43,13 +43,19 @@ class MetaflowExceptionWrapper(Exception):
43
43
  class MetaflowException(Exception):
44
44
  headline = "Flow failed"
45
45
 
46
- def __init__(self, msg="", lineno=None):
46
+ def __init__(self, msg="", lineno=None, source_file=None):
47
47
  self.message = msg
48
48
  self.line_no = lineno
49
+ self.source_file = source_file
49
50
  super(MetaflowException, self).__init__()
50
51
 
51
52
  def __str__(self):
52
- prefix = "line %d: " % self.line_no if self.line_no else ""
53
+ prefix = ""
54
+ if self.source_file:
55
+ prefix = "%s:" % self.source_file
56
+ if self.line_no:
57
+ prefix = "line %d:" % self.line_no
58
+ prefix = "%s: " % prefix if prefix else ""
53
59
  return "%s%s" % (prefix, self.message)
54
60
 
55
61
 
@@ -24,6 +24,7 @@ from .extension_support import extension_info
24
24
  from .graph import FlowGraph
25
25
  from .unbounded_foreach import UnboundedForeachInput
26
26
  from .user_configs.config_decorators import (
27
+ ConfigValue,
27
28
  CustomFlowDecorator,
28
29
  CustomStepDecorator,
29
30
  MutableFlow,
@@ -81,8 +82,10 @@ class _FlowState(Enum):
81
82
 
82
83
 
83
84
  class FlowSpecMeta(type):
84
- def __new__(cls, name, bases, dct):
85
- f = super().__new__(cls, name, bases, dct)
85
+ def __init__(cls, name, bases, attrs):
86
+ super().__init__(name, bases, attrs)
87
+ if name == "FlowSpec":
88
+ return
86
89
  # We store some state in the flow class itself. This is primarily used to
87
90
  # attach global state to a flow. It is *not* an actual global because of
88
91
  # Runner/NBRunner. This is also created here in the meta class to avoid it being
@@ -90,12 +93,18 @@ class FlowSpecMeta(type):
90
93
 
91
94
  # We should move _flow_decorators into this structure as well but keeping it
92
95
  # out to limit the changes for now.
93
- f._flow_decorators = {}
96
+ cls._flow_decorators = {}
94
97
 
95
98
  # Keys are _FlowState enum values
96
- f._flow_state = {}
99
+ cls._flow_state = {}
100
+
101
+ cls._init_attrs()
97
102
 
98
- return f
103
+ def _init_attrs(cls):
104
+ # Graph and steps are specific to the class -- store here so we can access
105
+ # in class method _process_config_decorators
106
+ cls._graph = FlowGraph(cls)
107
+ cls._steps = [getattr(cls, node.name) for node in cls._graph]
99
108
 
100
109
 
101
110
  class FlowSpec(metaclass=FlowSpecMeta):
@@ -145,9 +154,6 @@ class FlowSpec(metaclass=FlowSpecMeta):
145
154
  self._transition = None
146
155
  self._cached_input = {}
147
156
 
148
- self._graph = FlowGraph(self.__class__)
149
- self._steps = [getattr(self, node.name) for node in self._graph]
150
-
151
157
  if use_cli:
152
158
  with parameters.flow_context(self.__class__) as _:
153
159
  from . import cli
@@ -171,9 +177,10 @@ class FlowSpec(metaclass=FlowSpecMeta):
171
177
  fname = fname[:-1]
172
178
  return os.path.basename(fname)
173
179
 
174
- def _check_parameters(self, config_parameters=False):
180
+ @classmethod
181
+ def _check_parameters(cls, config_parameters=False):
175
182
  seen = set()
176
- for _, param in self._get_parameters():
183
+ for _, param in cls._get_parameters():
177
184
  if param.IS_CONFIG_PARAMETER != config_parameters:
178
185
  continue
179
186
  norm = param.name.lower()
@@ -185,17 +192,17 @@ class FlowSpec(metaclass=FlowSpecMeta):
185
192
  )
186
193
  seen.add(norm)
187
194
 
188
- def _process_config_decorators(self, config_options):
189
- current_cls = self.__class__
195
+ @classmethod
196
+ def _process_config_decorators(cls, config_options, ignore_errors=False):
190
197
 
191
198
  # Fast path for no user configurations
192
- if not self._flow_state.get(_FlowState.CONFIG_DECORATORS):
199
+ if not cls._flow_state.get(_FlowState.CONFIG_DECORATORS):
193
200
  # Process parameters to allow them to also use config values easily
194
- for var, param in self._get_parameters():
201
+ for var, param in cls._get_parameters():
195
202
  if param.IS_CONFIG_PARAMETER:
196
203
  continue
197
- param.init()
198
- return self
204
+ param.init(ignore_errors)
205
+ return None
199
206
 
200
207
  debug.userconf_exec("Processing mutating step/flow decorators")
201
208
  # We need to convert all the user configurations from DelayedEvaluationParameters
@@ -204,8 +211,8 @@ class FlowSpec(metaclass=FlowSpecMeta):
204
211
  # We then reset them to be proper configs so they can be re-evaluated in
205
212
  # _set_constants
206
213
  to_reset_configs = []
207
- self._check_parameters(config_parameters=True)
208
- for var, param in self._get_parameters():
214
+ cls._check_parameters(config_parameters=True)
215
+ for var, param in cls._get_parameters():
209
216
  if not param.IS_CONFIG_PARAMETER:
210
217
  continue
211
218
  # Note that a config with no default and not required will be None
@@ -217,38 +224,36 @@ class FlowSpec(metaclass=FlowSpecMeta):
217
224
  param._store_value(val)
218
225
  to_reset_configs.append((var, param))
219
226
  debug.userconf_exec("Setting config %s to %s" % (var, str(val)))
220
- setattr(current_cls, var, val)
227
+ setattr(cls, var, val)
221
228
 
222
229
  # Run all the decorators. Step decorators are directly in the step and
223
230
  # we will run those first and *then* we run all the flow level decorators
224
- for step in self._steps:
231
+ for step in cls._steps:
225
232
  for deco in step.config_decorators:
226
233
  if isinstance(deco, CustomStepDecorator):
227
234
  debug.userconf_exec(
228
235
  "Evaluating step level decorator %s for %s"
229
236
  % (deco.__class__.__name__, step.name)
230
237
  )
231
- deco.evaluate(MutableStep(current_cls, step))
238
+ deco.evaluate(MutableStep(cls, step))
232
239
  else:
233
240
  raise MetaflowInternalError(
234
241
  "A non CustomFlowDecorator found in step custom decorators"
235
242
  )
236
243
  if step.config_decorators:
237
244
  # We remove all mention of the custom step decorator
238
- setattr(current_cls, step.name, step)
245
+ setattr(cls, step.name, step)
239
246
 
240
- mutable_flow = MutableFlow(current_cls)
241
- for deco in self._flow_state[_FlowState.CONFIG_DECORATORS]:
247
+ mutable_flow = MutableFlow(cls)
248
+ for deco in cls._flow_state[_FlowState.CONFIG_DECORATORS]:
242
249
  if isinstance(deco, CustomFlowDecorator):
243
250
  # Sanity check to make sure we are applying the decorator to the right
244
251
  # class
245
- if not deco._flow_cls == current_cls and not issubclass(
246
- current_cls, deco._flow_cls
247
- ):
252
+ if not deco._flow_cls == cls and not issubclass(cls, deco._flow_cls):
248
253
  raise MetaflowInternalError(
249
254
  "CustomFlowDecorator registered on the wrong flow -- "
250
255
  "expected %s but got %s"
251
- % (deco._flow_cls.__name__, current_cls.__name__)
256
+ % (deco._flow_cls.__name__, cls.__name__)
252
257
  )
253
258
  debug.userconf_exec(
254
259
  "Evaluating flow level decorator %s" % deco.__class__.__name__
@@ -256,15 +261,15 @@ class FlowSpec(metaclass=FlowSpecMeta):
256
261
  deco.evaluate(mutable_flow)
257
262
  # We reset cached_parameters on the very off chance that the user added
258
263
  # more configurations based on the configuration
259
- if _FlowState.CACHED_PARAMETERS in current_cls._flow_state:
260
- del current_cls._flow_state[_FlowState.CACHED_PARAMETERS]
264
+ if _FlowState.CACHED_PARAMETERS in cls._flow_state:
265
+ del cls._flow_state[_FlowState.CACHED_PARAMETERS]
261
266
  else:
262
267
  raise MetaflowInternalError(
263
268
  "A non CustomFlowDecorator found in flow custom decorators"
264
269
  )
265
270
 
266
271
  # Process parameters to allow them to also use config values easily
267
- for var, param in self._get_parameters():
272
+ for var, param in cls._get_parameters():
268
273
  if param.IS_CONFIG_PARAMETER:
269
274
  continue
270
275
  param.init()
@@ -272,15 +277,18 @@ class FlowSpec(metaclass=FlowSpecMeta):
272
277
  # TODO: This means that users can't override configs directly. Not sure if this
273
278
  # is a pattern we want to support
274
279
  for var, param in to_reset_configs:
275
- setattr(current_cls, var, param)
280
+ setattr(cls, var, param)
276
281
 
277
282
  # Reset cached parameters again since we added back the config parameters
278
- if _FlowState.CACHED_PARAMETERS in current_cls._flow_state:
279
- del current_cls._flow_state[_FlowState.CACHED_PARAMETERS]
283
+ if _FlowState.CACHED_PARAMETERS in cls._flow_state:
284
+ del cls._flow_state[_FlowState.CACHED_PARAMETERS]
280
285
 
281
286
  # Set the current flow class we are in (the one we just created)
282
- parameters.replace_flow_context(current_cls)
283
- return current_cls(use_cli=False)
287
+ parameters.replace_flow_context(cls)
288
+
289
+ # Re-calculate class level attributes after modifying the class
290
+ cls._init_attrs()
291
+ return cls
284
292
 
285
293
  def _set_constants(self, graph, kwargs, config_options):
286
294
  from metaflow.decorators import (
@@ -309,6 +317,10 @@ class FlowSpec(metaclass=FlowSpecMeta):
309
317
  if isinstance(val, DelayedEvaluationParameter):
310
318
  val = val()
311
319
  val = val.split(param.separator) if val and param.separator else val
320
+ if isinstance(val, ConfigValue):
321
+ # We store config values as dict so they are accessible with older
322
+ # metaflow clients. It also makes it easier to access.
323
+ val = val.to_dict()
312
324
  setattr(self, var, val)
313
325
  parameters_info.append({"name": var, "type": param.__class__.__name__})
314
326
 
@@ -45,9 +45,12 @@ def deindent_docstring(doc):
45
45
 
46
46
 
47
47
  class DAGNode(object):
48
- def __init__(self, func_ast, decos, doc):
48
+ def __init__(self, func_ast, decos, doc, source_file, lineno):
49
49
  self.name = func_ast.name
50
- self.func_lineno = func_ast.lineno
50
+ self.source_file = source_file
51
+ # lineno is the start line of decorators in source_file
52
+ # func_ast.lineno is lines from decorators start to def of function
53
+ self.func_lineno = lineno + func_ast.lineno - 1
51
54
  self.decorators = decos
52
55
  self.doc = deindent_docstring(doc)
53
56
  self.parallel_step = any(getattr(deco, "IS_PARALLEL", False) for deco in decos)
@@ -62,7 +65,7 @@ class DAGNode(object):
62
65
  self.foreach_param = None
63
66
  self.num_parallel = 0
64
67
  self.parallel_foreach = False
65
- self._parse(func_ast)
68
+ self._parse(func_ast, lineno)
66
69
 
67
70
  # these attributes are populated by _traverse_graph
68
71
  self.in_funcs = set()
@@ -74,7 +77,7 @@ class DAGNode(object):
74
77
  def _expr_str(self, expr):
75
78
  return "%s.%s" % (expr.value.id, expr.attr)
76
79
 
77
- def _parse(self, func_ast):
80
+ def _parse(self, func_ast, lineno):
78
81
  self.num_args = len(func_ast.args.args)
79
82
  tail = func_ast.body[-1]
80
83
 
@@ -94,7 +97,7 @@ class DAGNode(object):
94
97
 
95
98
  self.has_tail_next = True
96
99
  self.invalid_tail_next = True
97
- self.tail_next_lineno = tail.lineno
100
+ self.tail_next_lineno = lineno + tail.lineno - 1
98
101
  self.out_funcs = [e.attr for e in tail.value.args]
99
102
 
100
103
  keywords = dict(
@@ -131,7 +134,7 @@ class DAGNode(object):
131
134
  return
132
135
 
133
136
  def __str__(self):
134
- return """*[{0.name} {0.type} (line {0.func_lineno})]*
137
+ return """*[{0.name} {0.type} ({0.source_file} line {0.func_lineno})]*
135
138
  in_funcs={in_funcs}
136
139
  out_funcs={out_funcs}
137
140
  split_parents={parents}
@@ -156,18 +159,6 @@ class DAGNode(object):
156
159
  )
157
160
 
158
161
 
159
- class StepVisitor(ast.NodeVisitor):
160
- def __init__(self, nodes, flow):
161
- self.nodes = nodes
162
- self.flow = flow
163
- super(StepVisitor, self).__init__()
164
-
165
- def visit_FunctionDef(self, node):
166
- func = getattr(self.flow, node.name)
167
- if hasattr(func, "is_step"):
168
- self.nodes[node.name] = DAGNode(node, func.decorators, func.__doc__)
169
-
170
-
171
162
  class FlowGraph(object):
172
163
  def __init__(self, flow):
173
164
  self.name = flow.__name__
@@ -179,13 +170,20 @@ class FlowGraph(object):
179
170
  self._postprocess()
180
171
 
181
172
  def _create_nodes(self, flow):
182
- module = __import__(flow.__module__)
183
- tree = ast.parse(inspect.getsource(module)).body
184
- root = [n for n in tree if isinstance(n, ast.ClassDef) and n.name == self.name][
185
- 0
186
- ]
187
173
  nodes = {}
188
- StepVisitor(nodes, flow).visit(root)
174
+ for element in dir(flow):
175
+ func = getattr(flow, element)
176
+ if callable(func) and hasattr(func, "is_step"):
177
+ source_file = inspect.getsourcefile(func)
178
+ source_lines, lineno = inspect.getsourcelines(func)
179
+ # This also works for code (strips out leading whitspace based on
180
+ # first line)
181
+ source_code = deindent_docstring("".join(source_lines))
182
+ function_ast = ast.parse(source_code).body[0]
183
+ node = DAGNode(
184
+ function_ast, func.decorators, func.__doc__, source_file, lineno
185
+ )
186
+ nodes[element] = node
189
187
  return nodes
190
188
 
191
189
  def _postprocess(self):
@@ -201,6 +199,10 @@ class FlowGraph(object):
201
199
 
202
200
  def _traverse_graph(self):
203
201
  def traverse(node, seen, split_parents):
202
+ try:
203
+ self.sorted_nodes.remove(node.name)
204
+ except ValueError:
205
+ pass
204
206
  self.sorted_nodes.append(node.name)
205
207
  if node.type in ("split", "foreach"):
206
208
  node.split_parents = split_parents
@@ -240,9 +242,7 @@ class FlowGraph(object):
240
242
  return iter(self.nodes.values())
241
243
 
242
244
  def __str__(self):
243
- return "\n".join(
244
- str(n) for _, n in sorted((n.func_lineno, n) for n in self.nodes.values())
245
- )
245
+ return "\n".join(str(self[n]) for n in self.sorted_nodes)
246
246
 
247
247
  def output_dot(self):
248
248
  def edge_specs():
@@ -286,6 +286,7 @@ class FlowGraph(object):
286
286
  "name": name,
287
287
  "type": node_to_type(node),
288
288
  "line": node.func_lineno,
289
+ "source_file": node.source_file,
289
290
  "doc": node.doc,
290
291
  "decorators": [
291
292
  {
@@ -290,8 +290,8 @@ class IncludeFile(Parameter):
290
290
  **kwargs,
291
291
  )
292
292
 
293
- def init(self):
294
- super(IncludeFile, self).init()
293
+ def init(self, ignore_errors=False):
294
+ super(IncludeFile, self).init(ignore_errors)
295
295
 
296
296
  # This will use the values set explicitly in the args if present, else will
297
297
  # use and remove from kwargs else will use True/utf-8