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

Autodetect JSON or YAML #14

Open
charlesreid1 opened this issue May 11, 2018 · 3 comments
Open

Autodetect JSON or YAML #14

charlesreid1 opened this issue May 11, 2018 · 3 comments
Labels
command-line improvements to the taco command line tool

Comments

@charlesreid1
Copy link
Member

Use one parameter name and autodetect json vs yaml

(currently, have separate flags for json and yaml)

This will help with the redundancy issue #13

@charlesreid1 charlesreid1 added the command-line improvements to the taco command line tool label May 14, 2018
@charlesreid1
Copy link
Member Author

charlesreid1 commented May 18, 2018

From issue #9 (improve cli):

style 1

infer file structure and use

% taco workflow1 my-workflow-files

Here we check if one config file and one params file. If so, check if extension is json or yaml. If so, try to load it. If successful, proceed.

style 2

Or be explicit:

% taco workflow1 --config=my-workflow-files/config.yaml --params=my-workflow-files/params.yaml

Check if extension is json or yaml. If so, try to load it. If successful, proceed.

@charlesreid1
Copy link
Member Author

Do it! style 2 (explicit is better than implicit)

This would eliminate two wordy options and help close #13 (cut down on redundancy) with two "yaml"s or two "json"s gone.

Here: https://github.com/dahak-metagenomics/dahak-taco/blob/master/cli/command.py#L58

@charlesreid1
Copy link
Member Author

While we're at it. If we're using the model of a repo/URL being passed, instead of a local copy of the workflow, we can implement a default config and params file that would be expected in the repository, so that if the user runs

% taco workflow1 <url-to-workflow>

it will automatically use the default config & params file, whereas if the user wants to use a custom config and params they just pass it in:

% taco workflow1 <url-to-workflow> --config=relative/path/to/config.yaml --params=relative/path/to/params.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command-line improvements to the taco command line tool
Projects
None yet
Development

No branches or pull requests

1 participant