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

check if filename validation is needed and if so, write helper #17

Closed
adswa opened this issue Jun 9, 2022 · 2 comments
Closed

check if filename validation is needed and if so, write helper #17

adswa opened this issue Jun 9, 2022 · 2 comments

Comments

@adswa
Copy link
Member

adswa commented Jun 9, 2022

During manual dataset creation, "upload via the web interface" allows to specify a "file path", a "hierarchical directory structure path used to display file organization and support reproducibility". An uploaded file will be placed under the file path given in this path. E.g., uploading "myfile.txt" and supplying "this/is/a/path/" results in the downloaded dataset to be a zip file with the directory tree this/is/a/path/myfile.txt. (dones't affect its visualization on dataverse it seems, there is it a flat list of files). This file path has character restrictions:

Directory Name cannot contain invalid characters. Valid characters are a-Z, 0-9, '_', '-', '.', '', '/' and ' ' (white space).

If we make use of these paths, we need a helper to ensure only valid characters are used. File names seem to be fine with non-valid characters, e.g., I was able to publish a file with an "ü" in the demo instance

@mih
Copy link
Member

mih commented Jul 4, 2022

I think this is related to #83. Filenames are only exposed for exports (otehrwise the filenames are annex-keys, and there are no directories.

I believe a "validation" approach is not optimal. If a particular directory name is invalid for dataverse, what is a user supposed to do? If we force people to rename, they might run into validity issues with other services or organization standards.

I think, rather than failing on invalidity for dataverse, we should implement directory name mangling and unmangling on/from an export.

@mih
Copy link
Member

mih commented Jul 4, 2022

I am closing this issue in favor of #83

@mih mih closed this as completed Jul 4, 2022
mih added a commit to mih/datalad-dataverse that referenced this issue Feb 28, 2023
Versioneer needs more history to do its job
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants