flo
flo copied to clipboard
feature-request: generate example workflow.yaml
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.
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?
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).
Maybe something like workflow example <example_name>
would be good. This way, it gives people lots of different templates to choose from.
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.