Skip to content

EnsureDataset cannot handle Path values #7069

@mih

Description

@mih

datalad-gooey does full parameter validation not, and because of that fails on any parameter that has an EnsureDataset constraint, because it does not use string paths internally, but Path objects.

This is a bit ironic, because EnsureDataset does not actually do anything other than rejecting anything that is not a str or Dataset instance.

I will replace this constraint in Gooey with something more useful, because the rational in the code doesnot apply there:

            # we cannot convert to a Dataset class right here
            # - duplicates require_dataset() later on
            # - we need to be able to distinguish between a bound
            #   dataset method call and a standalone call for
            #   relative path argument disambiguation
            #return Dataset(path=value)

Ultimately, datalad-core will need to do something about it, when it would start validating Python command arguments.

datalad/datalad-gooey#298

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions