argoproj-labs / hera

Hera makes Python code easy to orchestrate on Argo Workflows through native Python integrations. It lets you construct and submit your Workflows entirely in Python. ⭐️ Remember to star!
https://hera.rtfd.io
Apache License 2.0
594 stars 106 forks source link

Classify upstream examples (categories, sub-categories, etc.) #1240

Open sam2x opened 2 weeks ago

sam2x commented 2 weeks ago

Is your feature request related to a problem? Please describe.

Breakdown and classify current upstream examples. It is hard to navigate to hera documentation and mostly the examples section.

Describe the solution you'd like

A directory tree per category. Here is a draft proposal:

  1. K8s/Ressource related
  2. Workflow Lifecycle
  3. Workflow management
  4. Branching & Logical flow
  5. Parallelism / Loops
  6. Arguments Artifacts
  7. Arguments Parameters
  8. Config-related

A quick first pass gives me something like this:

K8s/Ressource related

Workflow template-related

Workflow Lifecycle

Workflow management

Branching & Logical flow

Parallelism / Loops

Arguments Artifacts

Arguments Parameters

Config

Some are missing, others needs to be reviewed and classified correctly but here few thought on this:

Best regards, Sam

elliotgunton commented 2 weeks ago

Hey @sam2x, thanks for the detailed suggestion, that's really helpful to see how you would classify the examples 🙏 I broadly agree with the categories and layout - I think just minus the "example linked to different categories" as examples should have a clear aim to demonstrate a single feature, maybe two.

We haven't put much effort into organising the upstream examples as they don't make the best use of Hera, so I'll also relay this suggestion to the upstream Argo Workflows repo, which would make it easier for us to copy down. We copy the https://github.com/argoproj/argo-workflows/tree/main/examples folder when generating the upstream examples, so for the Hera docs site, we'd need to add a mapping of the examples.