Mercurial > repos > shellac > sam_consensus_v3
comparison env/lib/python3.9/site-packages/planemo/commands/cmd_dockstore_init.py @ 0:4f3585e2f14b draft default tip
"planemo upload commit 60cee0fc7c0cda8592644e1aad72851dec82c959"
author | shellac |
---|---|
date | Mon, 22 Mar 2021 18:12:50 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4f3585e2f14b |
---|---|
1 """Module describing the planemo ``dockstore_init`` command.""" | |
2 import os | |
3 | |
4 import click | |
5 | |
6 from planemo import options | |
7 from planemo.cli import command_function | |
8 from planemo.workflow_lint import DOCKSTORE_REGISTRY_CONF, generate_dockstore_yaml | |
9 | |
10 | |
11 @click.command('dockstore_init') | |
12 @options.optional_project_arg() | |
13 @command_function | |
14 def cli(ctx, path=".", **kwds): | |
15 """Initialize a .dockstore.yml configuration file for workflows in directory. | |
16 | |
17 Walk supplied directory and find all Galaxy workflows and test configurations | |
18 and create a ``.dockstore.yml`` with references to these files. Be sure to push | |
19 this file to Github before registering your workflow repository with Dockstore. | |
20 | |
21 Visit Dockstore at https://dockstore.org/. Find more about registering workflows | |
22 with Dockstore at | |
23 https://docs.dockstore.org/en/develop/getting-started/dockstore-workflows.html. | |
24 """ | |
25 # TODO: implement -f semantics | |
26 dockstore_path = os.path.join(path, DOCKSTORE_REGISTRY_CONF) | |
27 contents = generate_dockstore_yaml(path) | |
28 with open(dockstore_path, "w") as f: | |
29 f.write(contents) |