Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EnsureDataset cannot handle Path values #7069

Closed
mih opened this issue Oct 6, 2022 · 1 comment · Fixed by #7133
Closed

EnsureDataset cannot handle Path values #7069

mih opened this issue Oct 6, 2022 · 1 comment · Fixed by #7133
Labels
corpse-in-basement (G)UI Issue related to the UI (implementation)

Comments

@mih
Copy link
Member

mih commented Oct 6, 2022

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

@mih mih added corpse-in-basement (G)UI Issue related to the UI (implementation) labels Oct 6, 2022
mih added a commit to datalad/datalad-gooey that referenced this issue Oct 6, 2022
bpoldrack added a commit to bpoldrack/datalad that referenced this issue Nov 2, 2022
Previously this constraint allowed for strings only.

Closes datalad#7069
bpoldrack added a commit to bpoldrack/datalad that referenced this issue Nov 2, 2022
Previously this constraint allowed for strings only.

Closes datalad#7069
bpoldrack added a commit to bpoldrack/datalad that referenced this issue Nov 3, 2022
Previously this constraint allowed for strings only.

Closes datalad#7069
@yarikoptic-gitmate
Copy link
Collaborator

Issue fixed in 0.18.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
corpse-in-basement (G)UI Issue related to the UI (implementation)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants