flo icon indicating copy to clipboard operation
flo copied to clipboard

feature-request: generate example workflow.yaml

Open gabegaster opened this issue 10 years ago • 4 comments

Maybe this is fulfilled by the examples folder already, but one thing I really like about supervisor is that there's a simple supervisor-template generator which prints to stdout a man page that is also a configuration file for supervisor (with comments and also with the actual example config lines commented out, so it's easy to replace with your own stuff). This makes it easy to start a new project and could be a nice feature for Workflow.

Especially since the intended user probably/maybe won't clone the repo, but will want easy access to example workflow yaml's.

gabegaster avatar Mar 13 '14 22:03 gabegaster

This should be pretty easy now that we've started to separate things into subcommands. What would you think of a command line interface that looked like this:

workflow hello-world              # prints out the simple hello world example
workflow hello-world --global     # prints out hello world example with global variables

I'm open to other subcommand names like workflow generate or workflow init, but it seems like maybe we could take advantage of the examples that we've already built to make this possible. Thoughts?

deanmalmgren avatar Mar 24 '14 14:03 deanmalmgren

I agree that we should use the examples we already have for this. I like hello-world as a command, but init might be clearer.

gabe

On Monday, March 24, 2014 at 9:20 AM, Dean Malmgren wrote:

This should be pretty easy now that we've started to separate things into subcommands. What would you think of a command line interface that looked like this: workflow hello-world # prints out the simple hello world example workflow hello-world --global # prints out hello world example with global variables

I'm open to other subcommand names like workflow generate or workflow init, but it seems like maybe we could take advantage of the examples that we've already built to make this possible. Thoughts?

— Reply to this email directly or view it on GitHub (https://github.com/deanmalmgren/data-workflow/issues/41#issuecomment-38449522).

gabegaster avatar Mar 24 '14 15:03 gabegaster

Maybe something like workflow example <example_name> would be good. This way, it gives people lots of different templates to choose from.

deanmalmgren avatar Apr 07 '14 18:04 deanmalmgren

In situations where a user inadvertantly runs flo from a directory that can't find a flo.yaml, it might be nice to prime users to generate an example workflow with flo example <example_name>.

In order to do this, we'll need to make the examples/ directory available when the package is installed with setup.py. I'm not sure the best way to do this, whether we want to install package data or install additional files.

deanmalmgren avatar Apr 23 '14 13:04 deanmalmgren