Thanks to visit codestin.com
Credit goes to github.com

Skip to content

parameter decorator: handle preset files as resources #930

@bertsky

Description

@bertsky

When we drafted the resource handling, one of the use cases was installing preset files, i.e. preconfigured (if incomplete) json parameter sets that have a discernable name and can be used as value for --parameter|-p but without the directory path.

That latter part is still missing. So we still need to modify …

def _handle_param_option(ctx, param, value):
return parse_json_string_or_file(*list(value))
parameter_option = option('-p', '--parameter',
help="Parameters, either JSON string or path to JSON file",
multiple=True,
default=['{}'],
callback=_handle_param_option)
… such that known resource filenames are tried first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions