From ec7e5edb7e386902b4c889cd89f28fffb190cd11 Mon Sep 17 00:00:00 2001 From: Elliot Gunton Date: Tue, 5 Dec 2023 15:39:33 +0000 Subject: [PATCH] Restructure examples for website (#884) **Pull Request Checklist** - [x] Fixes #883 - [x] Tests ~added~ updated - [x] Documentation/examples added - [x] [Good commit messages](https://cbea.ms/git-commit/) and/or PR title **Description of PR** Currently, all our `.py` examples are dumped into the `examples/workflows` folder, or the `examples/workflows/upstream` folder, making it very difficult to surface features and exemplify usage. This PR enables any kind of recursive directory structure in `/examples/workflows`, which will have the yaml generated by `test_examples.py`. The `generate.py` script has also been updated to copy over the arbitrary structure. The `mkdocs.yml` file is still manipulated by hand, so you should add the examples in the order you want there. Also NB, you need to add an `__init__.py` file for each folder in `examples/workflows` so it can be detected as a module. At the moment, I've added these folders in `examples/workflows`: - artifacts - dags - experimental - loops - scripts - steps - upstream - use-cases And labelled the rest of the examples as ~`Unsorted`~ `Miscellaneous` in the readthedocs site. * Also renamed branch references as argo upstream moved to a `main` branch, which broke the API fetch. --------- Signed-off-by: Elliot Gunton --- CONTRIBUTING.md | 4 +- Makefile | 2 +- SECURITY.md | 2 +- docs/examples/about-upstream.md | 6 + docs/examples/about-use-cases.md | 4 + docs/examples/workflows-examples.md | 178 +++++++++--------- .../workflows/{ => artifacts}/artifact.md | 0 .../{ => artifacts}/artifact_with_fanout.md | 0 docs/examples/workflows/callable_coinflip.md | 104 ---------- docs/examples/workflows/complex_expr.md | 2 +- .../{ => dags}/any_success_all_fail.md | 0 .../workflows/{ => dags}/callable_dag.md | 0 .../{ => dags}/callable_dag_with_param_get.md | 2 +- .../workflows/{ => dags}/complex_deps.md | 0 .../workflows/{ => dags}/conditional.md | 0 .../dag_conditional_on_task_status.md | 0 .../{ => dags}/dag_conditional_parameters.md | 0 .../dag_diamond_with_callable_container.md | 0 .../dag_diamond_with_callable_decorators.md | 0 .../dag_diamond_with_callable_script.md | 0 .../{ => dags}/dag_with_param_passing.md | 0 .../dag_with_script_output_param_passing.md | 0 .../dag_with_script_param_passing.md | 0 docs/examples/workflows/{ => dags}/on_exit.md | 0 ...ript_annotations_artifact_custom_volume.md | 8 +- .../script_annotations_artifact_loaders.md | 4 +- ...t_annotations_artifact_outputs_defaults.md | 4 +- .../script_annotations_artifact_passing.md | 4 +- .../script_annotations_inputs.md | 4 +- .../script_annotations_outputs.md | 2 +- .../workflows/{ => loops}/dynamic_fanout.md | 0 .../{ => loops}/dynamic_fanout_container.md | 0 .../dynamic_fanout_extra_kwargs.md | 0 .../{ => loops}/dynamic_fanout_fanin.md | 0 .../dynamic_fanout_json_payload.md | 0 .../{ => loops}/script_loops_maps.md | 0 .../workflows/{ => loops}/with_sequence.md | 0 .../{ => scripts}/callable_script.md | 10 +- .../workflows/{ => scripts}/coinflip.md | 0 .../{ => scripts}/default_param_overwrite.md | 0 .../{ => scripts}/script_artifact_passing.md | 0 .../{ => scripts}/script_auto_infer.md | 0 .../{ => scripts}/script_variations.md | 0 .../script_with_default_params.md | 0 .../script_with_image_pull_policy.md | 0 .../{ => scripts}/script_with_resources.md | 0 .../workflows/{ => steps}/callable_steps.md | 0 .../workflows/{ => steps}/steps_types.md | 0 .../steps_with_callable_container.md | 0 .../workflows/upstream/archive_location.md | 2 +- .../workflows/upstream/arguments_artifacts.md | 2 +- .../upstream/arguments_parameters.md | 2 +- .../arguments_parameters_from_configmap.md | 2 +- .../upstream/artifact_disable_archive.md | 2 +- .../upstream/artifact_gc_workflow.md | 2 +- .../workflows/upstream/artifact_passing.md | 2 +- .../upstream/artifact_passing_subpath.md | 2 +- .../upstream/artifact_path_placeholders.md | 2 +- .../upstream/artifact_repository_ref.md | 2 +- .../upstream/artifactory_artifact.md | 2 +- .../workflows/upstream/ci_output_artifact.md | 2 +- .../workflows/upstream/ci_workflowtemplate.md | 2 +- ...r_workflow_template__cluster_wftmpl_dag.md | 2 +- ...__mixed_cluster_namespaced_wftmpl_steps.md | 2 +- ...orkflow_template__workflow_template_ref.md | 2 +- ...emplate_ref_with_entrypoint_arg_passing.md | 2 +- docs/examples/workflows/upstream/coinflip.md | 2 +- .../workflows/upstream/coinflip_recursive.md | 2 +- .../workflows/upstream/colored_logs.md | 2 +- .../upstream/conditional_artifacts.md | 2 +- .../container_set_template__graph_workflow.md | 2 +- ...r_set_template__outputs_result_workflow.md | 2 +- ...ntainer_set_template__parallel_workflow.md | 2 +- ...ntainer_set_template__sequence_workflow.md | 2 +- ...tainer_set_template__workspace_workflow.md | 2 +- .../workflows/upstream/continue_on_fail.md | 2 +- .../workflows/upstream/cron_workflow.md | 2 +- .../workflows/upstream/custom_metrics.md | 2 +- .../workflows/upstream/daemon_nginx.md | 2 +- .../upstream/dag_conditional_parameters.md | 2 +- .../workflows/upstream/dag_custom_metrics.md | 2 +- .../workflows/upstream/dag_diamond.md | 2 +- .../upstream/dag_enhanced_depends.md | 2 +- .../upstream/dag_inline_workflowtemplate.md | 2 +- .../examples/workflows/upstream/dag_nested.md | 2 +- .../workflows/upstream/dag_targets.md | 2 +- .../upstream/dag_task_level_timeout.md | 2 +- .../workflows/upstream/default_pdb_support.md | 2 +- .../upstream/exit_handler_step_level.md | 2 +- .../upstream/exit_handler_with_artifacts.md | 2 +- docs/examples/workflows/upstream/forever.md | 2 +- .../workflows/upstream/global_parameters.md | 2 +- ..._configmap_referenced_as_local_variable.md | 2 +- .../workflows/upstream/hdfs_artifact.md | 2 +- .../workflows/upstream/image_pull_secrets.md | 2 +- .../workflows/upstream/init_container.md | 2 +- .../upstream/input_artifact_azure.md | 2 +- .../workflows/upstream/input_artifact_gcs.md | 2 +- .../workflows/upstream/input_artifact_git.md | 2 +- .../workflows/upstream/input_artifact_http.md | 2 +- .../workflows/upstream/input_artifact_oss.md | 2 +- .../workflows/upstream/input_artifact_raw.md | 2 +- .../workflows/upstream/input_artifact_s3.md | 2 +- .../upstream/k8s_json_patch_workflow.md | 2 +- .../upstream/k8s_resource_log_selector.md | 2 +- .../upstream/k8s_set_owner_reference.md | 2 +- .../workflows/upstream/key_only_artifact.md | 2 +- .../upstream/life_cycle_hooks_tmpl_level.md | 2 +- .../upstream/life_cycle_hooks_wf_level.md | 2 +- docs/examples/workflows/upstream/loops.md | 2 +- .../loops_arbitrary_sequential_steps.md | 2 +- docs/examples/workflows/upstream/loops_dag.md | 2 +- .../examples/workflows/upstream/loops_maps.md | 2 +- .../workflows/upstream/loops_param_result.md | 2 +- .../workflows/upstream/node_selector.md | 2 +- .../upstream/output_artifact_azure.md | 2 +- .../workflows/upstream/output_artifact_gcs.md | 2 +- .../workflows/upstream/output_artifact_s3.md | 2 +- .../workflows/upstream/output_parameter.md | 2 +- .../workflows/upstream/parallelism_limit.md | 2 +- .../workflows/upstream/parallelism_nested.md | 2 +- .../upstream/parallelism_nested_dag.md | 2 +- .../upstream/parallelism_template_limit.md | 2 +- .../upstream/pod_spec_patch_wf_tmpl.md | 2 +- .../upstream/resource_delete_with_flags.md | 2 +- .../workflows/upstream/retry_backoff.md | 2 +- .../workflows/upstream/retry_container.md | 2 +- .../workflows/upstream/retry_script.md | 2 +- docs/examples/workflows/upstream/sidecar.md | 2 +- .../workflows/upstream/sidecar_dind.md | 2 +- .../workflows/upstream/sidecar_nginx.md | 2 +- docs/examples/workflows/upstream/steps.md | 2 +- .../upstream/steps_inline_workflow.md | 2 +- .../workflows/upstream/suspend_template.md | 2 +- .../upstream/suspend_template_outputs.md | 2 +- .../synchronization_mutex_tmpl_level.md | 2 +- .../upstream/synchronization_tmpl_level.md | 2 +- .../upstream/synchronization_wf_level.md | 2 +- .../workflows/upstream/template_on_exit.md | 2 +- .../workflows/upstream/timeouts_workflow.md | 2 +- .../workflows/upstream/volumes_emptydir.md | 2 +- .../workflows/upstream/volumes_existing.md | 2 +- .../workflows/upstream/volumes_pvc.md | 2 +- .../webhdfs_input_output_artifacts.md | 2 +- ...inding__event_consumer_workflowtemplate.md | 2 +- .../upstream/workflow_of_workflows.md | 2 +- .../upstream/workflow_template__dag.md | 2 +- .../workflow_template__hello_world.md | 2 +- .../workflow_template__retry_with_steps.md | 2 +- .../upstream/workflow_template__steps.md | 2 +- ...orkflow_template__workflow_archive_logs.md | 2 +- ...orkflow_template__workflow_template_ref.md | 2 +- ...emplate_ref_with_entrypoint_arg_passing.md | 2 +- .../workflows/{ => use-cases}/dask.md | 0 .../workflows/{ => use-cases}/map_reduce.md | 2 +- .../workflows/{ => use-cases}/spark.md | 0 .../{ => use-cases}/workflow_of_workflows.md | 0 docs/generate.py | 22 ++- docs/user-guides/scripts.md | 2 +- docs/walk-through/advanced-hera-features.md | 4 +- docs/walk-through/artifacts.md | 2 +- docs/walk-through/loops.md | 2 +- docs/walk-through/parameters.md | 3 +- docs/walk-through/pydantic-support.md | 2 +- examples/workflows-examples.md | 2 +- examples/workflows/artifacts/__init__.py | 0 .../{ => artifacts}/artifact-with-fanout.yaml | 0 .../workflows/{ => artifacts}/artifact.py | 0 .../workflows/{ => artifacts}/artifact.yaml | 0 .../{ => artifacts}/artifact_with_fanout.py | 0 examples/workflows/callable-coinflip.yaml | 53 ------ examples/workflows/callable_coinflip.py | 34 ---- examples/workflows/complex_expr.py | 2 +- examples/workflows/dags/__init__.py | 0 .../{ => dags}/any-success-all-fail.yaml | 0 .../{ => dags}/any_success_all_fail.py | 0 .../callable-dag-with-param-get.yaml | 2 +- .../workflows/{ => dags}/callable-dag.yaml | 0 examples/workflows/{ => dags}/callable_dag.py | 0 .../{ => dags}/callable_dag_with_param_get.py | 0 .../workflows/{ => dags}/complex-deps.yaml | 0 examples/workflows/{ => dags}/complex_deps.py | 0 examples/workflows/{ => dags}/conditional.py | 0 .../workflows/{ => dags}/conditional.yaml | 0 .../dag-conditional-on-task-status.yaml | 0 .../dag-conditional-parameters.yaml | 0 .../dag-diamond-with-callable-container.yaml | 0 .../dag-diamond-with-callable-decorators.yaml | 0 .../dag-diamond-with-callable-script.yaml | 0 .../{ => dags}/dag-with-param-passing.yaml | 0 .../dag-with-script-output-param-passing.yaml | 0 .../dag-with-script-param-passing.yaml | 0 .../dag_conditional_on_task_status.py | 0 .../{ => dags}/dag_conditional_parameters.py | 0 .../dag_diamond_with_callable_container.py | 0 .../dag_diamond_with_callable_decorators.py | 0 .../dag_diamond_with_callable_script.py | 0 .../{ => dags}/dag_with_param_passing.py | 0 .../dag_with_script_output_param_passing.py | 0 .../dag_with_script_param_passing.py | 0 examples/workflows/{ => dags}/on-exit.yaml | 0 examples/workflows/{ => dags}/on_exit.py | 0 examples/workflows/experimental/__init__.py | 0 ...pt-annotations-artifact-custom-volume.yaml | 8 +- .../script-annotations-artifact-loaders.yaml | 4 +- ...annotations-artifact-outputs-defaults.yaml | 4 +- .../script-annotations-artifact-passing.yaml | 4 +- .../script-annotations-inputs.yaml | 4 +- .../script-annotations-outputs.yaml | 2 +- ...ript_annotations_artifact_custom_volume.py | 0 .../script_annotations_artifact_loaders.py | 0 ...t_annotations_artifact_outputs_defaults.py | 0 .../script_annotations_artifact_passing.py | 0 .../script_annotations_inputs.py | 0 .../script_annotations_outputs.py | 0 examples/workflows/loops/__init__.py | 0 .../{ => loops}/dynamic-fanout-container.yaml | 0 .../dynamic-fanout-extra-kwargs.yaml | 0 .../{ => loops}/dynamic-fanout-fanin.yaml | 0 .../dynamic-fanout-json-payload.yaml | 0 .../workflows/{ => loops}/dynamic-fanout.yaml | 0 .../workflows/{ => loops}/dynamic_fanout.py | 0 .../{ => loops}/dynamic_fanout_container.py | 0 .../dynamic_fanout_extra_kwargs.py | 0 .../{ => loops}/dynamic_fanout_fanin.py | 0 .../dynamic_fanout_json_payload.py | 0 .../{ => loops}/script-loops-maps.yaml | 0 .../{ => loops}/script_loops_maps.py | 0 .../workflows/{ => loops}/with-sequence.yaml | 0 .../workflows/{ => loops}/with_sequence.py | 0 examples/workflows/scripts/__init__.py | 0 .../{ => scripts}/callable-script.yaml | 10 +- .../{ => scripts}/callable_script.py | 0 examples/workflows/{ => scripts}/coinflip.py | 0 .../workflows/{ => scripts}/coinflip.yaml | 0 .../default-param-overwrite.yaml | 0 .../{ => scripts}/default_param_overwrite.py | 0 .../script-artifact-passing.yaml | 0 .../{ => scripts}/script-auto-infer.yaml | 0 .../{ => scripts}/script-variations.yaml | 0 .../script-with-default-params.yaml | 0 .../script-with-image-pull-policy.yaml | 0 .../{ => scripts}/script-with-resources.yaml | 0 .../{ => scripts}/script_artifact_passing.py | 0 .../{ => scripts}/script_auto_infer.py | 0 .../{ => scripts}/script_variations.py | 0 .../script_with_default_params.py | 0 .../script_with_image_pull_policy.py | 0 .../{ => scripts}/script_with_resources.py | 0 examples/workflows/steps/__init__.py | 0 .../workflows/{ => steps}/callable-steps.yaml | 0 .../workflows/{ => steps}/callable_steps.py | 0 .../workflows/{ => steps}/steps-types.yaml | 0 .../steps-with-callable-container.yaml | 0 examples/workflows/{ => steps}/steps_types.py | 0 .../steps_with_callable_container.py | 0 examples/workflows/use-cases/__init__.py | 0 examples/workflows/{ => use-cases}/dask.py | 0 examples/workflows/{ => use-cases}/dask.yaml | 0 .../workflows/{ => use-cases}/map-reduce.yaml | 0 .../workflows/{ => use-cases}/map_reduce.py | 2 +- examples/workflows/{ => use-cases}/spark.py | 0 examples/workflows/{ => use-cases}/spark.yaml | 0 .../workflow-of-workflows.yaml | 0 .../{ => use-cases}/workflow_of_workflows.py | 0 mkdocs.yml | 26 ++- tests/test_examples.py | 31 ++- tests/test_remaining_examples.py | 10 +- tests/test_runner.py | 10 +- tests/test_unit/test_workflow.py | 4 +- 270 files changed, 330 insertions(+), 469 deletions(-) create mode 100644 docs/examples/about-upstream.md create mode 100644 docs/examples/about-use-cases.md rename docs/examples/workflows/{ => artifacts}/artifact.md (100%) rename docs/examples/workflows/{ => artifacts}/artifact_with_fanout.md (100%) delete mode 100644 docs/examples/workflows/callable_coinflip.md rename docs/examples/workflows/{ => dags}/any_success_all_fail.md (100%) rename docs/examples/workflows/{ => dags}/callable_dag.md (100%) rename docs/examples/workflows/{ => dags}/callable_dag_with_param_get.md (97%) rename docs/examples/workflows/{ => dags}/complex_deps.md (100%) rename docs/examples/workflows/{ => dags}/conditional.md (100%) rename docs/examples/workflows/{ => dags}/dag_conditional_on_task_status.md (100%) rename docs/examples/workflows/{ => dags}/dag_conditional_parameters.md (100%) rename docs/examples/workflows/{ => dags}/dag_diamond_with_callable_container.md (100%) rename docs/examples/workflows/{ => dags}/dag_diamond_with_callable_decorators.md (100%) rename docs/examples/workflows/{ => dags}/dag_diamond_with_callable_script.md (100%) rename docs/examples/workflows/{ => dags}/dag_with_param_passing.md (100%) rename docs/examples/workflows/{ => dags}/dag_with_script_output_param_passing.md (100%) rename docs/examples/workflows/{ => dags}/dag_with_script_param_passing.md (100%) rename docs/examples/workflows/{ => dags}/on_exit.md (100%) rename docs/examples/workflows/{ => experimental}/script_annotations_artifact_custom_volume.md (93%) rename docs/examples/workflows/{ => experimental}/script_annotations_artifact_loaders.md (95%) rename docs/examples/workflows/{ => experimental}/script_annotations_artifact_outputs_defaults.md (94%) rename docs/examples/workflows/{ => experimental}/script_annotations_artifact_passing.md (94%) rename docs/examples/workflows/{ => experimental}/script_annotations_inputs.md (96%) rename docs/examples/workflows/{ => experimental}/script_annotations_outputs.md (95%) rename docs/examples/workflows/{ => loops}/dynamic_fanout.md (100%) rename docs/examples/workflows/{ => loops}/dynamic_fanout_container.md (100%) rename docs/examples/workflows/{ => loops}/dynamic_fanout_extra_kwargs.md (100%) rename docs/examples/workflows/{ => loops}/dynamic_fanout_fanin.md (100%) rename docs/examples/workflows/{ => loops}/dynamic_fanout_json_payload.md (100%) rename docs/examples/workflows/{ => loops}/script_loops_maps.md (100%) rename docs/examples/workflows/{ => loops}/with_sequence.md (100%) rename docs/examples/workflows/{ => scripts}/callable_script.md (95%) rename docs/examples/workflows/{ => scripts}/coinflip.md (100%) rename docs/examples/workflows/{ => scripts}/default_param_overwrite.md (100%) rename docs/examples/workflows/{ => scripts}/script_artifact_passing.md (100%) rename docs/examples/workflows/{ => scripts}/script_auto_infer.md (100%) rename docs/examples/workflows/{ => scripts}/script_variations.md (100%) rename docs/examples/workflows/{ => scripts}/script_with_default_params.md (100%) rename docs/examples/workflows/{ => scripts}/script_with_image_pull_policy.md (100%) rename docs/examples/workflows/{ => scripts}/script_with_resources.md (100%) rename docs/examples/workflows/{ => steps}/callable_steps.md (100%) rename docs/examples/workflows/{ => steps}/steps_types.md (100%) rename docs/examples/workflows/{ => steps}/steps_with_callable_container.md (100%) rename docs/examples/workflows/{ => use-cases}/dask.md (100%) rename docs/examples/workflows/{ => use-cases}/map_reduce.md (99%) rename docs/examples/workflows/{ => use-cases}/spark.md (100%) rename docs/examples/workflows/{ => use-cases}/workflow_of_workflows.md (100%) create mode 100644 examples/workflows/artifacts/__init__.py rename examples/workflows/{ => artifacts}/artifact-with-fanout.yaml (100%) rename examples/workflows/{ => artifacts}/artifact.py (100%) rename examples/workflows/{ => artifacts}/artifact.yaml (100%) rename examples/workflows/{ => artifacts}/artifact_with_fanout.py (100%) delete mode 100644 examples/workflows/callable-coinflip.yaml delete mode 100644 examples/workflows/callable_coinflip.py create mode 100644 examples/workflows/dags/__init__.py rename examples/workflows/{ => dags}/any-success-all-fail.yaml (100%) rename examples/workflows/{ => dags}/any_success_all_fail.py (100%) rename examples/workflows/{ => dags}/callable-dag-with-param-get.yaml (94%) rename examples/workflows/{ => dags}/callable-dag.yaml (100%) rename examples/workflows/{ => dags}/callable_dag.py (100%) rename examples/workflows/{ => dags}/callable_dag_with_param_get.py (100%) rename examples/workflows/{ => dags}/complex-deps.yaml (100%) rename examples/workflows/{ => dags}/complex_deps.py (100%) rename examples/workflows/{ => dags}/conditional.py (100%) rename examples/workflows/{ => dags}/conditional.yaml (100%) rename examples/workflows/{ => dags}/dag-conditional-on-task-status.yaml (100%) rename examples/workflows/{ => dags}/dag-conditional-parameters.yaml (100%) rename examples/workflows/{ => dags}/dag-diamond-with-callable-container.yaml (100%) rename examples/workflows/{ => dags}/dag-diamond-with-callable-decorators.yaml (100%) rename examples/workflows/{ => dags}/dag-diamond-with-callable-script.yaml (100%) rename examples/workflows/{ => dags}/dag-with-param-passing.yaml (100%) rename examples/workflows/{ => dags}/dag-with-script-output-param-passing.yaml (100%) rename examples/workflows/{ => dags}/dag-with-script-param-passing.yaml (100%) rename examples/workflows/{ => dags}/dag_conditional_on_task_status.py (100%) rename examples/workflows/{ => dags}/dag_conditional_parameters.py (100%) rename examples/workflows/{ => dags}/dag_diamond_with_callable_container.py (100%) rename examples/workflows/{ => dags}/dag_diamond_with_callable_decorators.py (100%) rename examples/workflows/{ => dags}/dag_diamond_with_callable_script.py (100%) rename examples/workflows/{ => dags}/dag_with_param_passing.py (100%) rename examples/workflows/{ => dags}/dag_with_script_output_param_passing.py (100%) rename examples/workflows/{ => dags}/dag_with_script_param_passing.py (100%) rename examples/workflows/{ => dags}/on-exit.yaml (100%) rename examples/workflows/{ => dags}/on_exit.py (100%) create mode 100644 examples/workflows/experimental/__init__.py rename examples/workflows/{ => experimental}/script-annotations-artifact-custom-volume.yaml (87%) rename examples/workflows/{ => experimental}/script-annotations-artifact-loaders.yaml (90%) rename examples/workflows/{ => experimental}/script-annotations-artifact-outputs-defaults.yaml (88%) rename examples/workflows/{ => experimental}/script-annotations-artifact-passing.yaml (88%) rename examples/workflows/{ => experimental}/script-annotations-inputs.yaml (92%) rename examples/workflows/{ => experimental}/script-annotations-outputs.yaml (90%) rename examples/workflows/{ => experimental}/script_annotations_artifact_custom_volume.py (100%) rename examples/workflows/{ => experimental}/script_annotations_artifact_loaders.py (100%) rename examples/workflows/{ => experimental}/script_annotations_artifact_outputs_defaults.py (100%) rename examples/workflows/{ => experimental}/script_annotations_artifact_passing.py (100%) rename examples/workflows/{ => experimental}/script_annotations_inputs.py (100%) rename examples/workflows/{ => experimental}/script_annotations_outputs.py (100%) create mode 100644 examples/workflows/loops/__init__.py rename examples/workflows/{ => loops}/dynamic-fanout-container.yaml (100%) rename examples/workflows/{ => loops}/dynamic-fanout-extra-kwargs.yaml (100%) rename examples/workflows/{ => loops}/dynamic-fanout-fanin.yaml (100%) rename examples/workflows/{ => loops}/dynamic-fanout-json-payload.yaml (100%) rename examples/workflows/{ => loops}/dynamic-fanout.yaml (100%) rename examples/workflows/{ => loops}/dynamic_fanout.py (100%) rename examples/workflows/{ => loops}/dynamic_fanout_container.py (100%) rename examples/workflows/{ => loops}/dynamic_fanout_extra_kwargs.py (100%) rename examples/workflows/{ => loops}/dynamic_fanout_fanin.py (100%) rename examples/workflows/{ => loops}/dynamic_fanout_json_payload.py (100%) rename examples/workflows/{ => loops}/script-loops-maps.yaml (100%) rename examples/workflows/{ => loops}/script_loops_maps.py (100%) rename examples/workflows/{ => loops}/with-sequence.yaml (100%) rename examples/workflows/{ => loops}/with_sequence.py (100%) create mode 100644 examples/workflows/scripts/__init__.py rename examples/workflows/{ => scripts}/callable-script.yaml (89%) rename examples/workflows/{ => scripts}/callable_script.py (100%) rename examples/workflows/{ => scripts}/coinflip.py (100%) rename examples/workflows/{ => scripts}/coinflip.yaml (100%) rename examples/workflows/{ => scripts}/default-param-overwrite.yaml (100%) rename examples/workflows/{ => scripts}/default_param_overwrite.py (100%) rename examples/workflows/{ => scripts}/script-artifact-passing.yaml (100%) rename examples/workflows/{ => scripts}/script-auto-infer.yaml (100%) rename examples/workflows/{ => scripts}/script-variations.yaml (100%) rename examples/workflows/{ => scripts}/script-with-default-params.yaml (100%) rename examples/workflows/{ => scripts}/script-with-image-pull-policy.yaml (100%) rename examples/workflows/{ => scripts}/script-with-resources.yaml (100%) rename examples/workflows/{ => scripts}/script_artifact_passing.py (100%) rename examples/workflows/{ => scripts}/script_auto_infer.py (100%) rename examples/workflows/{ => scripts}/script_variations.py (100%) rename examples/workflows/{ => scripts}/script_with_default_params.py (100%) rename examples/workflows/{ => scripts}/script_with_image_pull_policy.py (100%) rename examples/workflows/{ => scripts}/script_with_resources.py (100%) create mode 100644 examples/workflows/steps/__init__.py rename examples/workflows/{ => steps}/callable-steps.yaml (100%) rename examples/workflows/{ => steps}/callable_steps.py (100%) rename examples/workflows/{ => steps}/steps-types.yaml (100%) rename examples/workflows/{ => steps}/steps-with-callable-container.yaml (100%) rename examples/workflows/{ => steps}/steps_types.py (100%) rename examples/workflows/{ => steps}/steps_with_callable_container.py (100%) create mode 100644 examples/workflows/use-cases/__init__.py rename examples/workflows/{ => use-cases}/dask.py (100%) rename examples/workflows/{ => use-cases}/dask.yaml (100%) rename examples/workflows/{ => use-cases}/map-reduce.yaml (100%) rename examples/workflows/{ => use-cases}/map_reduce.py (98%) rename examples/workflows/{ => use-cases}/spark.py (100%) rename examples/workflows/{ => use-cases}/spark.yaml (100%) rename examples/workflows/{ => use-cases}/workflow-of-workflows.yaml (100%) rename examples/workflows/{ => use-cases}/workflow_of_workflows.py (100%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 026d16563..1ad20692b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -88,14 +88,14 @@ In order to add a new workflow test to test Hera functionality, do the following ### Upstream Hera examples -Tests that correspond to any [upstream Argo Workflow examples](https://github.com/argoproj/argo-workflows/tree/master/examples) should live in `examples/workflows/upstream/*.py`. These tests exist to ensure that Hera has complete parity with Argo Workflows and also to catch any regressions that might happen. +Tests that correspond to any [upstream Argo Workflow examples](https://github.com/argoproj/argo-workflows/tree/main/examples) should live in `examples/workflows/upstream/*.py`. These tests exist to ensure that Hera has complete parity with Argo Workflows and also to catch any regressions that might happen. In order to add a new workflow test to test Hera functionality, do the following - * Create a new file under `examples/workflows/upstream` that corresponds with the name of the upstream example yaml file. If the yaml file has a hyphen, your python file name should replace those with an underscore. eg. if you are trying to replicate - [archive-location.yaml](https://github.com/argoproj/argo-workflows/blob/master/examples/archive-location.yaml) your + [archive-location.yaml](https://github.com/argoproj/argo-workflows/blob/main/examples/archive-location.yaml) your python file should be called `archive_location.py` * Define your new workflow. Make sure that the target workflow you wish to export and test against is named `w` * Run tests using `make test`. Hera tests will generate a golden copy of the output YAML with the name diff --git a/Makefile b/Makefile index 841be7d9b..295d815f7 100644 --- a/Makefile +++ b/Makefile @@ -109,7 +109,7 @@ init-files: $(MAKE) format .PHONY: examples -examples: ## Generate all the examples +examples: ## Generate documentation files for examples @(cd docs && poetry run python generate.py) .PHONY: regenerate-test-data diff --git a/SECURITY.md b/SECURITY.md index 47f50bed8..036d2ed07 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -22,5 +22,5 @@ of course). Since Hera Workflows is built for Argo Workflows, this section offers the Argo Workflows security docs: -- see [docs/security.md](https://github.com/argoproj/argo-workflows/blob/master/docs/security.md) for information about +- see [docs/security.md](https://github.com/argoproj/argo-workflows/blob/main/docs/security.md) for information about securing your Argo Workflows instance diff --git a/docs/examples/about-upstream.md b/docs/examples/about-upstream.md new file mode 100644 index 000000000..c4537c0cb --- /dev/null +++ b/docs/examples/about-upstream.md @@ -0,0 +1,6 @@ +# Upstream Examples + +The "Upstream" collection contains examples +[directly from the Argo Workflows repository](https://github.com/argoproj/argo-workflows/tree/6e97c7d/examples), such as +the [DAG Diamond example](dag_diamond.md), to demonstrate how the YAML spec maps to Hera classes. These examples are +generated and compared in Hera's CI/CD pipeline to ensure that all the examples are possible to recreate in Hera. \ No newline at end of file diff --git a/docs/examples/about-use-cases.md b/docs/examples/about-use-cases.md new file mode 100644 index 000000000..978764489 --- /dev/null +++ b/docs/examples/about-use-cases.md @@ -0,0 +1,4 @@ +# Use-Cases and Integrations Examples + +These examples show how to use third-party technologies in your Workflows, along with use-cases to show more in-depth +uses of Hera. diff --git a/docs/examples/workflows-examples.md b/docs/examples/workflows-examples.md index 9a71c2b6b..d5eeba529 100644 --- a/docs/examples/workflows-examples.md +++ b/docs/examples/workflows-examples.md @@ -13,7 +13,7 @@ recreate in Hera. > [Contributing Guide](../CONTRIBUTING.md)! The "Hera" collection shows off features and idiomatic usage of Hera such as the -[Coinflip example](workflows/coinflip.md) using the script decorator. +[Coinflip example](workflows/scripts/coinflip.md) using the script decorator. Explore the examples through the side bar! @@ -23,91 +23,91 @@ Explore the examples through the side bar! | Example | |---------| -| [artifacts-workflowtemplate](https://github.com/argoproj/argo-workflows/blob/master/examples/artifacts-workflowtemplate.yaml) | -| [buildkit-template](https://github.com/argoproj/argo-workflows/blob/master/examples/buildkit-template.yaml) | -| [ci](https://github.com/argoproj/argo-workflows/blob/master/examples/ci.yaml) | -| [cluster-workflow-template/clustertemplates](https://github.com/argoproj/argo-workflows/blob/master/examples/cluster-workflow-template/clustertemplates.yaml) | -| [conditional-parameters](https://github.com/argoproj/argo-workflows/blob/master/examples/conditional-parameters.yaml) | -| [conditionals](https://github.com/argoproj/argo-workflows/blob/master/examples/conditionals.yaml) | -| [conditionals-complex](https://github.com/argoproj/argo-workflows/blob/master/examples/conditionals-complex.yaml) | -| [configmaps/simple-parameters-configmap](https://github.com/argoproj/argo-workflows/blob/master/examples/configmaps/simple-parameters-configmap.yaml) | -| [cron-backfill](https://github.com/argoproj/argo-workflows/blob/master/examples/cron-backfill.yaml) | -| [daemon-step](https://github.com/argoproj/argo-workflows/blob/master/examples/daemon-step.yaml) | -| [daemoned-stateful-set-with-service](https://github.com/argoproj/argo-workflows/blob/master/examples/daemoned-stateful-set-with-service.yaml) | -| [dag-coinflip](https://github.com/argoproj/argo-workflows/blob/master/examples/dag-coinflip.yaml) | -| [dag-conditional-artifacts](https://github.com/argoproj/argo-workflows/blob/master/examples/dag-conditional-artifacts.yaml) | -| [dag-continue-on-fail](https://github.com/argoproj/argo-workflows/blob/master/examples/dag-continue-on-fail.yaml) | -| [dag-daemon-task](https://github.com/argoproj/argo-workflows/blob/master/examples/dag-daemon-task.yaml) | -| [dag-diamond-steps](https://github.com/argoproj/argo-workflows/blob/master/examples/dag-diamond-steps.yaml) | -| [dag-disable-failFast](https://github.com/argoproj/argo-workflows/blob/master/examples/dag-disable-failFast.yaml) | -| [dag-inline-clusterworkflowtemplate](https://github.com/argoproj/argo-workflows/blob/master/examples/dag-inline-clusterworkflowtemplate.yaml) | -| [dag-inline-cronworkflow](https://github.com/argoproj/argo-workflows/blob/master/examples/dag-inline-cronworkflow.yaml) | -| [dag-inline-workflow](https://github.com/argoproj/argo-workflows/blob/master/examples/dag-inline-workflow.yaml) | -| [dag-multiroot](https://github.com/argoproj/argo-workflows/blob/master/examples/dag-multiroot.yaml) | -| [data-transformations](https://github.com/argoproj/argo-workflows/blob/master/examples/data-transformations.yaml) | -| [dns-config](https://github.com/argoproj/argo-workflows/blob/master/examples/dns-config.yaml) | -| [exit-code-output-variable](https://github.com/argoproj/argo-workflows/blob/master/examples/exit-code-output-variable.yaml) | -| [exit-handler-dag-level](https://github.com/argoproj/argo-workflows/blob/master/examples/exit-handler-dag-level.yaml) | -| [exit-handler-slack](https://github.com/argoproj/argo-workflows/blob/master/examples/exit-handler-slack.yaml) | -| [exit-handler-with-param](https://github.com/argoproj/argo-workflows/blob/master/examples/exit-handler-with-param.yaml) | -| [exit-handlers](https://github.com/argoproj/argo-workflows/blob/master/examples/exit-handlers.yaml) | -| [expression-destructure-json](https://github.com/argoproj/argo-workflows/blob/master/examples/expression-destructure-json.yaml) | -| [expression-reusing-verbose-snippets](https://github.com/argoproj/argo-workflows/blob/master/examples/expression-reusing-verbose-snippets.yaml) | -| [expression-tag-template-workflow](https://github.com/argoproj/argo-workflows/blob/master/examples/expression-tag-template-workflow.yaml) | -| [fibonacci-seq-conditional-param](https://github.com/argoproj/argo-workflows/blob/master/examples/fibonacci-seq-conditional-param.yaml) | -| [fun-with-gifs](https://github.com/argoproj/argo-workflows/blob/master/examples/fun-with-gifs.yaml) | -| [gc-ttl](https://github.com/argoproj/argo-workflows/blob/master/examples/gc-ttl.yaml) | -| [global-outputs](https://github.com/argoproj/argo-workflows/blob/master/examples/global-outputs.yaml) | -| [global-parameters-from-configmap](https://github.com/argoproj/argo-workflows/blob/master/examples/global-parameters-from-configmap.yaml) | -| [handle-large-output-results](https://github.com/argoproj/argo-workflows/blob/master/examples/handle-large-output-results.yaml) | -| [hello-hybrid](https://github.com/argoproj/argo-workflows/blob/master/examples/hello-hybrid.yaml) | -| [hello-windows](https://github.com/argoproj/argo-workflows/blob/master/examples/hello-windows.yaml) | -| [hello-world](https://github.com/argoproj/argo-workflows/blob/master/examples/hello-world.yaml) | -| [http-hello-world](https://github.com/argoproj/argo-workflows/blob/master/examples/http-hello-world.yaml) | -| [http-success-condition](https://github.com/argoproj/argo-workflows/blob/master/examples/http-success-condition.yaml) | -| [influxdb-ci](https://github.com/argoproj/argo-workflows/blob/master/examples/influxdb-ci.yaml) | -| [intermediate-parameters](https://github.com/argoproj/argo-workflows/blob/master/examples/intermediate-parameters.yaml) | -| [k8s-jobs](https://github.com/argoproj/argo-workflows/blob/master/examples/k8s-jobs.yaml) | -| [k8s-orchestration](https://github.com/argoproj/argo-workflows/blob/master/examples/k8s-orchestration.yaml) | -| [k8s-owner-reference](https://github.com/argoproj/argo-workflows/blob/master/examples/k8s-owner-reference.yaml) | -| [k8s-patch](https://github.com/argoproj/argo-workflows/blob/master/examples/k8s-patch.yaml) | -| [k8s-patch-basic](https://github.com/argoproj/argo-workflows/blob/master/examples/k8s-patch-basic.yaml) | -| [k8s-wait-wf](https://github.com/argoproj/argo-workflows/blob/master/examples/k8s-wait-wf.yaml) | -| [label-value-from-workflow](https://github.com/argoproj/argo-workflows/blob/master/examples/label-value-from-workflow.yaml) | -| [loops-param-argument](https://github.com/argoproj/argo-workflows/blob/master/examples/loops-param-argument.yaml) | -| [loops-sequence](https://github.com/argoproj/argo-workflows/blob/master/examples/loops-sequence.yaml) | -| [map-reduce](https://github.com/argoproj/argo-workflows/blob/master/examples/map-reduce.yaml) | -| [memoize-simple](https://github.com/argoproj/argo-workflows/blob/master/examples/memoize-simple.yaml) | -| [nested-workflow](https://github.com/argoproj/argo-workflows/blob/master/examples/nested-workflow.yaml) | -| [parallelism-nested-workflow](https://github.com/argoproj/argo-workflows/blob/master/examples/parallelism-nested-workflow.yaml) | -| [parameter-aggregation](https://github.com/argoproj/argo-workflows/blob/master/examples/parameter-aggregation.yaml) | -| [parameter-aggregation-dag](https://github.com/argoproj/argo-workflows/blob/master/examples/parameter-aggregation-dag.yaml) | -| [parameter-aggregation-script](https://github.com/argoproj/argo-workflows/blob/master/examples/parameter-aggregation-script.yaml) | -| [pod-gc-strategy](https://github.com/argoproj/argo-workflows/blob/master/examples/pod-gc-strategy.yaml) | -| [pod-gc-strategy-with-label-selector](https://github.com/argoproj/argo-workflows/blob/master/examples/pod-gc-strategy-with-label-selector.yaml) | -| [pod-metadata](https://github.com/argoproj/argo-workflows/blob/master/examples/pod-metadata.yaml) | -| [pod-metadata-wf-field](https://github.com/argoproj/argo-workflows/blob/master/examples/pod-metadata-wf-field.yaml) | -| [pod-spec-from-previous-step](https://github.com/argoproj/argo-workflows/blob/master/examples/pod-spec-from-previous-step.yaml) | -| [pod-spec-patch](https://github.com/argoproj/argo-workflows/blob/master/examples/pod-spec-patch.yaml) | -| [pod-spec-yaml-patch](https://github.com/argoproj/argo-workflows/blob/master/examples/pod-spec-yaml-patch.yaml) | -| [recursive-for-loop](https://github.com/argoproj/argo-workflows/blob/master/examples/recursive-for-loop.yaml) | -| [resource-flags](https://github.com/argoproj/argo-workflows/blob/master/examples/resource-flags.yaml) | -| [resubmit](https://github.com/argoproj/argo-workflows/blob/master/examples/resubmit.yaml) | -| [retry-conditional](https://github.com/argoproj/argo-workflows/blob/master/examples/retry-conditional.yaml) | -| [retry-container-to-completion](https://github.com/argoproj/argo-workflows/blob/master/examples/retry-container-to-completion.yaml) | -| [retry-on-error](https://github.com/argoproj/argo-workflows/blob/master/examples/retry-on-error.yaml) | -| [retry-with-steps](https://github.com/argoproj/argo-workflows/blob/master/examples/retry-with-steps.yaml) | -| [scripts-bash](https://github.com/argoproj/argo-workflows/blob/master/examples/scripts-bash.yaml) | -| [scripts-javascript](https://github.com/argoproj/argo-workflows/blob/master/examples/scripts-javascript.yaml) | -| [scripts-python](https://github.com/argoproj/argo-workflows/blob/master/examples/scripts-python.yaml) | -| [secrets](https://github.com/argoproj/argo-workflows/blob/master/examples/secrets.yaml) | -| [status-reference](https://github.com/argoproj/argo-workflows/blob/master/examples/status-reference.yaml) | -| [step-level-timeout](https://github.com/argoproj/argo-workflows/blob/master/examples/step-level-timeout.yaml) | -| [synchronization-mutex-wf-level](https://github.com/argoproj/argo-workflows/blob/master/examples/synchronization-mutex-wf-level.yaml) | -| [template-defaults](https://github.com/argoproj/argo-workflows/blob/master/examples/template-defaults.yaml) | -| [testvolume](https://github.com/argoproj/argo-workflows/blob/master/examples/testvolume.yaml) | -| [timeouts-step](https://github.com/argoproj/argo-workflows/blob/master/examples/timeouts-step.yaml) | -| [work-avoidance](https://github.com/argoproj/argo-workflows/blob/master/examples/work-avoidance.yaml) | -| [workflow-count-resourcequota](https://github.com/argoproj/argo-workflows/blob/master/examples/workflow-count-resourcequota.yaml) | -| [workflow-event-binding/event-consumer-workfloweventbinding](https://github.com/argoproj/argo-workflows/blob/master/examples/workflow-event-binding/event-consumer-workfloweventbinding.yaml) | -| [workflow-template/templates](https://github.com/argoproj/argo-workflows/blob/master/examples/workflow-template/templates.yaml) | +| [artifacts-workflowtemplate](https://github.com/argoproj/argo-workflows/blob/main/examples/artifacts-workflowtemplate.yaml) | +| [buildkit-template](https://github.com/argoproj/argo-workflows/blob/main/examples/buildkit-template.yaml) | +| [ci](https://github.com/argoproj/argo-workflows/blob/main/examples/ci.yaml) | +| [cluster-workflow-template/clustertemplates](https://github.com/argoproj/argo-workflows/blob/main/examples/cluster-workflow-template/clustertemplates.yaml) | +| [conditional-parameters](https://github.com/argoproj/argo-workflows/blob/main/examples/conditional-parameters.yaml) | +| [conditionals](https://github.com/argoproj/argo-workflows/blob/main/examples/conditionals.yaml) | +| [conditionals-complex](https://github.com/argoproj/argo-workflows/blob/main/examples/conditionals-complex.yaml) | +| [configmaps/simple-parameters-configmap](https://github.com/argoproj/argo-workflows/blob/main/examples/configmaps/simple-parameters-configmap.yaml) | +| [cron-backfill](https://github.com/argoproj/argo-workflows/blob/main/examples/cron-backfill.yaml) | +| [daemon-step](https://github.com/argoproj/argo-workflows/blob/main/examples/daemon-step.yaml) | +| [daemoned-stateful-set-with-service](https://github.com/argoproj/argo-workflows/blob/main/examples/daemoned-stateful-set-with-service.yaml) | +| [dag-coinflip](https://github.com/argoproj/argo-workflows/blob/main/examples/dag-coinflip.yaml) | +| [dag-conditional-artifacts](https://github.com/argoproj/argo-workflows/blob/main/examples/dag-conditional-artifacts.yaml) | +| [dag-continue-on-fail](https://github.com/argoproj/argo-workflows/blob/main/examples/dag-continue-on-fail.yaml) | +| [dag-daemon-task](https://github.com/argoproj/argo-workflows/blob/main/examples/dag-daemon-task.yaml) | +| [dag-diamond-steps](https://github.com/argoproj/argo-workflows/blob/main/examples/dag-diamond-steps.yaml) | +| [dag-disable-failFast](https://github.com/argoproj/argo-workflows/blob/main/examples/dag-disable-failFast.yaml) | +| [dag-inline-clusterworkflowtemplate](https://github.com/argoproj/argo-workflows/blob/main/examples/dag-inline-clusterworkflowtemplate.yaml) | +| [dag-inline-cronworkflow](https://github.com/argoproj/argo-workflows/blob/main/examples/dag-inline-cronworkflow.yaml) | +| [dag-inline-workflow](https://github.com/argoproj/argo-workflows/blob/main/examples/dag-inline-workflow.yaml) | +| [dag-multiroot](https://github.com/argoproj/argo-workflows/blob/main/examples/dag-multiroot.yaml) | +| [data-transformations](https://github.com/argoproj/argo-workflows/blob/main/examples/data-transformations.yaml) | +| [dns-config](https://github.com/argoproj/argo-workflows/blob/main/examples/dns-config.yaml) | +| [exit-code-output-variable](https://github.com/argoproj/argo-workflows/blob/main/examples/exit-code-output-variable.yaml) | +| [exit-handler-dag-level](https://github.com/argoproj/argo-workflows/blob/main/examples/exit-handler-dag-level.yaml) | +| [exit-handler-slack](https://github.com/argoproj/argo-workflows/blob/main/examples/exit-handler-slack.yaml) | +| [exit-handler-with-param](https://github.com/argoproj/argo-workflows/blob/main/examples/exit-handler-with-param.yaml) | +| [exit-handlers](https://github.com/argoproj/argo-workflows/blob/main/examples/exit-handlers.yaml) | +| [expression-destructure-json](https://github.com/argoproj/argo-workflows/blob/main/examples/expression-destructure-json.yaml) | +| [expression-reusing-verbose-snippets](https://github.com/argoproj/argo-workflows/blob/main/examples/expression-reusing-verbose-snippets.yaml) | +| [expression-tag-template-workflow](https://github.com/argoproj/argo-workflows/blob/main/examples/expression-tag-template-workflow.yaml) | +| [fibonacci-seq-conditional-param](https://github.com/argoproj/argo-workflows/blob/main/examples/fibonacci-seq-conditional-param.yaml) | +| [fun-with-gifs](https://github.com/argoproj/argo-workflows/blob/main/examples/fun-with-gifs.yaml) | +| [gc-ttl](https://github.com/argoproj/argo-workflows/blob/main/examples/gc-ttl.yaml) | +| [global-outputs](https://github.com/argoproj/argo-workflows/blob/main/examples/global-outputs.yaml) | +| [global-parameters-from-configmap](https://github.com/argoproj/argo-workflows/blob/main/examples/global-parameters-from-configmap.yaml) | +| [handle-large-output-results](https://github.com/argoproj/argo-workflows/blob/main/examples/handle-large-output-results.yaml) | +| [hello-hybrid](https://github.com/argoproj/argo-workflows/blob/main/examples/hello-hybrid.yaml) | +| [hello-windows](https://github.com/argoproj/argo-workflows/blob/main/examples/hello-windows.yaml) | +| [hello-world](https://github.com/argoproj/argo-workflows/blob/main/examples/hello-world.yaml) | +| [http-hello-world](https://github.com/argoproj/argo-workflows/blob/main/examples/http-hello-world.yaml) | +| [http-success-condition](https://github.com/argoproj/argo-workflows/blob/main/examples/http-success-condition.yaml) | +| [influxdb-ci](https://github.com/argoproj/argo-workflows/blob/main/examples/influxdb-ci.yaml) | +| [intermediate-parameters](https://github.com/argoproj/argo-workflows/blob/main/examples/intermediate-parameters.yaml) | +| [k8s-jobs](https://github.com/argoproj/argo-workflows/blob/main/examples/k8s-jobs.yaml) | +| [k8s-orchestration](https://github.com/argoproj/argo-workflows/blob/main/examples/k8s-orchestration.yaml) | +| [k8s-owner-reference](https://github.com/argoproj/argo-workflows/blob/main/examples/k8s-owner-reference.yaml) | +| [k8s-patch](https://github.com/argoproj/argo-workflows/blob/main/examples/k8s-patch.yaml) | +| [k8s-patch-basic](https://github.com/argoproj/argo-workflows/blob/main/examples/k8s-patch-basic.yaml) | +| [k8s-wait-wf](https://github.com/argoproj/argo-workflows/blob/main/examples/k8s-wait-wf.yaml) | +| [label-value-from-workflow](https://github.com/argoproj/argo-workflows/blob/main/examples/label-value-from-workflow.yaml) | +| [loops-param-argument](https://github.com/argoproj/argo-workflows/blob/main/examples/loops-param-argument.yaml) | +| [loops-sequence](https://github.com/argoproj/argo-workflows/blob/main/examples/loops-sequence.yaml) | +| [map-reduce](https://github.com/argoproj/argo-workflows/blob/main/examples/map-reduce.yaml) | +| [memoize-simple](https://github.com/argoproj/argo-workflows/blob/main/examples/memoize-simple.yaml) | +| [nested-workflow](https://github.com/argoproj/argo-workflows/blob/main/examples/nested-workflow.yaml) | +| [parallelism-nested-workflow](https://github.com/argoproj/argo-workflows/blob/main/examples/parallelism-nested-workflow.yaml) | +| [parameter-aggregation](https://github.com/argoproj/argo-workflows/blob/main/examples/parameter-aggregation.yaml) | +| [parameter-aggregation-dag](https://github.com/argoproj/argo-workflows/blob/main/examples/parameter-aggregation-dag.yaml) | +| [parameter-aggregation-script](https://github.com/argoproj/argo-workflows/blob/main/examples/parameter-aggregation-script.yaml) | +| [pod-gc-strategy](https://github.com/argoproj/argo-workflows/blob/main/examples/pod-gc-strategy.yaml) | +| [pod-gc-strategy-with-label-selector](https://github.com/argoproj/argo-workflows/blob/main/examples/pod-gc-strategy-with-label-selector.yaml) | +| [pod-metadata](https://github.com/argoproj/argo-workflows/blob/main/examples/pod-metadata.yaml) | +| [pod-metadata-wf-field](https://github.com/argoproj/argo-workflows/blob/main/examples/pod-metadata-wf-field.yaml) | +| [pod-spec-from-previous-step](https://github.com/argoproj/argo-workflows/blob/main/examples/pod-spec-from-previous-step.yaml) | +| [pod-spec-patch](https://github.com/argoproj/argo-workflows/blob/main/examples/pod-spec-patch.yaml) | +| [pod-spec-yaml-patch](https://github.com/argoproj/argo-workflows/blob/main/examples/pod-spec-yaml-patch.yaml) | +| [recursive-for-loop](https://github.com/argoproj/argo-workflows/blob/main/examples/recursive-for-loop.yaml) | +| [resource-flags](https://github.com/argoproj/argo-workflows/blob/main/examples/resource-flags.yaml) | +| [resubmit](https://github.com/argoproj/argo-workflows/blob/main/examples/resubmit.yaml) | +| [retry-conditional](https://github.com/argoproj/argo-workflows/blob/main/examples/retry-conditional.yaml) | +| [retry-container-to-completion](https://github.com/argoproj/argo-workflows/blob/main/examples/retry-container-to-completion.yaml) | +| [retry-on-error](https://github.com/argoproj/argo-workflows/blob/main/examples/retry-on-error.yaml) | +| [retry-with-steps](https://github.com/argoproj/argo-workflows/blob/main/examples/retry-with-steps.yaml) | +| [scripts-bash](https://github.com/argoproj/argo-workflows/blob/main/examples/scripts-bash.yaml) | +| [scripts-javascript](https://github.com/argoproj/argo-workflows/blob/main/examples/scripts-javascript.yaml) | +| [scripts-python](https://github.com/argoproj/argo-workflows/blob/main/examples/scripts-python.yaml) | +| [secrets](https://github.com/argoproj/argo-workflows/blob/main/examples/secrets.yaml) | +| [status-reference](https://github.com/argoproj/argo-workflows/blob/main/examples/status-reference.yaml) | +| [step-level-timeout](https://github.com/argoproj/argo-workflows/blob/main/examples/step-level-timeout.yaml) | +| [synchronization-mutex-wf-level](https://github.com/argoproj/argo-workflows/blob/main/examples/synchronization-mutex-wf-level.yaml) | +| [template-defaults](https://github.com/argoproj/argo-workflows/blob/main/examples/template-defaults.yaml) | +| [testvolume](https://github.com/argoproj/argo-workflows/blob/main/examples/testvolume.yaml) | +| [timeouts-step](https://github.com/argoproj/argo-workflows/blob/main/examples/timeouts-step.yaml) | +| [work-avoidance](https://github.com/argoproj/argo-workflows/blob/main/examples/work-avoidance.yaml) | +| [workflow-count-resourcequota](https://github.com/argoproj/argo-workflows/blob/main/examples/workflow-count-resourcequota.yaml) | +| [workflow-event-binding/event-consumer-workfloweventbinding](https://github.com/argoproj/argo-workflows/blob/main/examples/workflow-event-binding/event-consumer-workfloweventbinding.yaml) | +| [workflow-template/templates](https://github.com/argoproj/argo-workflows/blob/main/examples/workflow-template/templates.yaml) | diff --git a/docs/examples/workflows/artifact.md b/docs/examples/workflows/artifacts/artifact.md similarity index 100% rename from docs/examples/workflows/artifact.md rename to docs/examples/workflows/artifacts/artifact.md diff --git a/docs/examples/workflows/artifact_with_fanout.md b/docs/examples/workflows/artifacts/artifact_with_fanout.md similarity index 100% rename from docs/examples/workflows/artifact_with_fanout.md rename to docs/examples/workflows/artifacts/artifact_with_fanout.md diff --git a/docs/examples/workflows/callable_coinflip.md b/docs/examples/workflows/callable_coinflip.md deleted file mode 100644 index b05034b83..000000000 --- a/docs/examples/workflows/callable_coinflip.md +++ /dev/null @@ -1,104 +0,0 @@ -# Callable Coinflip - - - - - - -=== "Hera" - - ```python linenums="1" - import random - - from hera.shared import global_config - from hera.workflows import DAG, Script, Workflow, script - - # Note, setting constructor to runner is only possible if the source code is available - # along with dependencies include hera in the image. - # Callable is a robust mode that allows you to run any python function - # and is compatible with pydantic. It automatically parses the input - # and serializes the output. - global_config.image = "my-image-with-python-source-code-and-dependencies" - global_config.set_class_defaults(Script, constructor="runner") - - - @script() - def flip(): - return "heads" if random.randint(0, 1) == 0 else "tails" - - - @script() - def heads(): - return "it was heads" - - - @script() - def tails(): - return "it was tails" - - - with Workflow(generate_name="coinflip-", entrypoint="d") as w: - with DAG(name="d") as s: - f = flip() - heads().on_other_result(f, "heads") - tails().on_other_result(f, "tails") - ``` - -=== "YAML" - - ```yaml linenums="1" - apiVersion: argoproj.io/v1alpha1 - kind: Workflow - metadata: - generateName: coinflip- - spec: - entrypoint: d - templates: - - dag: - tasks: - - name: flip - template: flip - - depends: flip - name: heads - template: heads - when: '{{tasks.flip.outputs.result}} == heads' - - depends: flip - name: tails - template: tails - when: '{{tasks.flip.outputs.result}} == tails' - name: d - - name: flip - script: - args: - - -m - - hera.workflows.runner - - -e - - examples.workflows.callable_coinflip:flip - command: - - python - image: my-image-with-python-source-code-and-dependencies - source: '{{inputs.parameters}}' - - name: heads - script: - args: - - -m - - hera.workflows.runner - - -e - - examples.workflows.callable_coinflip:heads - command: - - python - image: my-image-with-python-source-code-and-dependencies - source: '{{inputs.parameters}}' - - name: tails - script: - args: - - -m - - hera.workflows.runner - - -e - - examples.workflows.callable_coinflip:tails - command: - - python - image: my-image-with-python-source-code-and-dependencies - source: '{{inputs.parameters}}' - ``` - diff --git a/docs/examples/workflows/complex_expr.md b/docs/examples/workflows/complex_expr.md index e4cbd1df5..a47028861 100644 --- a/docs/examples/workflows/complex_expr.md +++ b/docs/examples/workflows/complex_expr.md @@ -4,7 +4,7 @@ This example showcases how to string together complex expressions. This example is a python replica of -https://github.com/argoproj/argo-workflows/blob/master/examples/expression-reusing-verbose-snippets.yaml +https://github.com/argoproj/argo-workflows/blob/main/examples/expression-reusing-verbose-snippets.yaml === "Hera" diff --git a/docs/examples/workflows/any_success_all_fail.md b/docs/examples/workflows/dags/any_success_all_fail.md similarity index 100% rename from docs/examples/workflows/any_success_all_fail.md rename to docs/examples/workflows/dags/any_success_all_fail.md diff --git a/docs/examples/workflows/callable_dag.md b/docs/examples/workflows/dags/callable_dag.md similarity index 100% rename from docs/examples/workflows/callable_dag.md rename to docs/examples/workflows/dags/callable_dag.md diff --git a/docs/examples/workflows/callable_dag_with_param_get.md b/docs/examples/workflows/dags/callable_dag_with_param_get.md similarity index 97% rename from docs/examples/workflows/callable_dag_with_param_get.md rename to docs/examples/workflows/dags/callable_dag_with_param_get.md index a54d35bc0..9519cd7e1 100644 --- a/docs/examples/workflows/callable_dag_with_param_get.md +++ b/docs/examples/workflows/dags/callable_dag_with_param_get.md @@ -76,7 +76,7 @@ - -m - hera.workflows.runner - -e - - examples.workflows.callable_dag_with_param_get:hello_with_output + - examples.workflows.dags.callable_dag_with_param_get:hello_with_output command: - python image: python:3.8 diff --git a/docs/examples/workflows/complex_deps.md b/docs/examples/workflows/dags/complex_deps.md similarity index 100% rename from docs/examples/workflows/complex_deps.md rename to docs/examples/workflows/dags/complex_deps.md diff --git a/docs/examples/workflows/conditional.md b/docs/examples/workflows/dags/conditional.md similarity index 100% rename from docs/examples/workflows/conditional.md rename to docs/examples/workflows/dags/conditional.md diff --git a/docs/examples/workflows/dag_conditional_on_task_status.md b/docs/examples/workflows/dags/dag_conditional_on_task_status.md similarity index 100% rename from docs/examples/workflows/dag_conditional_on_task_status.md rename to docs/examples/workflows/dags/dag_conditional_on_task_status.md diff --git a/docs/examples/workflows/dag_conditional_parameters.md b/docs/examples/workflows/dags/dag_conditional_parameters.md similarity index 100% rename from docs/examples/workflows/dag_conditional_parameters.md rename to docs/examples/workflows/dags/dag_conditional_parameters.md diff --git a/docs/examples/workflows/dag_diamond_with_callable_container.md b/docs/examples/workflows/dags/dag_diamond_with_callable_container.md similarity index 100% rename from docs/examples/workflows/dag_diamond_with_callable_container.md rename to docs/examples/workflows/dags/dag_diamond_with_callable_container.md diff --git a/docs/examples/workflows/dag_diamond_with_callable_decorators.md b/docs/examples/workflows/dags/dag_diamond_with_callable_decorators.md similarity index 100% rename from docs/examples/workflows/dag_diamond_with_callable_decorators.md rename to docs/examples/workflows/dags/dag_diamond_with_callable_decorators.md diff --git a/docs/examples/workflows/dag_diamond_with_callable_script.md b/docs/examples/workflows/dags/dag_diamond_with_callable_script.md similarity index 100% rename from docs/examples/workflows/dag_diamond_with_callable_script.md rename to docs/examples/workflows/dags/dag_diamond_with_callable_script.md diff --git a/docs/examples/workflows/dag_with_param_passing.md b/docs/examples/workflows/dags/dag_with_param_passing.md similarity index 100% rename from docs/examples/workflows/dag_with_param_passing.md rename to docs/examples/workflows/dags/dag_with_param_passing.md diff --git a/docs/examples/workflows/dag_with_script_output_param_passing.md b/docs/examples/workflows/dags/dag_with_script_output_param_passing.md similarity index 100% rename from docs/examples/workflows/dag_with_script_output_param_passing.md rename to docs/examples/workflows/dags/dag_with_script_output_param_passing.md diff --git a/docs/examples/workflows/dag_with_script_param_passing.md b/docs/examples/workflows/dags/dag_with_script_param_passing.md similarity index 100% rename from docs/examples/workflows/dag_with_script_param_passing.md rename to docs/examples/workflows/dags/dag_with_script_param_passing.md diff --git a/docs/examples/workflows/on_exit.md b/docs/examples/workflows/dags/on_exit.md similarity index 100% rename from docs/examples/workflows/on_exit.md rename to docs/examples/workflows/dags/on_exit.md diff --git a/docs/examples/workflows/script_annotations_artifact_custom_volume.md b/docs/examples/workflows/experimental/script_annotations_artifact_custom_volume.md similarity index 93% rename from docs/examples/workflows/script_annotations_artifact_custom_volume.md rename to docs/examples/workflows/experimental/script_annotations_artifact_custom_volume.md index 620f6d8b3..fccb67aa1 100644 --- a/docs/examples/workflows/script_annotations_artifact_custom_volume.md +++ b/docs/examples/workflows/experimental/script_annotations_artifact_custom_volume.md @@ -140,7 +140,7 @@ This example will reuse the outputs volume across script steps. - -m - hera.workflows.runner - -e - - examples.workflows.script_annotations_artifact_custom_volume:output_artifact_empty_dir + - examples.workflows.experimental.script_annotations_artifact_custom_volume:output_artifact_empty_dir command: - python env: @@ -166,7 +166,7 @@ This example will reuse the outputs volume across script steps. - -m - hera.workflows.runner - -e - - examples.workflows.script_annotations_artifact_custom_volume:use_artifact + - examples.workflows.experimental.script_annotations_artifact_custom_volume:use_artifact command: - python env: @@ -187,7 +187,7 @@ This example will reuse the outputs volume across script steps. - -m - hera.workflows.runner - -e - - examples.workflows.script_annotations_artifact_custom_volume:output_artifact_existing_vol + - examples.workflows.experimental.script_annotations_artifact_custom_volume:output_artifact_existing_vol command: - python env: @@ -210,7 +210,7 @@ This example will reuse the outputs volume across script steps. - -m - hera.workflows.runner - -e - - examples.workflows.script_annotations_artifact_custom_volume:use_artifact_existing_vol + - examples.workflows.experimental.script_annotations_artifact_custom_volume:use_artifact_existing_vol command: - python env: diff --git a/docs/examples/workflows/script_annotations_artifact_loaders.md b/docs/examples/workflows/experimental/script_annotations_artifact_loaders.md similarity index 95% rename from docs/examples/workflows/script_annotations_artifact_loaders.md rename to docs/examples/workflows/experimental/script_annotations_artifact_loaders.md index 3ba01b4b9..d5ebb765d 100644 --- a/docs/examples/workflows/script_annotations_artifact_loaders.md +++ b/docs/examples/workflows/experimental/script_annotations_artifact_loaders.md @@ -96,7 +96,7 @@ - -m - hera.workflows.runner - -e - - examples.workflows.script_annotations_artifact_loaders:output_dict_artifact + - examples.workflows.experimental.script_annotations_artifact_loaders:output_dict_artifact command: - python env: @@ -120,7 +120,7 @@ - -m - hera.workflows.runner - -e - - examples.workflows.script_annotations_artifact_loaders:artifact_loaders + - examples.workflows.experimental.script_annotations_artifact_loaders:artifact_loaders command: - python env: diff --git a/docs/examples/workflows/script_annotations_artifact_outputs_defaults.md b/docs/examples/workflows/experimental/script_annotations_artifact_outputs_defaults.md similarity index 94% rename from docs/examples/workflows/script_annotations_artifact_outputs_defaults.md rename to docs/examples/workflows/experimental/script_annotations_artifact_outputs_defaults.md index 9dfd41525..23b6d0b1f 100644 --- a/docs/examples/workflows/script_annotations_artifact_outputs_defaults.md +++ b/docs/examples/workflows/experimental/script_annotations_artifact_outputs_defaults.md @@ -97,7 +97,7 @@ This example will reuse the outputs volume across script steps. - -m - hera.workflows.runner - -e - - examples.workflows.script_annotations_artifact_outputs_defaults:output_artifact + - examples.workflows.experimental.script_annotations_artifact_outputs_defaults:output_artifact command: - python env: @@ -117,7 +117,7 @@ This example will reuse the outputs volume across script steps. - -m - hera.workflows.runner - -e - - examples.workflows.script_annotations_artifact_outputs_defaults:use_artifact + - examples.workflows.experimental.script_annotations_artifact_outputs_defaults:use_artifact command: - python env: diff --git a/docs/examples/workflows/script_annotations_artifact_passing.md b/docs/examples/workflows/experimental/script_annotations_artifact_passing.md similarity index 94% rename from docs/examples/workflows/script_annotations_artifact_passing.md rename to docs/examples/workflows/experimental/script_annotations_artifact_passing.md index 02ac3c6cd..66d66bc8a 100644 --- a/docs/examples/workflows/script_annotations_artifact_passing.md +++ b/docs/examples/workflows/experimental/script_annotations_artifact_passing.md @@ -93,7 +93,7 @@ This example will reuse the outputs volume across script steps. - -m - hera.workflows.runner - -e - - examples.workflows.script_annotations_artifact_passing:output_artifact + - examples.workflows.experimental.script_annotations_artifact_passing:output_artifact command: - python env: @@ -113,7 +113,7 @@ This example will reuse the outputs volume across script steps. - -m - hera.workflows.runner - -e - - examples.workflows.script_annotations_artifact_passing:use_artifact + - examples.workflows.experimental.script_annotations_artifact_passing:use_artifact command: - python env: diff --git a/docs/examples/workflows/script_annotations_inputs.md b/docs/examples/workflows/experimental/script_annotations_inputs.md similarity index 96% rename from docs/examples/workflows/script_annotations_inputs.md rename to docs/examples/workflows/experimental/script_annotations_inputs.md index e6ee13f01..1f1936490 100644 --- a/docs/examples/workflows/script_annotations_inputs.md +++ b/docs/examples/workflows/experimental/script_annotations_inputs.md @@ -105,7 +105,7 @@ - -m - hera.workflows.runner - -e - - examples.workflows.script_annotations_inputs:output_dict_artifact + - examples.workflows.experimental.script_annotations_inputs:output_dict_artifact command: - python env: @@ -137,7 +137,7 @@ - -m - hera.workflows.runner - -e - - examples.workflows.script_annotations_inputs:echo_all + - examples.workflows.experimental.script_annotations_inputs:echo_all command: - python env: diff --git a/docs/examples/workflows/script_annotations_outputs.md b/docs/examples/workflows/experimental/script_annotations_outputs.md similarity index 95% rename from docs/examples/workflows/script_annotations_outputs.md rename to docs/examples/workflows/experimental/script_annotations_outputs.md index 0424093d7..affe50467 100644 --- a/docs/examples/workflows/script_annotations_outputs.md +++ b/docs/examples/workflows/experimental/script_annotations_outputs.md @@ -80,7 +80,7 @@ - -m - hera.workflows.runner - -e - - examples.workflows.script_annotations_outputs:script_param_artifact_in_function_signature_and_return_type + - examples.workflows.experimental.script_annotations_outputs:script_param_artifact_in_function_signature_and_return_type command: - python env: diff --git a/docs/examples/workflows/dynamic_fanout.md b/docs/examples/workflows/loops/dynamic_fanout.md similarity index 100% rename from docs/examples/workflows/dynamic_fanout.md rename to docs/examples/workflows/loops/dynamic_fanout.md diff --git a/docs/examples/workflows/dynamic_fanout_container.md b/docs/examples/workflows/loops/dynamic_fanout_container.md similarity index 100% rename from docs/examples/workflows/dynamic_fanout_container.md rename to docs/examples/workflows/loops/dynamic_fanout_container.md diff --git a/docs/examples/workflows/dynamic_fanout_extra_kwargs.md b/docs/examples/workflows/loops/dynamic_fanout_extra_kwargs.md similarity index 100% rename from docs/examples/workflows/dynamic_fanout_extra_kwargs.md rename to docs/examples/workflows/loops/dynamic_fanout_extra_kwargs.md diff --git a/docs/examples/workflows/dynamic_fanout_fanin.md b/docs/examples/workflows/loops/dynamic_fanout_fanin.md similarity index 100% rename from docs/examples/workflows/dynamic_fanout_fanin.md rename to docs/examples/workflows/loops/dynamic_fanout_fanin.md diff --git a/docs/examples/workflows/dynamic_fanout_json_payload.md b/docs/examples/workflows/loops/dynamic_fanout_json_payload.md similarity index 100% rename from docs/examples/workflows/dynamic_fanout_json_payload.md rename to docs/examples/workflows/loops/dynamic_fanout_json_payload.md diff --git a/docs/examples/workflows/script_loops_maps.md b/docs/examples/workflows/loops/script_loops_maps.md similarity index 100% rename from docs/examples/workflows/script_loops_maps.md rename to docs/examples/workflows/loops/script_loops_maps.md diff --git a/docs/examples/workflows/with_sequence.md b/docs/examples/workflows/loops/with_sequence.md similarity index 100% rename from docs/examples/workflows/with_sequence.md rename to docs/examples/workflows/loops/with_sequence.md diff --git a/docs/examples/workflows/callable_script.md b/docs/examples/workflows/scripts/callable_script.md similarity index 95% rename from docs/examples/workflows/callable_script.md rename to docs/examples/workflows/scripts/callable_script.md index 66b261221..6b5f9a5f8 100644 --- a/docs/examples/workflows/callable_script.md +++ b/docs/examples/workflows/scripts/callable_script.md @@ -157,7 +157,7 @@ - -m - hera.workflows.runner - -e - - examples.workflows.callable_script:my_function + - examples.workflows.scripts.callable_script:my_function command: - python env: @@ -174,7 +174,7 @@ - -m - hera.workflows.runner - -e - - examples.workflows.callable_script:str_function + - examples.workflows.scripts.callable_script:str_function command: - python env: @@ -191,7 +191,7 @@ - -m - hera.workflows.runner - -e - - examples.workflows.callable_script:another_function + - examples.workflows.scripts.callable_script:another_function command: - python env: @@ -213,7 +213,7 @@ - -m - hera.workflows.runner - -e - - examples.workflows.callable_script:function_kebab + - examples.workflows.scripts.callable_script:function_kebab command: - python env: @@ -230,7 +230,7 @@ - -m - hera.workflows.runner - -e - - examples.workflows.callable_script:function_kebab_object + - examples.workflows.scripts.callable_script:function_kebab_object command: - python env: diff --git a/docs/examples/workflows/coinflip.md b/docs/examples/workflows/scripts/coinflip.md similarity index 100% rename from docs/examples/workflows/coinflip.md rename to docs/examples/workflows/scripts/coinflip.md diff --git a/docs/examples/workflows/default_param_overwrite.md b/docs/examples/workflows/scripts/default_param_overwrite.md similarity index 100% rename from docs/examples/workflows/default_param_overwrite.md rename to docs/examples/workflows/scripts/default_param_overwrite.md diff --git a/docs/examples/workflows/script_artifact_passing.md b/docs/examples/workflows/scripts/script_artifact_passing.md similarity index 100% rename from docs/examples/workflows/script_artifact_passing.md rename to docs/examples/workflows/scripts/script_artifact_passing.md diff --git a/docs/examples/workflows/script_auto_infer.md b/docs/examples/workflows/scripts/script_auto_infer.md similarity index 100% rename from docs/examples/workflows/script_auto_infer.md rename to docs/examples/workflows/scripts/script_auto_infer.md diff --git a/docs/examples/workflows/script_variations.md b/docs/examples/workflows/scripts/script_variations.md similarity index 100% rename from docs/examples/workflows/script_variations.md rename to docs/examples/workflows/scripts/script_variations.md diff --git a/docs/examples/workflows/script_with_default_params.md b/docs/examples/workflows/scripts/script_with_default_params.md similarity index 100% rename from docs/examples/workflows/script_with_default_params.md rename to docs/examples/workflows/scripts/script_with_default_params.md diff --git a/docs/examples/workflows/script_with_image_pull_policy.md b/docs/examples/workflows/scripts/script_with_image_pull_policy.md similarity index 100% rename from docs/examples/workflows/script_with_image_pull_policy.md rename to docs/examples/workflows/scripts/script_with_image_pull_policy.md diff --git a/docs/examples/workflows/script_with_resources.md b/docs/examples/workflows/scripts/script_with_resources.md similarity index 100% rename from docs/examples/workflows/script_with_resources.md rename to docs/examples/workflows/scripts/script_with_resources.md diff --git a/docs/examples/workflows/callable_steps.md b/docs/examples/workflows/steps/callable_steps.md similarity index 100% rename from docs/examples/workflows/callable_steps.md rename to docs/examples/workflows/steps/callable_steps.md diff --git a/docs/examples/workflows/steps_types.md b/docs/examples/workflows/steps/steps_types.md similarity index 100% rename from docs/examples/workflows/steps_types.md rename to docs/examples/workflows/steps/steps_types.md diff --git a/docs/examples/workflows/steps_with_callable_container.md b/docs/examples/workflows/steps/steps_with_callable_container.md similarity index 100% rename from docs/examples/workflows/steps_with_callable_container.md rename to docs/examples/workflows/steps/steps_with_callable_container.md diff --git a/docs/examples/workflows/upstream/archive_location.md b/docs/examples/workflows/upstream/archive_location.md index 0a36fcec7..6f478bbeb 100644 --- a/docs/examples/workflows/upstream/archive_location.md +++ b/docs/examples/workflows/upstream/archive_location.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/archive-location.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/archive-location.yaml). diff --git a/docs/examples/workflows/upstream/arguments_artifacts.md b/docs/examples/workflows/upstream/arguments_artifacts.md index ae04d97dd..d4e98fac7 100644 --- a/docs/examples/workflows/upstream/arguments_artifacts.md +++ b/docs/examples/workflows/upstream/arguments_artifacts.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/arguments-artifacts.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/arguments-artifacts.yaml). diff --git a/docs/examples/workflows/upstream/arguments_parameters.md b/docs/examples/workflows/upstream/arguments_parameters.md index e26aece3d..38fd4d9cc 100644 --- a/docs/examples/workflows/upstream/arguments_parameters.md +++ b/docs/examples/workflows/upstream/arguments_parameters.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/arguments-parameters.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/arguments-parameters.yaml). diff --git a/docs/examples/workflows/upstream/arguments_parameters_from_configmap.md b/docs/examples/workflows/upstream/arguments_parameters_from_configmap.md index b3300e582..164359b73 100644 --- a/docs/examples/workflows/upstream/arguments_parameters_from_configmap.md +++ b/docs/examples/workflows/upstream/arguments_parameters_from_configmap.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/arguments-parameters-from-configmap.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/arguments-parameters-from-configmap.yaml). diff --git a/docs/examples/workflows/upstream/artifact_disable_archive.md b/docs/examples/workflows/upstream/artifact_disable_archive.md index 1c84e49d6..a749cff39 100644 --- a/docs/examples/workflows/upstream/artifact_disable_archive.md +++ b/docs/examples/workflows/upstream/artifact_disable_archive.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/artifact-disable-archive.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/artifact-disable-archive.yaml). diff --git a/docs/examples/workflows/upstream/artifact_gc_workflow.md b/docs/examples/workflows/upstream/artifact_gc_workflow.md index 78946d409..92324c9f5 100644 --- a/docs/examples/workflows/upstream/artifact_gc_workflow.md +++ b/docs/examples/workflows/upstream/artifact_gc_workflow.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/artifact-gc-workflow.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/artifact-gc-workflow.yaml). diff --git a/docs/examples/workflows/upstream/artifact_passing.md b/docs/examples/workflows/upstream/artifact_passing.md index d7161d704..0ff23558a 100644 --- a/docs/examples/workflows/upstream/artifact_passing.md +++ b/docs/examples/workflows/upstream/artifact_passing.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/artifact-passing.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/artifact-passing.yaml). diff --git a/docs/examples/workflows/upstream/artifact_passing_subpath.md b/docs/examples/workflows/upstream/artifact_passing_subpath.md index 0087191b3..b4675e983 100644 --- a/docs/examples/workflows/upstream/artifact_passing_subpath.md +++ b/docs/examples/workflows/upstream/artifact_passing_subpath.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/artifact-passing-subpath.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/artifact-passing-subpath.yaml). diff --git a/docs/examples/workflows/upstream/artifact_path_placeholders.md b/docs/examples/workflows/upstream/artifact_path_placeholders.md index 80715e5c4..c9dd1f680 100644 --- a/docs/examples/workflows/upstream/artifact_path_placeholders.md +++ b/docs/examples/workflows/upstream/artifact_path_placeholders.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/artifact-path-placeholders.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/artifact-path-placeholders.yaml). diff --git a/docs/examples/workflows/upstream/artifact_repository_ref.md b/docs/examples/workflows/upstream/artifact_repository_ref.md index 56b6efac9..18d0530ad 100644 --- a/docs/examples/workflows/upstream/artifact_repository_ref.md +++ b/docs/examples/workflows/upstream/artifact_repository_ref.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/artifact-repository-ref.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/artifact-repository-ref.yaml). diff --git a/docs/examples/workflows/upstream/artifactory_artifact.md b/docs/examples/workflows/upstream/artifactory_artifact.md index 34e21a782..04a5b4b50 100644 --- a/docs/examples/workflows/upstream/artifactory_artifact.md +++ b/docs/examples/workflows/upstream/artifactory_artifact.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/artifactory-artifact.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/artifactory-artifact.yaml). diff --git a/docs/examples/workflows/upstream/ci_output_artifact.md b/docs/examples/workflows/upstream/ci_output_artifact.md index bb9d7820d..688168c89 100644 --- a/docs/examples/workflows/upstream/ci_output_artifact.md +++ b/docs/examples/workflows/upstream/ci_output_artifact.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/ci-output-artifact.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/ci-output-artifact.yaml). diff --git a/docs/examples/workflows/upstream/ci_workflowtemplate.md b/docs/examples/workflows/upstream/ci_workflowtemplate.md index 93eed2ef7..e987111a8 100644 --- a/docs/examples/workflows/upstream/ci_workflowtemplate.md +++ b/docs/examples/workflows/upstream/ci_workflowtemplate.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/ci-workflowtemplate.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/ci-workflowtemplate.yaml). diff --git a/docs/examples/workflows/upstream/cluster_workflow_template__cluster_wftmpl_dag.md b/docs/examples/workflows/upstream/cluster_workflow_template__cluster_wftmpl_dag.md index 61405da0f..70ec61d99 100644 --- a/docs/examples/workflows/upstream/cluster_workflow_template__cluster_wftmpl_dag.md +++ b/docs/examples/workflows/upstream/cluster_workflow_template__cluster_wftmpl_dag.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/cluster-workflow-template/cluster-wftmpl-dag.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/cluster-workflow-template/cluster-wftmpl-dag.yaml). diff --git a/docs/examples/workflows/upstream/cluster_workflow_template__mixed_cluster_namespaced_wftmpl_steps.md b/docs/examples/workflows/upstream/cluster_workflow_template__mixed_cluster_namespaced_wftmpl_steps.md index fa767a1f4..5376fdeac 100644 --- a/docs/examples/workflows/upstream/cluster_workflow_template__mixed_cluster_namespaced_wftmpl_steps.md +++ b/docs/examples/workflows/upstream/cluster_workflow_template__mixed_cluster_namespaced_wftmpl_steps.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/cluster-workflow-template/mixed-cluster-namespaced-wftmpl-steps.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/cluster-workflow-template/mixed-cluster-namespaced-wftmpl-steps.yaml). diff --git a/docs/examples/workflows/upstream/cluster_workflow_template__workflow_template_ref.md b/docs/examples/workflows/upstream/cluster_workflow_template__workflow_template_ref.md index 80ccab588..874a9373d 100644 --- a/docs/examples/workflows/upstream/cluster_workflow_template__workflow_template_ref.md +++ b/docs/examples/workflows/upstream/cluster_workflow_template__workflow_template_ref.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/cluster-workflow-template/workflow-template-ref.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/cluster-workflow-template/workflow-template-ref.yaml). diff --git a/docs/examples/workflows/upstream/cluster_workflow_template__workflow_template_ref_with_entrypoint_arg_passing.md b/docs/examples/workflows/upstream/cluster_workflow_template__workflow_template_ref_with_entrypoint_arg_passing.md index 6344e4b0d..615c51a1f 100644 --- a/docs/examples/workflows/upstream/cluster_workflow_template__workflow_template_ref_with_entrypoint_arg_passing.md +++ b/docs/examples/workflows/upstream/cluster_workflow_template__workflow_template_ref_with_entrypoint_arg_passing.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/cluster-workflow-template/workflow-template-ref-with-entrypoint-arg-passing.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/cluster-workflow-template/workflow-template-ref-with-entrypoint-arg-passing.yaml). diff --git a/docs/examples/workflows/upstream/coinflip.md b/docs/examples/workflows/upstream/coinflip.md index 94978deb2..35bb0142a 100644 --- a/docs/examples/workflows/upstream/coinflip.md +++ b/docs/examples/workflows/upstream/coinflip.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/coinflip.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/coinflip.yaml). diff --git a/docs/examples/workflows/upstream/coinflip_recursive.md b/docs/examples/workflows/upstream/coinflip_recursive.md index 7ad9ad37e..85b2570a6 100644 --- a/docs/examples/workflows/upstream/coinflip_recursive.md +++ b/docs/examples/workflows/upstream/coinflip_recursive.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/coinflip-recursive.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/coinflip-recursive.yaml). diff --git a/docs/examples/workflows/upstream/colored_logs.md b/docs/examples/workflows/upstream/colored_logs.md index a5e6e9e0f..5784e634e 100644 --- a/docs/examples/workflows/upstream/colored_logs.md +++ b/docs/examples/workflows/upstream/colored_logs.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/colored-logs.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/colored-logs.yaml). diff --git a/docs/examples/workflows/upstream/conditional_artifacts.md b/docs/examples/workflows/upstream/conditional_artifacts.md index 3ffc3380e..ae7f00491 100644 --- a/docs/examples/workflows/upstream/conditional_artifacts.md +++ b/docs/examples/workflows/upstream/conditional_artifacts.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/conditional-artifacts.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/conditional-artifacts.yaml). diff --git a/docs/examples/workflows/upstream/container_set_template__graph_workflow.md b/docs/examples/workflows/upstream/container_set_template__graph_workflow.md index c5c429f02..190612b7a 100644 --- a/docs/examples/workflows/upstream/container_set_template__graph_workflow.md +++ b/docs/examples/workflows/upstream/container_set_template__graph_workflow.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/container-set-template/graph-workflow.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/container-set-template/graph-workflow.yaml). diff --git a/docs/examples/workflows/upstream/container_set_template__outputs_result_workflow.md b/docs/examples/workflows/upstream/container_set_template__outputs_result_workflow.md index d8c9e8e8b..104840877 100644 --- a/docs/examples/workflows/upstream/container_set_template__outputs_result_workflow.md +++ b/docs/examples/workflows/upstream/container_set_template__outputs_result_workflow.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/container-set-template/outputs-result-workflow.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/container-set-template/outputs-result-workflow.yaml). diff --git a/docs/examples/workflows/upstream/container_set_template__parallel_workflow.md b/docs/examples/workflows/upstream/container_set_template__parallel_workflow.md index f94d6373a..6b1dbeeb6 100644 --- a/docs/examples/workflows/upstream/container_set_template__parallel_workflow.md +++ b/docs/examples/workflows/upstream/container_set_template__parallel_workflow.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/container-set-template/parallel-workflow.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/container-set-template/parallel-workflow.yaml). diff --git a/docs/examples/workflows/upstream/container_set_template__sequence_workflow.md b/docs/examples/workflows/upstream/container_set_template__sequence_workflow.md index 5d54c6362..2dbdcaa30 100644 --- a/docs/examples/workflows/upstream/container_set_template__sequence_workflow.md +++ b/docs/examples/workflows/upstream/container_set_template__sequence_workflow.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/container-set-template/sequence-workflow.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/container-set-template/sequence-workflow.yaml). diff --git a/docs/examples/workflows/upstream/container_set_template__workspace_workflow.md b/docs/examples/workflows/upstream/container_set_template__workspace_workflow.md index 013f2ad7f..0dbe55b81 100644 --- a/docs/examples/workflows/upstream/container_set_template__workspace_workflow.md +++ b/docs/examples/workflows/upstream/container_set_template__workspace_workflow.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/container-set-template/workspace-workflow.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/container-set-template/workspace-workflow.yaml). diff --git a/docs/examples/workflows/upstream/continue_on_fail.md b/docs/examples/workflows/upstream/continue_on_fail.md index bdae22fb3..717f80fd4 100644 --- a/docs/examples/workflows/upstream/continue_on_fail.md +++ b/docs/examples/workflows/upstream/continue_on_fail.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/continue-on-fail.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/continue-on-fail.yaml). diff --git a/docs/examples/workflows/upstream/cron_workflow.md b/docs/examples/workflows/upstream/cron_workflow.md index 3e64781d7..bd0d03e25 100644 --- a/docs/examples/workflows/upstream/cron_workflow.md +++ b/docs/examples/workflows/upstream/cron_workflow.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/cron-workflow.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/cron-workflow.yaml). diff --git a/docs/examples/workflows/upstream/custom_metrics.md b/docs/examples/workflows/upstream/custom_metrics.md index de308e1f1..81a9ee508 100644 --- a/docs/examples/workflows/upstream/custom_metrics.md +++ b/docs/examples/workflows/upstream/custom_metrics.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/custom-metrics.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/custom-metrics.yaml). diff --git a/docs/examples/workflows/upstream/daemon_nginx.md b/docs/examples/workflows/upstream/daemon_nginx.md index 707548854..b1e072dfe 100644 --- a/docs/examples/workflows/upstream/daemon_nginx.md +++ b/docs/examples/workflows/upstream/daemon_nginx.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/daemon-nginx.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/daemon-nginx.yaml). diff --git a/docs/examples/workflows/upstream/dag_conditional_parameters.md b/docs/examples/workflows/upstream/dag_conditional_parameters.md index fb8b1a9a6..bb62153e0 100644 --- a/docs/examples/workflows/upstream/dag_conditional_parameters.md +++ b/docs/examples/workflows/upstream/dag_conditional_parameters.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/dag-conditional-parameters.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/dag-conditional-parameters.yaml). diff --git a/docs/examples/workflows/upstream/dag_custom_metrics.md b/docs/examples/workflows/upstream/dag_custom_metrics.md index 6dca6dd1f..9ef1f6dea 100644 --- a/docs/examples/workflows/upstream/dag_custom_metrics.md +++ b/docs/examples/workflows/upstream/dag_custom_metrics.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/dag-custom-metrics.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/dag-custom-metrics.yaml). diff --git a/docs/examples/workflows/upstream/dag_diamond.md b/docs/examples/workflows/upstream/dag_diamond.md index ac477f063..eb731acb0 100644 --- a/docs/examples/workflows/upstream/dag_diamond.md +++ b/docs/examples/workflows/upstream/dag_diamond.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/dag-diamond.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/dag-diamond.yaml). diff --git a/docs/examples/workflows/upstream/dag_enhanced_depends.md b/docs/examples/workflows/upstream/dag_enhanced_depends.md index 6edd3b43e..4b974427b 100644 --- a/docs/examples/workflows/upstream/dag_enhanced_depends.md +++ b/docs/examples/workflows/upstream/dag_enhanced_depends.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/dag-enhanced-depends.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/dag-enhanced-depends.yaml). diff --git a/docs/examples/workflows/upstream/dag_inline_workflowtemplate.md b/docs/examples/workflows/upstream/dag_inline_workflowtemplate.md index 96fb41eaa..2abec3b10 100644 --- a/docs/examples/workflows/upstream/dag_inline_workflowtemplate.md +++ b/docs/examples/workflows/upstream/dag_inline_workflowtemplate.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/dag-inline-workflowtemplate.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/dag-inline-workflowtemplate.yaml). diff --git a/docs/examples/workflows/upstream/dag_nested.md b/docs/examples/workflows/upstream/dag_nested.md index 3ad108cd5..1e4c9eb1f 100644 --- a/docs/examples/workflows/upstream/dag_nested.md +++ b/docs/examples/workflows/upstream/dag_nested.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/dag-nested.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/dag-nested.yaml). diff --git a/docs/examples/workflows/upstream/dag_targets.md b/docs/examples/workflows/upstream/dag_targets.md index 3cfed5c70..f13662ec2 100644 --- a/docs/examples/workflows/upstream/dag_targets.md +++ b/docs/examples/workflows/upstream/dag_targets.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/dag-targets.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/dag-targets.yaml). diff --git a/docs/examples/workflows/upstream/dag_task_level_timeout.md b/docs/examples/workflows/upstream/dag_task_level_timeout.md index 55c0fbf6a..3fa43570c 100644 --- a/docs/examples/workflows/upstream/dag_task_level_timeout.md +++ b/docs/examples/workflows/upstream/dag_task_level_timeout.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/dag-task-level-timeout.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/dag-task-level-timeout.yaml). diff --git a/docs/examples/workflows/upstream/default_pdb_support.md b/docs/examples/workflows/upstream/default_pdb_support.md index ce4ebc6c0..98edda42d 100644 --- a/docs/examples/workflows/upstream/default_pdb_support.md +++ b/docs/examples/workflows/upstream/default_pdb_support.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/default-pdb-support.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/default-pdb-support.yaml). diff --git a/docs/examples/workflows/upstream/exit_handler_step_level.md b/docs/examples/workflows/upstream/exit_handler_step_level.md index abef728a0..9de27b5ad 100644 --- a/docs/examples/workflows/upstream/exit_handler_step_level.md +++ b/docs/examples/workflows/upstream/exit_handler_step_level.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/exit-handler-step-level.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/exit-handler-step-level.yaml). diff --git a/docs/examples/workflows/upstream/exit_handler_with_artifacts.md b/docs/examples/workflows/upstream/exit_handler_with_artifacts.md index 3a6ad808f..0c6e6b933 100644 --- a/docs/examples/workflows/upstream/exit_handler_with_artifacts.md +++ b/docs/examples/workflows/upstream/exit_handler_with_artifacts.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/exit-handler-with-artifacts.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/exit-handler-with-artifacts.yaml). apiVersion: argoproj.io/v1alpha1 kind: Workflow diff --git a/docs/examples/workflows/upstream/forever.md b/docs/examples/workflows/upstream/forever.md index 15c2a8f89..214597f72 100644 --- a/docs/examples/workflows/upstream/forever.md +++ b/docs/examples/workflows/upstream/forever.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/forever.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/forever.yaml). diff --git a/docs/examples/workflows/upstream/global_parameters.md b/docs/examples/workflows/upstream/global_parameters.md index 417debc27..672356e0e 100644 --- a/docs/examples/workflows/upstream/global_parameters.md +++ b/docs/examples/workflows/upstream/global_parameters.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/global-parameters.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/global-parameters.yaml). diff --git a/docs/examples/workflows/upstream/global_parameters_from_configmap_referenced_as_local_variable.md b/docs/examples/workflows/upstream/global_parameters_from_configmap_referenced_as_local_variable.md index 9c4d14493..2cc6e2abb 100644 --- a/docs/examples/workflows/upstream/global_parameters_from_configmap_referenced_as_local_variable.md +++ b/docs/examples/workflows/upstream/global_parameters_from_configmap_referenced_as_local_variable.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/global-parameters-from-configmap-referenced-as-local-variable.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/global-parameters-from-configmap-referenced-as-local-variable.yaml). diff --git a/docs/examples/workflows/upstream/hdfs_artifact.md b/docs/examples/workflows/upstream/hdfs_artifact.md index b544eb9f0..20e1155ed 100644 --- a/docs/examples/workflows/upstream/hdfs_artifact.md +++ b/docs/examples/workflows/upstream/hdfs_artifact.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/hdfs-artifact.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/hdfs-artifact.yaml). diff --git a/docs/examples/workflows/upstream/image_pull_secrets.md b/docs/examples/workflows/upstream/image_pull_secrets.md index f3cfadb9f..45290d67b 100644 --- a/docs/examples/workflows/upstream/image_pull_secrets.md +++ b/docs/examples/workflows/upstream/image_pull_secrets.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/image-pull-secrets.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/image-pull-secrets.yaml). diff --git a/docs/examples/workflows/upstream/init_container.md b/docs/examples/workflows/upstream/init_container.md index 60e8eeed4..8b7b6de61 100644 --- a/docs/examples/workflows/upstream/init_container.md +++ b/docs/examples/workflows/upstream/init_container.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/init-container.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/init-container.yaml). diff --git a/docs/examples/workflows/upstream/input_artifact_azure.md b/docs/examples/workflows/upstream/input_artifact_azure.md index 0c1321a7d..376c77381 100644 --- a/docs/examples/workflows/upstream/input_artifact_azure.md +++ b/docs/examples/workflows/upstream/input_artifact_azure.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/input-artifact-azure.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/input-artifact-azure.yaml). diff --git a/docs/examples/workflows/upstream/input_artifact_gcs.md b/docs/examples/workflows/upstream/input_artifact_gcs.md index 9069fc01a..8bf8c406f 100644 --- a/docs/examples/workflows/upstream/input_artifact_gcs.md +++ b/docs/examples/workflows/upstream/input_artifact_gcs.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/input-artifact-gcs.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/input-artifact-gcs.yaml). diff --git a/docs/examples/workflows/upstream/input_artifact_git.md b/docs/examples/workflows/upstream/input_artifact_git.md index bcc578704..a12f1262d 100644 --- a/docs/examples/workflows/upstream/input_artifact_git.md +++ b/docs/examples/workflows/upstream/input_artifact_git.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/input-artifact-git.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/input-artifact-git.yaml). diff --git a/docs/examples/workflows/upstream/input_artifact_http.md b/docs/examples/workflows/upstream/input_artifact_http.md index ab7af2703..8dc3126d6 100644 --- a/docs/examples/workflows/upstream/input_artifact_http.md +++ b/docs/examples/workflows/upstream/input_artifact_http.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/input-artifact-http.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/input-artifact-http.yaml). diff --git a/docs/examples/workflows/upstream/input_artifact_oss.md b/docs/examples/workflows/upstream/input_artifact_oss.md index f39629f9a..577355479 100644 --- a/docs/examples/workflows/upstream/input_artifact_oss.md +++ b/docs/examples/workflows/upstream/input_artifact_oss.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/input-artifact-oss.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/input-artifact-oss.yaml). diff --git a/docs/examples/workflows/upstream/input_artifact_raw.md b/docs/examples/workflows/upstream/input_artifact_raw.md index 54941a3c5..c38692db2 100644 --- a/docs/examples/workflows/upstream/input_artifact_raw.md +++ b/docs/examples/workflows/upstream/input_artifact_raw.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/input-artifact-raw.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/input-artifact-raw.yaml). diff --git a/docs/examples/workflows/upstream/input_artifact_s3.md b/docs/examples/workflows/upstream/input_artifact_s3.md index 0076e402f..658c9e2d5 100644 --- a/docs/examples/workflows/upstream/input_artifact_s3.md +++ b/docs/examples/workflows/upstream/input_artifact_s3.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/input-artifact-s3.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/input-artifact-s3.yaml). diff --git a/docs/examples/workflows/upstream/k8s_json_patch_workflow.md b/docs/examples/workflows/upstream/k8s_json_patch_workflow.md index a5b53adac..350c017ad 100644 --- a/docs/examples/workflows/upstream/k8s_json_patch_workflow.md +++ b/docs/examples/workflows/upstream/k8s_json_patch_workflow.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/k8s-json-patch-workflow.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/k8s-json-patch-workflow.yaml). diff --git a/docs/examples/workflows/upstream/k8s_resource_log_selector.md b/docs/examples/workflows/upstream/k8s_resource_log_selector.md index 42153ae27..255d4c1b5 100644 --- a/docs/examples/workflows/upstream/k8s_resource_log_selector.md +++ b/docs/examples/workflows/upstream/k8s_resource_log_selector.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/k8s-resource-log-selector.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/k8s-resource-log-selector.yaml). diff --git a/docs/examples/workflows/upstream/k8s_set_owner_reference.md b/docs/examples/workflows/upstream/k8s_set_owner_reference.md index 4607a9c23..6bb72ca4a 100644 --- a/docs/examples/workflows/upstream/k8s_set_owner_reference.md +++ b/docs/examples/workflows/upstream/k8s_set_owner_reference.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/k8s-set-owner-reference.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/k8s-set-owner-reference.yaml). diff --git a/docs/examples/workflows/upstream/key_only_artifact.md b/docs/examples/workflows/upstream/key_only_artifact.md index eaaf639e1..081ce8e16 100644 --- a/docs/examples/workflows/upstream/key_only_artifact.md +++ b/docs/examples/workflows/upstream/key_only_artifact.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/key-only-artifact.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/key-only-artifact.yaml). diff --git a/docs/examples/workflows/upstream/life_cycle_hooks_tmpl_level.md b/docs/examples/workflows/upstream/life_cycle_hooks_tmpl_level.md index 2e6ced83b..8023f9e07 100644 --- a/docs/examples/workflows/upstream/life_cycle_hooks_tmpl_level.md +++ b/docs/examples/workflows/upstream/life_cycle_hooks_tmpl_level.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/life-cycle-hooks-tmpl-level.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/life-cycle-hooks-tmpl-level.yaml). diff --git a/docs/examples/workflows/upstream/life_cycle_hooks_wf_level.md b/docs/examples/workflows/upstream/life_cycle_hooks_wf_level.md index 19b947413..41a9aa9bc 100644 --- a/docs/examples/workflows/upstream/life_cycle_hooks_wf_level.md +++ b/docs/examples/workflows/upstream/life_cycle_hooks_wf_level.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/life-cycle-hooks-wf-level.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/life-cycle-hooks-wf-level.yaml). diff --git a/docs/examples/workflows/upstream/loops.md b/docs/examples/workflows/upstream/loops.md index d761a1d20..b43c4ee18 100644 --- a/docs/examples/workflows/upstream/loops.md +++ b/docs/examples/workflows/upstream/loops.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/loops.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/loops.yaml). diff --git a/docs/examples/workflows/upstream/loops_arbitrary_sequential_steps.md b/docs/examples/workflows/upstream/loops_arbitrary_sequential_steps.md index 62e454523..462508371 100644 --- a/docs/examples/workflows/upstream/loops_arbitrary_sequential_steps.md +++ b/docs/examples/workflows/upstream/loops_arbitrary_sequential_steps.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/loops-arbitrary-sequential-steps.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/loops-arbitrary-sequential-steps.yaml). diff --git a/docs/examples/workflows/upstream/loops_dag.md b/docs/examples/workflows/upstream/loops_dag.md index ee81aeeef..f0fb91fc6 100644 --- a/docs/examples/workflows/upstream/loops_dag.md +++ b/docs/examples/workflows/upstream/loops_dag.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/loops-dag.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/loops-dag.yaml). diff --git a/docs/examples/workflows/upstream/loops_maps.md b/docs/examples/workflows/upstream/loops_maps.md index 47c109e23..3e60adf8b 100644 --- a/docs/examples/workflows/upstream/loops_maps.md +++ b/docs/examples/workflows/upstream/loops_maps.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/loops-maps.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/loops-maps.yaml). diff --git a/docs/examples/workflows/upstream/loops_param_result.md b/docs/examples/workflows/upstream/loops_param_result.md index 6c29aae81..6b5e24ecb 100644 --- a/docs/examples/workflows/upstream/loops_param_result.md +++ b/docs/examples/workflows/upstream/loops_param_result.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/loops-param-result.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/loops-param-result.yaml). diff --git a/docs/examples/workflows/upstream/node_selector.md b/docs/examples/workflows/upstream/node_selector.md index 5e75124cb..8030144cc 100644 --- a/docs/examples/workflows/upstream/node_selector.md +++ b/docs/examples/workflows/upstream/node_selector.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/node-selector.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/node-selector.yaml). diff --git a/docs/examples/workflows/upstream/output_artifact_azure.md b/docs/examples/workflows/upstream/output_artifact_azure.md index f6d8c2b99..6374eb387 100644 --- a/docs/examples/workflows/upstream/output_artifact_azure.md +++ b/docs/examples/workflows/upstream/output_artifact_azure.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/output-artifact-azure.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/output-artifact-azure.yaml). diff --git a/docs/examples/workflows/upstream/output_artifact_gcs.md b/docs/examples/workflows/upstream/output_artifact_gcs.md index 96e4de455..228638bfc 100644 --- a/docs/examples/workflows/upstream/output_artifact_gcs.md +++ b/docs/examples/workflows/upstream/output_artifact_gcs.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/output-artifact-gcs.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/output-artifact-gcs.yaml). diff --git a/docs/examples/workflows/upstream/output_artifact_s3.md b/docs/examples/workflows/upstream/output_artifact_s3.md index 1ac8bf2e0..3d6d2a6b4 100644 --- a/docs/examples/workflows/upstream/output_artifact_s3.md +++ b/docs/examples/workflows/upstream/output_artifact_s3.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/output-artifact-s3.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/output-artifact-s3.yaml). diff --git a/docs/examples/workflows/upstream/output_parameter.md b/docs/examples/workflows/upstream/output_parameter.md index 3e8e6a53b..f506c28ca 100644 --- a/docs/examples/workflows/upstream/output_parameter.md +++ b/docs/examples/workflows/upstream/output_parameter.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/output-parameter.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/output-parameter.yaml). diff --git a/docs/examples/workflows/upstream/parallelism_limit.md b/docs/examples/workflows/upstream/parallelism_limit.md index 01dcf54c4..4fb13fb22 100644 --- a/docs/examples/workflows/upstream/parallelism_limit.md +++ b/docs/examples/workflows/upstream/parallelism_limit.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/parallelism-limit.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/parallelism-limit.yaml). diff --git a/docs/examples/workflows/upstream/parallelism_nested.md b/docs/examples/workflows/upstream/parallelism_nested.md index 8207920f3..910983a85 100644 --- a/docs/examples/workflows/upstream/parallelism_nested.md +++ b/docs/examples/workflows/upstream/parallelism_nested.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/parallelism-nested.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/parallelism-nested.yaml). diff --git a/docs/examples/workflows/upstream/parallelism_nested_dag.md b/docs/examples/workflows/upstream/parallelism_nested_dag.md index 1d4458797..00be72f81 100644 --- a/docs/examples/workflows/upstream/parallelism_nested_dag.md +++ b/docs/examples/workflows/upstream/parallelism_nested_dag.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/parallelism-nested-dag.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/parallelism-nested-dag.yaml). diff --git a/docs/examples/workflows/upstream/parallelism_template_limit.md b/docs/examples/workflows/upstream/parallelism_template_limit.md index a54a1c29f..81b973673 100644 --- a/docs/examples/workflows/upstream/parallelism_template_limit.md +++ b/docs/examples/workflows/upstream/parallelism_template_limit.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/parallelism-template-limit.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/parallelism-template-limit.yaml). diff --git a/docs/examples/workflows/upstream/pod_spec_patch_wf_tmpl.md b/docs/examples/workflows/upstream/pod_spec_patch_wf_tmpl.md index df6b4efe1..dcf250f30 100644 --- a/docs/examples/workflows/upstream/pod_spec_patch_wf_tmpl.md +++ b/docs/examples/workflows/upstream/pod_spec_patch_wf_tmpl.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/pod-spec-patch-wf-tmpl.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/pod-spec-patch-wf-tmpl.yaml). diff --git a/docs/examples/workflows/upstream/resource_delete_with_flags.md b/docs/examples/workflows/upstream/resource_delete_with_flags.md index dbb2e641e..39cd2ff0c 100644 --- a/docs/examples/workflows/upstream/resource_delete_with_flags.md +++ b/docs/examples/workflows/upstream/resource_delete_with_flags.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/resource-delete-with-flags.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/resource-delete-with-flags.yaml). diff --git a/docs/examples/workflows/upstream/retry_backoff.md b/docs/examples/workflows/upstream/retry_backoff.md index 1b825b5f0..0c200c33f 100644 --- a/docs/examples/workflows/upstream/retry_backoff.md +++ b/docs/examples/workflows/upstream/retry_backoff.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/retry-backoff.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/retry-backoff.yaml). # This example demonstrates the use of retry back offs apiVersion: argoproj.io/v1alpha1 diff --git a/docs/examples/workflows/upstream/retry_container.md b/docs/examples/workflows/upstream/retry_container.md index 709d6ba07..7ffd227d4 100644 --- a/docs/examples/workflows/upstream/retry_container.md +++ b/docs/examples/workflows/upstream/retry_container.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/retry-container.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/retry-container.yaml). diff --git a/docs/examples/workflows/upstream/retry_script.md b/docs/examples/workflows/upstream/retry_script.md index 7e0d44f36..1b9c42619 100644 --- a/docs/examples/workflows/upstream/retry_script.md +++ b/docs/examples/workflows/upstream/retry_script.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/retry-script.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/retry-script.yaml). diff --git a/docs/examples/workflows/upstream/sidecar.md b/docs/examples/workflows/upstream/sidecar.md index 602c61652..3e35ba60e 100644 --- a/docs/examples/workflows/upstream/sidecar.md +++ b/docs/examples/workflows/upstream/sidecar.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/sidecar.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/sidecar.yaml). This example showcases how one can run a sidecar container with Hera diff --git a/docs/examples/workflows/upstream/sidecar_dind.md b/docs/examples/workflows/upstream/sidecar_dind.md index 30379745d..13017673d 100644 --- a/docs/examples/workflows/upstream/sidecar_dind.md +++ b/docs/examples/workflows/upstream/sidecar_dind.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/sidecar-dind.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/sidecar-dind.yaml). This example showcases how one can run Docker in Docker with a sidecar container with Hera diff --git a/docs/examples/workflows/upstream/sidecar_nginx.md b/docs/examples/workflows/upstream/sidecar_nginx.md index b907438ea..14f121cde 100644 --- a/docs/examples/workflows/upstream/sidecar_nginx.md +++ b/docs/examples/workflows/upstream/sidecar_nginx.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/sidecar-nginx.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/sidecar-nginx.yaml). This example showcases how one can run an Nginx sidecar container with Hera diff --git a/docs/examples/workflows/upstream/steps.md b/docs/examples/workflows/upstream/steps.md index fecb9d5a1..9f686f60e 100644 --- a/docs/examples/workflows/upstream/steps.md +++ b/docs/examples/workflows/upstream/steps.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/steps.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/steps.yaml). diff --git a/docs/examples/workflows/upstream/steps_inline_workflow.md b/docs/examples/workflows/upstream/steps_inline_workflow.md index 3bb0e7191..970f2ec1e 100644 --- a/docs/examples/workflows/upstream/steps_inline_workflow.md +++ b/docs/examples/workflows/upstream/steps_inline_workflow.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/steps-inline-workflow.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/steps-inline-workflow.yaml). diff --git a/docs/examples/workflows/upstream/suspend_template.md b/docs/examples/workflows/upstream/suspend_template.md index 2e03ee3e2..d3a6c44b4 100644 --- a/docs/examples/workflows/upstream/suspend_template.md +++ b/docs/examples/workflows/upstream/suspend_template.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/suspend-template.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/suspend-template.yaml). diff --git a/docs/examples/workflows/upstream/suspend_template_outputs.md b/docs/examples/workflows/upstream/suspend_template_outputs.md index d0ca77f1b..4a5d3e40a 100644 --- a/docs/examples/workflows/upstream/suspend_template_outputs.md +++ b/docs/examples/workflows/upstream/suspend_template_outputs.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/suspend-template-outputs.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/suspend-template-outputs.yaml). diff --git a/docs/examples/workflows/upstream/synchronization_mutex_tmpl_level.md b/docs/examples/workflows/upstream/synchronization_mutex_tmpl_level.md index b2fc5d751..55e68b003 100644 --- a/docs/examples/workflows/upstream/synchronization_mutex_tmpl_level.md +++ b/docs/examples/workflows/upstream/synchronization_mutex_tmpl_level.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/synchronization-mutex-tmpl-level.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/synchronization-mutex-tmpl-level.yaml). diff --git a/docs/examples/workflows/upstream/synchronization_tmpl_level.md b/docs/examples/workflows/upstream/synchronization_tmpl_level.md index 1eaec76ae..ef8865363 100644 --- a/docs/examples/workflows/upstream/synchronization_tmpl_level.md +++ b/docs/examples/workflows/upstream/synchronization_tmpl_level.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/synchronization-tmpl-level.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/synchronization-tmpl-level.yaml). diff --git a/docs/examples/workflows/upstream/synchronization_wf_level.md b/docs/examples/workflows/upstream/synchronization_wf_level.md index 318ac9c62..f55b2993e 100644 --- a/docs/examples/workflows/upstream/synchronization_wf_level.md +++ b/docs/examples/workflows/upstream/synchronization_wf_level.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/synchronization-wf-level.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/synchronization-wf-level.yaml). diff --git a/docs/examples/workflows/upstream/template_on_exit.md b/docs/examples/workflows/upstream/template_on_exit.md index 9f0296cd6..c43e9d260 100644 --- a/docs/examples/workflows/upstream/template_on_exit.md +++ b/docs/examples/workflows/upstream/template_on_exit.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/template-on-exit.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/template-on-exit.yaml). diff --git a/docs/examples/workflows/upstream/timeouts_workflow.md b/docs/examples/workflows/upstream/timeouts_workflow.md index a3f73740c..31bb8a948 100644 --- a/docs/examples/workflows/upstream/timeouts_workflow.md +++ b/docs/examples/workflows/upstream/timeouts_workflow.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/timeouts-workflow.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/timeouts-workflow.yaml). diff --git a/docs/examples/workflows/upstream/volumes_emptydir.md b/docs/examples/workflows/upstream/volumes_emptydir.md index 5d02a50e2..a71e6d841 100644 --- a/docs/examples/workflows/upstream/volumes_emptydir.md +++ b/docs/examples/workflows/upstream/volumes_emptydir.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/volumes-emptydir.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/volumes-emptydir.yaml). diff --git a/docs/examples/workflows/upstream/volumes_existing.md b/docs/examples/workflows/upstream/volumes_existing.md index 09c7d0bdc..087ada36c 100644 --- a/docs/examples/workflows/upstream/volumes_existing.md +++ b/docs/examples/workflows/upstream/volumes_existing.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/volumes-existing.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/volumes-existing.yaml). diff --git a/docs/examples/workflows/upstream/volumes_pvc.md b/docs/examples/workflows/upstream/volumes_pvc.md index a1d7f1be1..3ded8c387 100644 --- a/docs/examples/workflows/upstream/volumes_pvc.md +++ b/docs/examples/workflows/upstream/volumes_pvc.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/volumes-pvc.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/volumes-pvc.yaml). diff --git a/docs/examples/workflows/upstream/webhdfs_input_output_artifacts.md b/docs/examples/workflows/upstream/webhdfs_input_output_artifacts.md index 41f541931..2b5a25d7b 100644 --- a/docs/examples/workflows/upstream/webhdfs_input_output_artifacts.md +++ b/docs/examples/workflows/upstream/webhdfs_input_output_artifacts.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/webhdfs-input-output-artifacts.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/webhdfs-input-output-artifacts.yaml). diff --git a/docs/examples/workflows/upstream/workflow_event_binding__event_consumer_workflowtemplate.md b/docs/examples/workflows/upstream/workflow_event_binding__event_consumer_workflowtemplate.md index ff215b791..3669b6768 100644 --- a/docs/examples/workflows/upstream/workflow_event_binding__event_consumer_workflowtemplate.md +++ b/docs/examples/workflows/upstream/workflow_event_binding__event_consumer_workflowtemplate.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/workflow-event-binding/event-consumer-workflowtemplate.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/workflow-event-binding/event-consumer-workflowtemplate.yaml). diff --git a/docs/examples/workflows/upstream/workflow_of_workflows.md b/docs/examples/workflows/upstream/workflow_of_workflows.md index 8adf6fc93..7e743139f 100644 --- a/docs/examples/workflows/upstream/workflow_of_workflows.md +++ b/docs/examples/workflows/upstream/workflow_of_workflows.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/workflow-of-workflows.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/workflow-of-workflows.yaml). diff --git a/docs/examples/workflows/upstream/workflow_template__dag.md b/docs/examples/workflows/upstream/workflow_template__dag.md index cfd3b602b..b6ee03912 100644 --- a/docs/examples/workflows/upstream/workflow_template__dag.md +++ b/docs/examples/workflows/upstream/workflow_template__dag.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/workflow-template/dag.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/workflow-template/dag.yaml). diff --git a/docs/examples/workflows/upstream/workflow_template__hello_world.md b/docs/examples/workflows/upstream/workflow_template__hello_world.md index cb694d618..ae21f89d3 100644 --- a/docs/examples/workflows/upstream/workflow_template__hello_world.md +++ b/docs/examples/workflows/upstream/workflow_template__hello_world.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/workflow-template/hello-world.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/workflow-template/hello-world.yaml). diff --git a/docs/examples/workflows/upstream/workflow_template__retry_with_steps.md b/docs/examples/workflows/upstream/workflow_template__retry_with_steps.md index bb714b7d2..fcb44d1a4 100644 --- a/docs/examples/workflows/upstream/workflow_template__retry_with_steps.md +++ b/docs/examples/workflows/upstream/workflow_template__retry_with_steps.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/workflow-template/retry-with-steps.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/workflow-template/retry-with-steps.yaml). diff --git a/docs/examples/workflows/upstream/workflow_template__steps.md b/docs/examples/workflows/upstream/workflow_template__steps.md index 28438931e..73504a393 100644 --- a/docs/examples/workflows/upstream/workflow_template__steps.md +++ b/docs/examples/workflows/upstream/workflow_template__steps.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/workflow-template/steps.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/workflow-template/steps.yaml). diff --git a/docs/examples/workflows/upstream/workflow_template__workflow_archive_logs.md b/docs/examples/workflows/upstream/workflow_template__workflow_archive_logs.md index 5eecea7d6..1db380ae9 100644 --- a/docs/examples/workflows/upstream/workflow_template__workflow_archive_logs.md +++ b/docs/examples/workflows/upstream/workflow_template__workflow_archive_logs.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/workflow-template/workflow-archive-logs.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/workflow-template/workflow-archive-logs.yaml). diff --git a/docs/examples/workflows/upstream/workflow_template__workflow_template_ref.md b/docs/examples/workflows/upstream/workflow_template__workflow_template_ref.md index 53faf907e..cb52f7565 100644 --- a/docs/examples/workflows/upstream/workflow_template__workflow_template_ref.md +++ b/docs/examples/workflows/upstream/workflow_template__workflow_template_ref.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/workflow-template/workflow-template-ref.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/workflow-template/workflow-template-ref.yaml). diff --git a/docs/examples/workflows/upstream/workflow_template__workflow_template_ref_with_entrypoint_arg_passing.md b/docs/examples/workflows/upstream/workflow_template__workflow_template_ref_with_entrypoint_arg_passing.md index 3f5f7c88e..06cf95e5c 100644 --- a/docs/examples/workflows/upstream/workflow_template__workflow_template_ref_with_entrypoint_arg_passing.md +++ b/docs/examples/workflows/upstream/workflow_template__workflow_template_ref_with_entrypoint_arg_passing.md @@ -3,7 +3,7 @@ ## Note This example is a replication of an Argo Workflow example in Hera. -The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/workflow-template/workflow-template-ref-with-entrypoint-arg-passing.yaml). +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/workflow-template/workflow-template-ref-with-entrypoint-arg-passing.yaml). diff --git a/docs/examples/workflows/dask.md b/docs/examples/workflows/use-cases/dask.md similarity index 100% rename from docs/examples/workflows/dask.md rename to docs/examples/workflows/use-cases/dask.md diff --git a/docs/examples/workflows/map_reduce.md b/docs/examples/workflows/use-cases/map_reduce.md similarity index 99% rename from docs/examples/workflows/map_reduce.md rename to docs/examples/workflows/use-cases/map_reduce.md index 3ce586b41..ef22a1c4a 100644 --- a/docs/examples/workflows/map_reduce.md +++ b/docs/examples/workflows/use-cases/map_reduce.md @@ -5,7 +5,7 @@ This is a map reduce example from the upstream Argo Workflows repository. This is not part of the upstream examples folder for workflows because the upstream example is not formatted according to PEP recommendations. -See the upstream example [here](https://github.com/argoproj/argo-workflows/blob/master/examples/map-reduce.yaml). +See the upstream example [here](https://github.com/argoproj/argo-workflows/blob/main/examples/map-reduce.yaml). === "Hera" diff --git a/docs/examples/workflows/spark.md b/docs/examples/workflows/use-cases/spark.md similarity index 100% rename from docs/examples/workflows/spark.md rename to docs/examples/workflows/use-cases/spark.md diff --git a/docs/examples/workflows/workflow_of_workflows.md b/docs/examples/workflows/use-cases/workflow_of_workflows.md similarity index 100% rename from docs/examples/workflows/workflow_of_workflows.md rename to docs/examples/workflows/use-cases/workflow_of_workflows.md diff --git a/docs/generate.py b/docs/generate.py index e8d331bb7..82f174409 100644 --- a/docs/generate.py +++ b/docs/generate.py @@ -1,4 +1,5 @@ """Module that holds the functionality that generates Hera's documentation.""" +import os import re import shutil import textwrap @@ -6,7 +7,7 @@ def generate_markdown(path: Path, sub_folder: str) -> str: - """Generates the Markdown version of the documentation of the file located at the given path. + """Generates the Markdown version of the documentation of the file located at the given path, into the given sub_folder. This code reads the contents at the path which is a python file, extracts the python docstring at the top using a regex and then @@ -18,7 +19,7 @@ def generate_markdown(path: Path, sub_folder: str) -> str: to sentence case. """ py_contents = path.read_text() - link = "https://github.com/argoproj/argo-workflows/blob/master/examples/{link}".format( + link = "https://github.com/argoproj/argo-workflows/blob/main/examples/{link}".format( link=path.stem.replace("__", "/").replace("_", "-") + ".yaml" ) match = re.search(r'^"""(.*?)"""', py_contents, re.DOTALL) @@ -62,12 +63,17 @@ def generate_markdown(path: Path, sub_folder: str) -> str: def _main(): - # we need to go through each path and generate its markdown - for sub_folder in ("workflows", "workflows/upstream"): - folder = Path("examples") / sub_folder - shutil.rmtree(folder, ignore_errors=True) - (folder).mkdir(parents=True, exist_ok=True) - for path in Path(f"../examples/{sub_folder}").glob("*.py"): + """Go through example python files and generate markdown for the readthedocs website.""" + examples_workflows = "examples/workflows" + for sub_folder in ["workflows"] + [ + f"workflows/{name}" + for name in os.listdir(f"../{examples_workflows}") + if os.path.isdir(os.path.join(f"../{examples_workflows}", name)) and name != "__pycache__" + ]: + example_sub_folder = f"examples/{sub_folder}" + shutil.rmtree(example_sub_folder, ignore_errors=True) + Path(example_sub_folder).mkdir(parents=True, exist_ok=True) + for path in Path(f"../{example_sub_folder}").glob("*.py"): if path.stem != "__init__": generate_markdown(path, sub_folder) diff --git a/docs/user-guides/scripts.md b/docs/user-guides/scripts.md index 1f4a3215c..7ecb50d5c 100644 --- a/docs/user-guides/scripts.md +++ b/docs/user-guides/scripts.md @@ -342,7 +342,7 @@ There are two ways to specify output Artifacts and Parameters. Function return annotations can be used to specify the output type information for output Artifacts and Parameters, and the function should return a value or tuple. An example can be seen -[here](../examples/workflows/script_annotations_outputs.md). +[here](../examples/workflows/experimental/script_annotations_outputs.md). For a simple hello world output artifact example we currently have: ```python diff --git a/docs/walk-through/advanced-hera-features.md b/docs/walk-through/advanced-hera-features.md index 50ff8001b..8069f5f46 100644 --- a/docs/walk-through/advanced-hera-features.md +++ b/docs/walk-through/advanced-hera-features.md @@ -128,8 +128,8 @@ set. We list graduated features here so you can keep up to date. ### `RunnerScriptConstructor` The `RunnerScriptConstructor` found in `hera.workflows.script` and seen in the -[callable script example](../examples/workflows/callable_script.md) is a robust way to run Python functions on Argo. -The image used by the script should be built from the source code package itself and its dependencies, so that the +[callable script example](../examples/workflows/scripts/callable_script.md) is a robust way to run Python functions on +Argo. The image used by the script should be built from the source code package itself and its dependencies, so that the source code's functions, dependencies, and Hera itself are available to run. The `RunnerScriptConstructor` is also compatible with Pydantic so supports deserializing inputs to Python objects and serializing outputs to json strings. diff --git a/docs/walk-through/artifacts.md b/docs/walk-through/artifacts.md index 3c96712c2..af07bba54 100644 --- a/docs/walk-through/artifacts.md +++ b/docs/walk-through/artifacts.md @@ -8,7 +8,7 @@ Artifacts are mainly used for outputs that are very large or are of non-text fil ## Artifacts in Hera -Here, we are looking at the [Script Artifact Passing](../examples/workflows/script_artifact_passing.md) example. +Here, we are looking at the [Script Artifact Passing](../examples/workflows/scripts/script_artifact_passing.md) example.
Click here to see the full example diff --git a/docs/walk-through/loops.md b/docs/walk-through/loops.md index 5dd366826..2e456d577 100644 --- a/docs/walk-through/loops.md +++ b/docs/walk-through/loops.md @@ -177,7 +177,7 @@ def create_orders(): > **Note:** we must import any modules used within the function itself, as Hera currently only passes the source lines > of the function to Argo. If you need to import modules not in the standard Python image, use a custom image as > described in [the `script` decorator](hello-world.md#the-script-decorator) section, or see the **experimental** -> [callable script](../examples/workflows/callable_script.md) example. +> [callable script](../examples/workflows/scripts/callable_script.md) example. Now we can construct a Workflow that calls `create_orders`, and passes its `result` to `make_bubble_tea`. We'll need to hold onto the `Step` returned from the `create_orders` call, and change `with_items` to `with_param` to use `.result`. diff --git a/docs/walk-through/parameters.md b/docs/walk-through/parameters.md index bdd0091a0..1a07f9f46 100644 --- a/docs/walk-through/parameters.md +++ b/docs/walk-through/parameters.md @@ -113,7 +113,8 @@ my_second_key=my_second_value ## Custom Types Currently, custom types are only supported in the "script runner" experimental feature. See an example usage -[here](../examples/workflows/callable_script.md). Please note this is an experimental feature so support is limited for now. +[here](../examples/workflows/scripts/callable_script.md). Please note this is an experimental feature so support is +limited for now. ## Passing Parameters diff --git a/docs/walk-through/pydantic-support.md b/docs/walk-through/pydantic-support.md index 42f5cb47a..c7b8a4cbf 100644 --- a/docs/walk-through/pydantic-support.md +++ b/docs/walk-through/pydantic-support.md @@ -13,4 +13,4 @@ Hera offers some features that explicitly rely on Pydantic. This includes the He validate the function call. Using Pydantic classes in your function parameters unlocks the powerful serializing and de-serializing features of Pydantic when running on Argo. Your functions can return objects that are serialized, passed to another `Step` as a string argument, and then de-serialized in another function. This flow can be seen in -[the callable scripts example](../examples/workflows/callable_script.md). +[the callable scripts example](../examples/workflows/scripts/callable_script.md). diff --git a/examples/workflows-examples.md b/examples/workflows-examples.md index b9bd5494e..86ffc0a8c 120000 --- a/examples/workflows-examples.md +++ b/examples/workflows-examples.md @@ -1 +1 @@ -../docs/examples/workflows-examples.md \ No newline at end of file +docs/examples/workflows-examples.md \ No newline at end of file diff --git a/examples/workflows/artifacts/__init__.py b/examples/workflows/artifacts/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/examples/workflows/artifact-with-fanout.yaml b/examples/workflows/artifacts/artifact-with-fanout.yaml similarity index 100% rename from examples/workflows/artifact-with-fanout.yaml rename to examples/workflows/artifacts/artifact-with-fanout.yaml diff --git a/examples/workflows/artifact.py b/examples/workflows/artifacts/artifact.py similarity index 100% rename from examples/workflows/artifact.py rename to examples/workflows/artifacts/artifact.py diff --git a/examples/workflows/artifact.yaml b/examples/workflows/artifacts/artifact.yaml similarity index 100% rename from examples/workflows/artifact.yaml rename to examples/workflows/artifacts/artifact.yaml diff --git a/examples/workflows/artifact_with_fanout.py b/examples/workflows/artifacts/artifact_with_fanout.py similarity index 100% rename from examples/workflows/artifact_with_fanout.py rename to examples/workflows/artifacts/artifact_with_fanout.py diff --git a/examples/workflows/callable-coinflip.yaml b/examples/workflows/callable-coinflip.yaml deleted file mode 100644 index 4ba4df798..000000000 --- a/examples/workflows/callable-coinflip.yaml +++ /dev/null @@ -1,53 +0,0 @@ -apiVersion: argoproj.io/v1alpha1 -kind: Workflow -metadata: - generateName: coinflip- -spec: - entrypoint: d - templates: - - dag: - tasks: - - name: flip - template: flip - - depends: flip - name: heads - template: heads - when: '{{tasks.flip.outputs.result}} == heads' - - depends: flip - name: tails - template: tails - when: '{{tasks.flip.outputs.result}} == tails' - name: d - - name: flip - script: - args: - - -m - - hera.workflows.runner - - -e - - examples.workflows.callable_coinflip:flip - command: - - python - image: my-image-with-python-source-code-and-dependencies - source: '{{inputs.parameters}}' - - name: heads - script: - args: - - -m - - hera.workflows.runner - - -e - - examples.workflows.callable_coinflip:heads - command: - - python - image: my-image-with-python-source-code-and-dependencies - source: '{{inputs.parameters}}' - - name: tails - script: - args: - - -m - - hera.workflows.runner - - -e - - examples.workflows.callable_coinflip:tails - command: - - python - image: my-image-with-python-source-code-and-dependencies - source: '{{inputs.parameters}}' diff --git a/examples/workflows/callable_coinflip.py b/examples/workflows/callable_coinflip.py deleted file mode 100644 index 854406d27..000000000 --- a/examples/workflows/callable_coinflip.py +++ /dev/null @@ -1,34 +0,0 @@ -import random - -from hera.shared import global_config -from hera.workflows import DAG, Script, Workflow, script - -# Note, setting constructor to runner is only possible if the source code is available -# along with dependencies include hera in the image. -# Callable is a robust mode that allows you to run any python function -# and is compatible with pydantic. It automatically parses the input -# and serializes the output. -global_config.image = "my-image-with-python-source-code-and-dependencies" -global_config.set_class_defaults(Script, constructor="runner") - - -@script() -def flip(): - return "heads" if random.randint(0, 1) == 0 else "tails" - - -@script() -def heads(): - return "it was heads" - - -@script() -def tails(): - return "it was tails" - - -with Workflow(generate_name="coinflip-", entrypoint="d") as w: - with DAG(name="d") as s: - f = flip() - heads().on_other_result(f, "heads") - tails().on_other_result(f, "tails") diff --git a/examples/workflows/complex_expr.py b/examples/workflows/complex_expr.py index c8563ff25..6e3b8c10f 100644 --- a/examples/workflows/complex_expr.py +++ b/examples/workflows/complex_expr.py @@ -1,6 +1,6 @@ """This example showcases how to string together complex expressions. This example is a python replica of -https://github.com/argoproj/argo-workflows/blob/master/examples/expression-reusing-verbose-snippets.yaml +https://github.com/argoproj/argo-workflows/blob/main/examples/expression-reusing-verbose-snippets.yaml """ import base64 import json diff --git a/examples/workflows/dags/__init__.py b/examples/workflows/dags/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/examples/workflows/any-success-all-fail.yaml b/examples/workflows/dags/any-success-all-fail.yaml similarity index 100% rename from examples/workflows/any-success-all-fail.yaml rename to examples/workflows/dags/any-success-all-fail.yaml diff --git a/examples/workflows/any_success_all_fail.py b/examples/workflows/dags/any_success_all_fail.py similarity index 100% rename from examples/workflows/any_success_all_fail.py rename to examples/workflows/dags/any_success_all_fail.py diff --git a/examples/workflows/callable-dag-with-param-get.yaml b/examples/workflows/dags/callable-dag-with-param-get.yaml similarity index 94% rename from examples/workflows/callable-dag-with-param-get.yaml rename to examples/workflows/dags/callable-dag-with-param-get.yaml index e0fde2fed..6dceb4c31 100644 --- a/examples/workflows/callable-dag-with-param-get.yaml +++ b/examples/workflows/dags/callable-dag-with-param-get.yaml @@ -31,7 +31,7 @@ spec: - -m - hera.workflows.runner - -e - - examples.workflows.callable_dag_with_param_get:hello_with_output + - examples.workflows.dags.callable_dag_with_param_get:hello_with_output command: - python image: python:3.8 diff --git a/examples/workflows/callable-dag.yaml b/examples/workflows/dags/callable-dag.yaml similarity index 100% rename from examples/workflows/callable-dag.yaml rename to examples/workflows/dags/callable-dag.yaml diff --git a/examples/workflows/callable_dag.py b/examples/workflows/dags/callable_dag.py similarity index 100% rename from examples/workflows/callable_dag.py rename to examples/workflows/dags/callable_dag.py diff --git a/examples/workflows/callable_dag_with_param_get.py b/examples/workflows/dags/callable_dag_with_param_get.py similarity index 100% rename from examples/workflows/callable_dag_with_param_get.py rename to examples/workflows/dags/callable_dag_with_param_get.py diff --git a/examples/workflows/complex-deps.yaml b/examples/workflows/dags/complex-deps.yaml similarity index 100% rename from examples/workflows/complex-deps.yaml rename to examples/workflows/dags/complex-deps.yaml diff --git a/examples/workflows/complex_deps.py b/examples/workflows/dags/complex_deps.py similarity index 100% rename from examples/workflows/complex_deps.py rename to examples/workflows/dags/complex_deps.py diff --git a/examples/workflows/conditional.py b/examples/workflows/dags/conditional.py similarity index 100% rename from examples/workflows/conditional.py rename to examples/workflows/dags/conditional.py diff --git a/examples/workflows/conditional.yaml b/examples/workflows/dags/conditional.yaml similarity index 100% rename from examples/workflows/conditional.yaml rename to examples/workflows/dags/conditional.yaml diff --git a/examples/workflows/dag-conditional-on-task-status.yaml b/examples/workflows/dags/dag-conditional-on-task-status.yaml similarity index 100% rename from examples/workflows/dag-conditional-on-task-status.yaml rename to examples/workflows/dags/dag-conditional-on-task-status.yaml diff --git a/examples/workflows/dag-conditional-parameters.yaml b/examples/workflows/dags/dag-conditional-parameters.yaml similarity index 100% rename from examples/workflows/dag-conditional-parameters.yaml rename to examples/workflows/dags/dag-conditional-parameters.yaml diff --git a/examples/workflows/dag-diamond-with-callable-container.yaml b/examples/workflows/dags/dag-diamond-with-callable-container.yaml similarity index 100% rename from examples/workflows/dag-diamond-with-callable-container.yaml rename to examples/workflows/dags/dag-diamond-with-callable-container.yaml diff --git a/examples/workflows/dag-diamond-with-callable-decorators.yaml b/examples/workflows/dags/dag-diamond-with-callable-decorators.yaml similarity index 100% rename from examples/workflows/dag-diamond-with-callable-decorators.yaml rename to examples/workflows/dags/dag-diamond-with-callable-decorators.yaml diff --git a/examples/workflows/dag-diamond-with-callable-script.yaml b/examples/workflows/dags/dag-diamond-with-callable-script.yaml similarity index 100% rename from examples/workflows/dag-diamond-with-callable-script.yaml rename to examples/workflows/dags/dag-diamond-with-callable-script.yaml diff --git a/examples/workflows/dag-with-param-passing.yaml b/examples/workflows/dags/dag-with-param-passing.yaml similarity index 100% rename from examples/workflows/dag-with-param-passing.yaml rename to examples/workflows/dags/dag-with-param-passing.yaml diff --git a/examples/workflows/dag-with-script-output-param-passing.yaml b/examples/workflows/dags/dag-with-script-output-param-passing.yaml similarity index 100% rename from examples/workflows/dag-with-script-output-param-passing.yaml rename to examples/workflows/dags/dag-with-script-output-param-passing.yaml diff --git a/examples/workflows/dag-with-script-param-passing.yaml b/examples/workflows/dags/dag-with-script-param-passing.yaml similarity index 100% rename from examples/workflows/dag-with-script-param-passing.yaml rename to examples/workflows/dags/dag-with-script-param-passing.yaml diff --git a/examples/workflows/dag_conditional_on_task_status.py b/examples/workflows/dags/dag_conditional_on_task_status.py similarity index 100% rename from examples/workflows/dag_conditional_on_task_status.py rename to examples/workflows/dags/dag_conditional_on_task_status.py diff --git a/examples/workflows/dag_conditional_parameters.py b/examples/workflows/dags/dag_conditional_parameters.py similarity index 100% rename from examples/workflows/dag_conditional_parameters.py rename to examples/workflows/dags/dag_conditional_parameters.py diff --git a/examples/workflows/dag_diamond_with_callable_container.py b/examples/workflows/dags/dag_diamond_with_callable_container.py similarity index 100% rename from examples/workflows/dag_diamond_with_callable_container.py rename to examples/workflows/dags/dag_diamond_with_callable_container.py diff --git a/examples/workflows/dag_diamond_with_callable_decorators.py b/examples/workflows/dags/dag_diamond_with_callable_decorators.py similarity index 100% rename from examples/workflows/dag_diamond_with_callable_decorators.py rename to examples/workflows/dags/dag_diamond_with_callable_decorators.py diff --git a/examples/workflows/dag_diamond_with_callable_script.py b/examples/workflows/dags/dag_diamond_with_callable_script.py similarity index 100% rename from examples/workflows/dag_diamond_with_callable_script.py rename to examples/workflows/dags/dag_diamond_with_callable_script.py diff --git a/examples/workflows/dag_with_param_passing.py b/examples/workflows/dags/dag_with_param_passing.py similarity index 100% rename from examples/workflows/dag_with_param_passing.py rename to examples/workflows/dags/dag_with_param_passing.py diff --git a/examples/workflows/dag_with_script_output_param_passing.py b/examples/workflows/dags/dag_with_script_output_param_passing.py similarity index 100% rename from examples/workflows/dag_with_script_output_param_passing.py rename to examples/workflows/dags/dag_with_script_output_param_passing.py diff --git a/examples/workflows/dag_with_script_param_passing.py b/examples/workflows/dags/dag_with_script_param_passing.py similarity index 100% rename from examples/workflows/dag_with_script_param_passing.py rename to examples/workflows/dags/dag_with_script_param_passing.py diff --git a/examples/workflows/on-exit.yaml b/examples/workflows/dags/on-exit.yaml similarity index 100% rename from examples/workflows/on-exit.yaml rename to examples/workflows/dags/on-exit.yaml diff --git a/examples/workflows/on_exit.py b/examples/workflows/dags/on_exit.py similarity index 100% rename from examples/workflows/on_exit.py rename to examples/workflows/dags/on_exit.py diff --git a/examples/workflows/experimental/__init__.py b/examples/workflows/experimental/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/examples/workflows/script-annotations-artifact-custom-volume.yaml b/examples/workflows/experimental/script-annotations-artifact-custom-volume.yaml similarity index 87% rename from examples/workflows/script-annotations-artifact-custom-volume.yaml rename to examples/workflows/experimental/script-annotations-artifact-custom-volume.yaml index 443c3e854..fdc39d8ed 100644 --- a/examples/workflows/script-annotations-artifact-custom-volume.yaml +++ b/examples/workflows/experimental/script-annotations-artifact-custom-volume.yaml @@ -40,7 +40,7 @@ spec: - -m - hera.workflows.runner - -e - - examples.workflows.script_annotations_artifact_custom_volume:output_artifact_empty_dir + - examples.workflows.experimental.script_annotations_artifact_custom_volume:output_artifact_empty_dir command: - python env: @@ -66,7 +66,7 @@ spec: - -m - hera.workflows.runner - -e - - examples.workflows.script_annotations_artifact_custom_volume:use_artifact + - examples.workflows.experimental.script_annotations_artifact_custom_volume:use_artifact command: - python env: @@ -87,7 +87,7 @@ spec: - -m - hera.workflows.runner - -e - - examples.workflows.script_annotations_artifact_custom_volume:output_artifact_existing_vol + - examples.workflows.experimental.script_annotations_artifact_custom_volume:output_artifact_existing_vol command: - python env: @@ -110,7 +110,7 @@ spec: - -m - hera.workflows.runner - -e - - examples.workflows.script_annotations_artifact_custom_volume:use_artifact_existing_vol + - examples.workflows.experimental.script_annotations_artifact_custom_volume:use_artifact_existing_vol command: - python env: diff --git a/examples/workflows/script-annotations-artifact-loaders.yaml b/examples/workflows/experimental/script-annotations-artifact-loaders.yaml similarity index 90% rename from examples/workflows/script-annotations-artifact-loaders.yaml rename to examples/workflows/experimental/script-annotations-artifact-loaders.yaml index 3a8c71d45..a2d5ef874 100644 --- a/examples/workflows/script-annotations-artifact-loaders.yaml +++ b/examples/workflows/experimental/script-annotations-artifact-loaders.yaml @@ -36,7 +36,7 @@ spec: - -m - hera.workflows.runner - -e - - examples.workflows.script_annotations_artifact_loaders:output_dict_artifact + - examples.workflows.experimental.script_annotations_artifact_loaders:output_dict_artifact command: - python env: @@ -60,7 +60,7 @@ spec: - -m - hera.workflows.runner - -e - - examples.workflows.script_annotations_artifact_loaders:artifact_loaders + - examples.workflows.experimental.script_annotations_artifact_loaders:artifact_loaders command: - python env: diff --git a/examples/workflows/script-annotations-artifact-outputs-defaults.yaml b/examples/workflows/experimental/script-annotations-artifact-outputs-defaults.yaml similarity index 88% rename from examples/workflows/script-annotations-artifact-outputs-defaults.yaml rename to examples/workflows/experimental/script-annotations-artifact-outputs-defaults.yaml index 71c62bad8..0d5c4a442 100644 --- a/examples/workflows/script-annotations-artifact-outputs-defaults.yaml +++ b/examples/workflows/experimental/script-annotations-artifact-outputs-defaults.yaml @@ -32,7 +32,7 @@ spec: - -m - hera.workflows.runner - -e - - examples.workflows.script_annotations_artifact_outputs_defaults:output_artifact + - examples.workflows.experimental.script_annotations_artifact_outputs_defaults:output_artifact command: - python env: @@ -52,7 +52,7 @@ spec: - -m - hera.workflows.runner - -e - - examples.workflows.script_annotations_artifact_outputs_defaults:use_artifact + - examples.workflows.experimental.script_annotations_artifact_outputs_defaults:use_artifact command: - python env: diff --git a/examples/workflows/script-annotations-artifact-passing.yaml b/examples/workflows/experimental/script-annotations-artifact-passing.yaml similarity index 88% rename from examples/workflows/script-annotations-artifact-passing.yaml rename to examples/workflows/experimental/script-annotations-artifact-passing.yaml index d62cf6242..a2b8ea9cc 100644 --- a/examples/workflows/script-annotations-artifact-passing.yaml +++ b/examples/workflows/experimental/script-annotations-artifact-passing.yaml @@ -32,7 +32,7 @@ spec: - -m - hera.workflows.runner - -e - - examples.workflows.script_annotations_artifact_passing:output_artifact + - examples.workflows.experimental.script_annotations_artifact_passing:output_artifact command: - python env: @@ -52,7 +52,7 @@ spec: - -m - hera.workflows.runner - -e - - examples.workflows.script_annotations_artifact_passing:use_artifact + - examples.workflows.experimental.script_annotations_artifact_passing:use_artifact command: - python env: diff --git a/examples/workflows/script-annotations-inputs.yaml b/examples/workflows/experimental/script-annotations-inputs.yaml similarity index 92% rename from examples/workflows/script-annotations-inputs.yaml rename to examples/workflows/experimental/script-annotations-inputs.yaml index 0cc9b763c..927e89dae 100644 --- a/examples/workflows/script-annotations-inputs.yaml +++ b/examples/workflows/experimental/script-annotations-inputs.yaml @@ -41,7 +41,7 @@ spec: - -m - hera.workflows.runner - -e - - examples.workflows.script_annotations_inputs:output_dict_artifact + - examples.workflows.experimental.script_annotations_inputs:output_dict_artifact command: - python env: @@ -73,7 +73,7 @@ spec: - -m - hera.workflows.runner - -e - - examples.workflows.script_annotations_inputs:echo_all + - examples.workflows.experimental.script_annotations_inputs:echo_all command: - python env: diff --git a/examples/workflows/script-annotations-outputs.yaml b/examples/workflows/experimental/script-annotations-outputs.yaml similarity index 90% rename from examples/workflows/script-annotations-outputs.yaml rename to examples/workflows/experimental/script-annotations-outputs.yaml index bf5970e80..c725fd062 100644 --- a/examples/workflows/script-annotations-outputs.yaml +++ b/examples/workflows/experimental/script-annotations-outputs.yaml @@ -35,7 +35,7 @@ spec: - -m - hera.workflows.runner - -e - - examples.workflows.script_annotations_outputs:script_param_artifact_in_function_signature_and_return_type + - examples.workflows.experimental.script_annotations_outputs:script_param_artifact_in_function_signature_and_return_type command: - python env: diff --git a/examples/workflows/script_annotations_artifact_custom_volume.py b/examples/workflows/experimental/script_annotations_artifact_custom_volume.py similarity index 100% rename from examples/workflows/script_annotations_artifact_custom_volume.py rename to examples/workflows/experimental/script_annotations_artifact_custom_volume.py diff --git a/examples/workflows/script_annotations_artifact_loaders.py b/examples/workflows/experimental/script_annotations_artifact_loaders.py similarity index 100% rename from examples/workflows/script_annotations_artifact_loaders.py rename to examples/workflows/experimental/script_annotations_artifact_loaders.py diff --git a/examples/workflows/script_annotations_artifact_outputs_defaults.py b/examples/workflows/experimental/script_annotations_artifact_outputs_defaults.py similarity index 100% rename from examples/workflows/script_annotations_artifact_outputs_defaults.py rename to examples/workflows/experimental/script_annotations_artifact_outputs_defaults.py diff --git a/examples/workflows/script_annotations_artifact_passing.py b/examples/workflows/experimental/script_annotations_artifact_passing.py similarity index 100% rename from examples/workflows/script_annotations_artifact_passing.py rename to examples/workflows/experimental/script_annotations_artifact_passing.py diff --git a/examples/workflows/script_annotations_inputs.py b/examples/workflows/experimental/script_annotations_inputs.py similarity index 100% rename from examples/workflows/script_annotations_inputs.py rename to examples/workflows/experimental/script_annotations_inputs.py diff --git a/examples/workflows/script_annotations_outputs.py b/examples/workflows/experimental/script_annotations_outputs.py similarity index 100% rename from examples/workflows/script_annotations_outputs.py rename to examples/workflows/experimental/script_annotations_outputs.py diff --git a/examples/workflows/loops/__init__.py b/examples/workflows/loops/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/examples/workflows/dynamic-fanout-container.yaml b/examples/workflows/loops/dynamic-fanout-container.yaml similarity index 100% rename from examples/workflows/dynamic-fanout-container.yaml rename to examples/workflows/loops/dynamic-fanout-container.yaml diff --git a/examples/workflows/dynamic-fanout-extra-kwargs.yaml b/examples/workflows/loops/dynamic-fanout-extra-kwargs.yaml similarity index 100% rename from examples/workflows/dynamic-fanout-extra-kwargs.yaml rename to examples/workflows/loops/dynamic-fanout-extra-kwargs.yaml diff --git a/examples/workflows/dynamic-fanout-fanin.yaml b/examples/workflows/loops/dynamic-fanout-fanin.yaml similarity index 100% rename from examples/workflows/dynamic-fanout-fanin.yaml rename to examples/workflows/loops/dynamic-fanout-fanin.yaml diff --git a/examples/workflows/dynamic-fanout-json-payload.yaml b/examples/workflows/loops/dynamic-fanout-json-payload.yaml similarity index 100% rename from examples/workflows/dynamic-fanout-json-payload.yaml rename to examples/workflows/loops/dynamic-fanout-json-payload.yaml diff --git a/examples/workflows/dynamic-fanout.yaml b/examples/workflows/loops/dynamic-fanout.yaml similarity index 100% rename from examples/workflows/dynamic-fanout.yaml rename to examples/workflows/loops/dynamic-fanout.yaml diff --git a/examples/workflows/dynamic_fanout.py b/examples/workflows/loops/dynamic_fanout.py similarity index 100% rename from examples/workflows/dynamic_fanout.py rename to examples/workflows/loops/dynamic_fanout.py diff --git a/examples/workflows/dynamic_fanout_container.py b/examples/workflows/loops/dynamic_fanout_container.py similarity index 100% rename from examples/workflows/dynamic_fanout_container.py rename to examples/workflows/loops/dynamic_fanout_container.py diff --git a/examples/workflows/dynamic_fanout_extra_kwargs.py b/examples/workflows/loops/dynamic_fanout_extra_kwargs.py similarity index 100% rename from examples/workflows/dynamic_fanout_extra_kwargs.py rename to examples/workflows/loops/dynamic_fanout_extra_kwargs.py diff --git a/examples/workflows/dynamic_fanout_fanin.py b/examples/workflows/loops/dynamic_fanout_fanin.py similarity index 100% rename from examples/workflows/dynamic_fanout_fanin.py rename to examples/workflows/loops/dynamic_fanout_fanin.py diff --git a/examples/workflows/dynamic_fanout_json_payload.py b/examples/workflows/loops/dynamic_fanout_json_payload.py similarity index 100% rename from examples/workflows/dynamic_fanout_json_payload.py rename to examples/workflows/loops/dynamic_fanout_json_payload.py diff --git a/examples/workflows/script-loops-maps.yaml b/examples/workflows/loops/script-loops-maps.yaml similarity index 100% rename from examples/workflows/script-loops-maps.yaml rename to examples/workflows/loops/script-loops-maps.yaml diff --git a/examples/workflows/script_loops_maps.py b/examples/workflows/loops/script_loops_maps.py similarity index 100% rename from examples/workflows/script_loops_maps.py rename to examples/workflows/loops/script_loops_maps.py diff --git a/examples/workflows/with-sequence.yaml b/examples/workflows/loops/with-sequence.yaml similarity index 100% rename from examples/workflows/with-sequence.yaml rename to examples/workflows/loops/with-sequence.yaml diff --git a/examples/workflows/with_sequence.py b/examples/workflows/loops/with_sequence.py similarity index 100% rename from examples/workflows/with_sequence.py rename to examples/workflows/loops/with_sequence.py diff --git a/examples/workflows/scripts/__init__.py b/examples/workflows/scripts/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/examples/workflows/callable-script.yaml b/examples/workflows/scripts/callable-script.yaml similarity index 89% rename from examples/workflows/callable-script.yaml rename to examples/workflows/scripts/callable-script.yaml index 82b08cdf8..8be25a25d 100644 --- a/examples/workflows/callable-script.yaml +++ b/examples/workflows/scripts/callable-script.yaml @@ -47,7 +47,7 @@ spec: - -m - hera.workflows.runner - -e - - examples.workflows.callable_script:my_function + - examples.workflows.scripts.callable_script:my_function command: - python env: @@ -64,7 +64,7 @@ spec: - -m - hera.workflows.runner - -e - - examples.workflows.callable_script:str_function + - examples.workflows.scripts.callable_script:str_function command: - python env: @@ -81,7 +81,7 @@ spec: - -m - hera.workflows.runner - -e - - examples.workflows.callable_script:another_function + - examples.workflows.scripts.callable_script:another_function command: - python env: @@ -103,7 +103,7 @@ spec: - -m - hera.workflows.runner - -e - - examples.workflows.callable_script:function_kebab + - examples.workflows.scripts.callable_script:function_kebab command: - python env: @@ -120,7 +120,7 @@ spec: - -m - hera.workflows.runner - -e - - examples.workflows.callable_script:function_kebab_object + - examples.workflows.scripts.callable_script:function_kebab_object command: - python env: diff --git a/examples/workflows/callable_script.py b/examples/workflows/scripts/callable_script.py similarity index 100% rename from examples/workflows/callable_script.py rename to examples/workflows/scripts/callable_script.py diff --git a/examples/workflows/coinflip.py b/examples/workflows/scripts/coinflip.py similarity index 100% rename from examples/workflows/coinflip.py rename to examples/workflows/scripts/coinflip.py diff --git a/examples/workflows/coinflip.yaml b/examples/workflows/scripts/coinflip.yaml similarity index 100% rename from examples/workflows/coinflip.yaml rename to examples/workflows/scripts/coinflip.yaml diff --git a/examples/workflows/default-param-overwrite.yaml b/examples/workflows/scripts/default-param-overwrite.yaml similarity index 100% rename from examples/workflows/default-param-overwrite.yaml rename to examples/workflows/scripts/default-param-overwrite.yaml diff --git a/examples/workflows/default_param_overwrite.py b/examples/workflows/scripts/default_param_overwrite.py similarity index 100% rename from examples/workflows/default_param_overwrite.py rename to examples/workflows/scripts/default_param_overwrite.py diff --git a/examples/workflows/script-artifact-passing.yaml b/examples/workflows/scripts/script-artifact-passing.yaml similarity index 100% rename from examples/workflows/script-artifact-passing.yaml rename to examples/workflows/scripts/script-artifact-passing.yaml diff --git a/examples/workflows/script-auto-infer.yaml b/examples/workflows/scripts/script-auto-infer.yaml similarity index 100% rename from examples/workflows/script-auto-infer.yaml rename to examples/workflows/scripts/script-auto-infer.yaml diff --git a/examples/workflows/script-variations.yaml b/examples/workflows/scripts/script-variations.yaml similarity index 100% rename from examples/workflows/script-variations.yaml rename to examples/workflows/scripts/script-variations.yaml diff --git a/examples/workflows/script-with-default-params.yaml b/examples/workflows/scripts/script-with-default-params.yaml similarity index 100% rename from examples/workflows/script-with-default-params.yaml rename to examples/workflows/scripts/script-with-default-params.yaml diff --git a/examples/workflows/script-with-image-pull-policy.yaml b/examples/workflows/scripts/script-with-image-pull-policy.yaml similarity index 100% rename from examples/workflows/script-with-image-pull-policy.yaml rename to examples/workflows/scripts/script-with-image-pull-policy.yaml diff --git a/examples/workflows/script-with-resources.yaml b/examples/workflows/scripts/script-with-resources.yaml similarity index 100% rename from examples/workflows/script-with-resources.yaml rename to examples/workflows/scripts/script-with-resources.yaml diff --git a/examples/workflows/script_artifact_passing.py b/examples/workflows/scripts/script_artifact_passing.py similarity index 100% rename from examples/workflows/script_artifact_passing.py rename to examples/workflows/scripts/script_artifact_passing.py diff --git a/examples/workflows/script_auto_infer.py b/examples/workflows/scripts/script_auto_infer.py similarity index 100% rename from examples/workflows/script_auto_infer.py rename to examples/workflows/scripts/script_auto_infer.py diff --git a/examples/workflows/script_variations.py b/examples/workflows/scripts/script_variations.py similarity index 100% rename from examples/workflows/script_variations.py rename to examples/workflows/scripts/script_variations.py diff --git a/examples/workflows/script_with_default_params.py b/examples/workflows/scripts/script_with_default_params.py similarity index 100% rename from examples/workflows/script_with_default_params.py rename to examples/workflows/scripts/script_with_default_params.py diff --git a/examples/workflows/script_with_image_pull_policy.py b/examples/workflows/scripts/script_with_image_pull_policy.py similarity index 100% rename from examples/workflows/script_with_image_pull_policy.py rename to examples/workflows/scripts/script_with_image_pull_policy.py diff --git a/examples/workflows/script_with_resources.py b/examples/workflows/scripts/script_with_resources.py similarity index 100% rename from examples/workflows/script_with_resources.py rename to examples/workflows/scripts/script_with_resources.py diff --git a/examples/workflows/steps/__init__.py b/examples/workflows/steps/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/examples/workflows/callable-steps.yaml b/examples/workflows/steps/callable-steps.yaml similarity index 100% rename from examples/workflows/callable-steps.yaml rename to examples/workflows/steps/callable-steps.yaml diff --git a/examples/workflows/callable_steps.py b/examples/workflows/steps/callable_steps.py similarity index 100% rename from examples/workflows/callable_steps.py rename to examples/workflows/steps/callable_steps.py diff --git a/examples/workflows/steps-types.yaml b/examples/workflows/steps/steps-types.yaml similarity index 100% rename from examples/workflows/steps-types.yaml rename to examples/workflows/steps/steps-types.yaml diff --git a/examples/workflows/steps-with-callable-container.yaml b/examples/workflows/steps/steps-with-callable-container.yaml similarity index 100% rename from examples/workflows/steps-with-callable-container.yaml rename to examples/workflows/steps/steps-with-callable-container.yaml diff --git a/examples/workflows/steps_types.py b/examples/workflows/steps/steps_types.py similarity index 100% rename from examples/workflows/steps_types.py rename to examples/workflows/steps/steps_types.py diff --git a/examples/workflows/steps_with_callable_container.py b/examples/workflows/steps/steps_with_callable_container.py similarity index 100% rename from examples/workflows/steps_with_callable_container.py rename to examples/workflows/steps/steps_with_callable_container.py diff --git a/examples/workflows/use-cases/__init__.py b/examples/workflows/use-cases/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/examples/workflows/dask.py b/examples/workflows/use-cases/dask.py similarity index 100% rename from examples/workflows/dask.py rename to examples/workflows/use-cases/dask.py diff --git a/examples/workflows/dask.yaml b/examples/workflows/use-cases/dask.yaml similarity index 100% rename from examples/workflows/dask.yaml rename to examples/workflows/use-cases/dask.yaml diff --git a/examples/workflows/map-reduce.yaml b/examples/workflows/use-cases/map-reduce.yaml similarity index 100% rename from examples/workflows/map-reduce.yaml rename to examples/workflows/use-cases/map-reduce.yaml diff --git a/examples/workflows/map_reduce.py b/examples/workflows/use-cases/map_reduce.py similarity index 98% rename from examples/workflows/map_reduce.py rename to examples/workflows/use-cases/map_reduce.py index 562e40822..e2980d35f 100644 --- a/examples/workflows/map_reduce.py +++ b/examples/workflows/use-cases/map_reduce.py @@ -2,7 +2,7 @@ This is a map reduce example from the upstream Argo Workflows repository. This is not part of the upstream examples folder for workflows because the upstream example is not formatted according to PEP recommendations. -See the upstream example [here](https://github.com/argoproj/argo-workflows/blob/master/examples/map-reduce.yaml). +See the upstream example [here](https://github.com/argoproj/argo-workflows/blob/main/examples/map-reduce.yaml). """ from hera.workflows import DAG, Artifact, NoneArchiveStrategy, Parameter, S3Artifact, Workflow, script diff --git a/examples/workflows/spark.py b/examples/workflows/use-cases/spark.py similarity index 100% rename from examples/workflows/spark.py rename to examples/workflows/use-cases/spark.py diff --git a/examples/workflows/spark.yaml b/examples/workflows/use-cases/spark.yaml similarity index 100% rename from examples/workflows/spark.yaml rename to examples/workflows/use-cases/spark.yaml diff --git a/examples/workflows/workflow-of-workflows.yaml b/examples/workflows/use-cases/workflow-of-workflows.yaml similarity index 100% rename from examples/workflows/workflow-of-workflows.yaml rename to examples/workflows/use-cases/workflow-of-workflows.yaml diff --git a/examples/workflows/workflow_of_workflows.py b/examples/workflows/use-cases/workflow_of_workflows.py similarity index 100% rename from examples/workflows/workflow_of_workflows.py rename to examples/workflows/use-cases/workflow_of_workflows.py diff --git a/mkdocs.yml b/mkdocs.yml index 3f0b8c151..c2d400563 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -30,12 +30,28 @@ nav: - Scripts: user-guides/scripts.md - Expr Transpiler: user-guides/expr.md - Examples: - - Workflows: - - About: examples/workflows-examples.md - - Hera Examples: + - About: examples/workflows-examples.md + - Idiomatic Hera Examples: + - Scripts: + - ... | flat | examples/workflows/scripts/*.md + - DAGs: + - ... | flat | examples/workflows/dags/*.md + - Steps: + - ... | flat | examples/workflows/steps/*.md + - Loops: + - ... | flat | examples/workflows/loops/*.md + - Artifacts: + - ... | flat | examples/workflows/artifacts/*.md + - Experimental Features: + - ... | flat | examples/workflows/experimental/*.md + - Miscellaneous Examples: - ... | flat | examples/workflows/*.md - - Upstream Examples: - - ... | flat | examples/workflows/upstream/*.md + - Use-Cases and Integrations: + - About: examples/about-use-cases.md + - ... | flat | examples/workflows/use-cases/*.md + - Upstream Examples: + - About: examples/about-upstream.md + - ... | flat | examples/workflows/upstream/*.md - API Reference: - Shared: api/shared.md - Workflows: diff --git a/tests/test_examples.py b/tests/test_examples.py index e07226081..eff949316 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -3,7 +3,7 @@ import pkgutil import sys from pathlib import Path -from typing import Dict +from typing import Dict, List import examples.workflows as hera_examples import examples.workflows.upstream as hera_upstream_examples @@ -23,7 +23,7 @@ WorkflowTemplate as ModelWorkflowTemplate, ) -ARGO_EXAMPLES_URL = "https://raw.githubusercontent.com/argoproj/argo-workflows/master/examples" +ARGO_EXAMPLES_URL = "https://raw.githubusercontent.com/argoproj/argo-workflows/main/examples" HERA_REGENERATE = os.environ.get("HERA_REGENERATE") CI_MODE = os.environ.get("CI") @@ -89,14 +89,33 @@ def _compare_workflows(hera_workflow, w1: Dict, w2: Dict): assert False, f"Unsupported workflow type {hera_workflow}" +def _get_examples() -> List: + """Return tuple of example's parent path, its full module and its filename (without ".py").""" + modules = [ + (filefinder.path, module) + for filefinder, module, ispkg in pkgutil.walk_packages(hera_examples.__path__, hera_examples.__name__ + ".") + if not ispkg + ] + return [(path, module, module.split(".")[-1]) for path, module in modules if "upstream" not in module] + + @pytest.mark.parametrize( - "module_name", [name for _, name, _ in pkgutil.iter_modules(hera_examples.__path__) if name != "upstream"] + "path,module_name,filename", + [ + pytest.param( + path, + module_name, + filename, + id=filename, + ) + for path, module_name, filename in _get_examples() + ], ) -def test_hera_output(module_name, global_config_fixture): +def test_hera_output(path, module_name, filename, global_config_fixture): # GIVEN global_config_fixture.host = "http://hera.testing" - workflow = importlib.import_module(f"examples.workflows.{module_name}").w - generated_yaml_path = Path(hera_examples.__file__).parent / f"{module_name.replace('_', '-')}.yaml" + workflow = importlib.import_module(module_name).w + generated_yaml_path = Path(path) / f"{filename.replace('_', '-')}.yaml" # WHEN output = workflow.to_dict() diff --git a/tests/test_remaining_examples.py b/tests/test_remaining_examples.py index afd911af3..35485e162 100644 --- a/tests/test_remaining_examples.py +++ b/tests/test_remaining_examples.py @@ -11,8 +11,8 @@ from hera.workflows import ClusterWorkflowTemplate, CronWorkflow, Workflow, WorkflowTemplate from tests.test_examples import CI_MODE, HERA_REGENERATE -ARGO_REPO_URL = "https://raw.githubusercontent.com/argoproj/argo-workflows/master/examples" -GITHUB_API_ARGO = "https://api.github.com/repos/argoproj/argo-workflows/git/trees/master?recursive=1" +ARGO_REPO_URL = "https://raw.githubusercontent.com/argoproj/argo-workflows/main/examples" +GITHUB_API_ARGO = "https://api.github.com/repos/argoproj/argo-workflows/git/trees/main?recursive=1" UPSTREAM_EXAMPLES_FOLDER = Path("examples/workflows/upstream") # A subset of the upstream examples are known to fail, but a majority pass. We'll # selectively xfail these examples rather than all until they can be fixed. @@ -59,14 +59,14 @@ def test_for_missing_examples(): missing = set(argo_examples).difference(hera_examples) missing_examples = { - example: f"https://github.com/argoproj/argo-workflows/blob/master/examples/{example}.yaml" + example: f"https://github.com/argoproj/argo-workflows/blob/main/examples/{example}.yaml" for example in sorted(missing) } missing_examples_header = "## List of **missing** examples" lines = [] - with open("docs/examples/workflows-examples.md", "r", encoding="utf-8") as examples_file: + with open("examples/workflows-examples.md", "r", encoding="utf-8") as examples_file: while True: line = examples_file.readline() if not line or missing_examples_header in line: @@ -82,7 +82,7 @@ def test_for_missing_examples(): for name, link in missing_examples.items(): lines.append(f"| [{name}]({link}) |\n") - with open("docs/examples/workflows-examples.md", "w", encoding="utf-8") as examples_file: + with open("examples/workflows-examples.md", "w", encoding="utf-8") as examples_file: examples_file.writelines(lines) diff --git a/tests/test_runner.py b/tests/test_runner.py index 40afda714..03b1a39b2 100644 --- a/tests/test_runner.py +++ b/tests/test_runner.py @@ -114,22 +114,22 @@ def test_parameter_loading( "entrypoint,kwargs_list,expected_output", [ ( - "examples.workflows.callable_script:my_function", + "examples.workflows.scripts.callable_script:my_function", [{"name": "input", "value": '{"a": 2, "b": "bar", "c": 42}'}], '{"output": [{"a": 2, "b": "bar", "c": 42}]}', ), ( - "examples.workflows.callable_script:another_function", + "examples.workflows.scripts.callable_script:another_function", [{"name": "inputs", "value": '[{"a": 2, "b": "bar", "c": 42}, {"a": 2, "b": "bar", "c": 42.0}]'}], '{"output": [{"a": 2, "b": "bar", "c": 42}, {"a": 2, "b": "bar", "c": 42.0}]}', ), ( - "examples.workflows.callable_script:str_function", + "examples.workflows.scripts.callable_script:str_function", [{"name": "input", "value": '{"a": 2, "b": "bar", "c": 42}'}], '{"output": [{"a": 2, "b": "bar", "c": 42}]}', ), ( - "examples.workflows.callable_script:function_kebab", + "examples.workflows.scripts.callable_script:function_kebab", [ {"name": "a-but-kebab", "value": "3"}, {"name": "b-but-kebab", "value": "bar"}, @@ -138,7 +138,7 @@ def test_parameter_loading( '{"output": [{"a": 3, "b": "bar", "c": 42.0}]}', ), ( - "examples.workflows.callable_script:function_kebab_object", + "examples.workflows.scripts.callable_script:function_kebab_object", [{"name": "input-value", "value": '{"a": 3, "b": "bar", "c": "abc"}'}], '{"output": [{"a": 3, "b": "bar", "c": "abc"}]}', ), diff --git a/tests/test_unit/test_workflow.py b/tests/test_unit/test_workflow.py index 1f0abf7c4..2b6eb31c0 100644 --- a/tests/test_unit/test_workflow.py +++ b/tests/test_unit/test_workflow.py @@ -52,7 +52,7 @@ def test_workflow_create(): def test_workflow_to_file(tmp_path: Path): # GIVEN - workflow = importlib.import_module("examples.workflows.coinflip").w + workflow = importlib.import_module("examples.workflows.hello_world").w # WHEN yaml_path = workflow.to_file(tmp_path) @@ -64,7 +64,7 @@ def test_workflow_to_file(tmp_path: Path): def test_workflow_from_yaml(): # GIVEN - workflow = importlib.import_module("examples.workflows.coinflip").w + workflow = importlib.import_module("examples.workflows.hello_world").w # THEN assert workflow == Workflow.from_yaml(workflow.to_yaml())