Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add template Workflow File #156

Closed
lokijuhy opened this issue Jan 9, 2023 · 0 comments · Fixed by #157
Closed

Add template Workflow File #156

lokijuhy opened this issue Jan 9, 2023 · 0 comments · Fixed by #157

Comments

@lokijuhy
Copy link
Member

lokijuhy commented Jan 9, 2023

To increase awareness and adoption of file-based workflows on Renku, we want to add a template Renku Workflow file to the base project, so that each new project has a workflow template file ready to go. Hopefully some users open this file out of curiosity and consider using it! For users that don't need workflows, this additional file shouldn't be any inconvenience.

File name: my-workflow.yaml

File contents:

# === Welcome to the template Renku Workflow file! ===
# You can use this file to encode in what order your data processing steps should be run,
# making it easier for you to run your workflow, and for others to understand it!

# === How to use this template ===
# Replace the script and data paths in the template below to match your analysis commands. 
# Then, run `renku run my-workflow.yaml` in a terminal to execute the workflow!
# If you are working in a notebook, run `! renku run my-workflow.yaml` in a notebook cell. 

# === Docs ===
# To learn much more about what you can do with the Renku Workflow File, see our docs:
# https://renku.readthedocs.io/en/stable/topic-guides/workflows/workflow-file.html

name: my-workflow
steps:
  step-one:
    command: python $n $my-script $input-data $output-data
    inputs:
      - my-script:
          path: src/script.py
      - input-data:
          path: data/input/sample_data.csv
    outputs:
      - output-data:
          path: data/output/results.csv
    parameters:
      - n:
        prefix: -n
        value: 10

  # === Adding more steps ===
  # You can add as many steps as you want to your workflow by copy and pasting the step template above
  # TIP: To run just one step from a workflow, simply add the step name to the command, like this:
  #   `renku run my-workflow.yaml make-plot`
  # make-plot:
    # command: python $another-script $output-data $my-plot
    # ...

FYI: To make sure the docs link works, this change should not going live until or at the same time as the 0.22.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant