MAINT: CLI info on marketplace cmds

This commit is contained in:
Victor Grau Serrat
2018-03-02 11:43:53 -07:00
parent d9d6a4e52d
commit fa0e9332bf
2 changed files with 18 additions and 2 deletions
+17 -1
View File
@@ -767,12 +767,18 @@ def bundles():
@main.group()
@click.pass_context
def marketplace(ctx):
"""Access the Enigma Data Marketplace to:\n
- Register and Publish new datasets (seller-side)\n
- Subscribe and Ingest premium datasets (buyer-side)\n
"""
pass
@marketplace.command()
@click.pass_context
def ls(ctx):
"""List all available datasets.
"""
click.echo('Listing of available data sources on the marketplace:',
sys.stdout)
marketplace = Marketplace()
@@ -787,6 +793,8 @@ def ls(ctx):
)
@click.pass_context
def subscribe(ctx, dataset):
"""Subscribe to an exisiting dataset.
"""
if dataset is None:
ctx.fail("must specify a dataset to subscribe to with '--dataset'\n"
"List available dataset on the marketplace with "
@@ -825,6 +833,8 @@ def subscribe(ctx, dataset):
)
@click.pass_context
def ingest(ctx, dataset, data_frequency, start, end):
"""Ingest a dataset (requires subscription).
"""
if dataset is None:
ctx.fail("must specify a dataset to clean with '--dataset'\n"
"List available dataset on the marketplace with "
@@ -842,8 +852,10 @@ def ingest(ctx, dataset, data_frequency, start, end):
)
@click.pass_context
def clean(ctx, dataset):
"""Clean/Remove local data for a given dataset.
"""
if dataset is None:
ctx.fail("must specify a dataset to ingest with '--dataset'\n"
ctx.fail("must specify a dataset to clean up with '--dataset'\n"
"List available dataset on the marketplace with "
"'catalyst marketplace ls'")
click.echo('Cleaning data source: {}'.format(dataset), sys.stdout)
@@ -855,6 +867,8 @@ def clean(ctx, dataset):
@marketplace.command()
@click.pass_context
def register(ctx):
"""Register a new dataset.
"""
marketplace = Marketplace()
marketplace.register()
@@ -878,6 +892,8 @@ def register(ctx):
)
@click.pass_context
def publish(ctx, dataset, datadir, watch):
"""Publish data for a registered dataset.
"""
marketplace = Marketplace()
if dataset is None:
ctx.fail("must specify a dataset to publish data for "
+1 -1
View File
@@ -84,5 +84,5 @@ tables==3.3.0
ccxt==1.10.1094
boto3==1.4.8
redo==1.6
web3==4.0.0b7
web3==4.0.0b11
requests-toolbelt==0.8.0