Skip to content

Commit

Permalink
Handle list of str properly
Browse files Browse the repository at this point in the history
  • Loading branch information
hexylena committed May 8, 2017
1 parent 4b0d8c3 commit c3b8d86
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 10 deletions.
12 changes: 9 additions & 3 deletions parsec/commands/folders/set_permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,21 @@
)
@click.option(
"--add_ids",
help="list of role IDs which can add datasets to the folder"
help="list of role IDs which can add datasets to the folder",
type=str,
multiple=True
)
@click.option(
"--manage_ids",
help="list of role IDs which can manage datasets in the folder"
help="list of role IDs which can manage datasets in the folder",
type=str,
multiple=True
)
@click.option(
"--modify_ids",
help="list of role IDs which can modify datasets in the folder"
help="list of role IDs which can modify datasets in the folder",
type=str,
multiple=True
)

@pass_context
Expand Down
10 changes: 7 additions & 3 deletions parsec/commands/quotas/create_quota.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,21 @@
)
@click.option(
"--in_users",
help="A list of user IDs or user emails."
help="A list of user IDs or user emails.",
type=str,
multiple=True
)
@click.option(
"--in_groups",
help="A list of group IDs or names."
help="A list of group IDs or names.",
type=str,
multiple=True
)

@pass_context
@bioblend_exception
@dict_output
def cli(ctx, name, description, amount, operation, default="", in_users="", in_groups=""):
def cli(ctx, name, description, amount, operation, default="", in_users=None, in_groups=None):
"""Create a new quota
"""
return ctx.gi.quotas.create_quota(name, description, amount, operation, default=default, in_users=in_users, in_groups=in_groups)
10 changes: 7 additions & 3 deletions parsec/commands/quotas/update_quota.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,21 @@
)
@click.option(
"--in_users",
help="A list of user IDs or user emails."
help="A list of user IDs or user emails.",
type=str,
multiple=True
)
@click.option(
"--in_groups",
help="A list of group IDs or names."
help="A list of group IDs or names.",
type=str,
multiple=True
)

@pass_context
@bioblend_exception
@dict_output
def cli(ctx, quota_id, name="", description="", amount="", operation="", default="", in_users="", in_groups=""):
def cli(ctx, quota_id, name="", description="", amount="", operation="", default="", in_users=None, in_groups=None):
"""Update an existing quota
"""
return ctx.gi.quotas.update_quota(quota_id, name=name, description=description, amount=amount, operation=operation, default=default, in_users=in_users, in_groups=in_groups)
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Click
pyyaml
# pre-release version
git+https://github.com/erasche/bioblend.git@4fc0803ffc86bab14bf36eeb30bb055c7ef6cd94
git+https://github.com/erasche/bioblend.git@2e92cbcc22d2e1d9dec6554f3ad21b12112925d5
docutils
wrapt
4 changes: 4 additions & 0 deletions scripts/autobuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
'type=str', # TODO
'multiple=True',
],
'list of str': [
'type=str', # TODO
'multiple=True',
],
'file': [
'type=click.File(\'rb+\')'
],
Expand Down

0 comments on commit c3b8d86

Please sign in to comment.