openneuro icon indicating copy to clipboard operation
openneuro copied to clipboard

Filter/error on hidden files

Open effigies opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe.

https://openneuro.org/datasets/ds003216/ contains files like ._dataset_description.json. This occurs because the validator ignores .*. We can (and maybe do) filter these files during upload, but they currently exist and don't prompt users to remove them.

Describe the solution you'd like

Instead of ignoring all dotfiles, the validator could:

  1. Warn on .* files that are not in .bidsignore (HIDDEN_FILE or some such)
  2. Use the list of files that hit this warning to filter during upload
  3. Convert this warning to an error on server-side runs of the validator

This would allow us to use the validator to push dataset owners with grandfathered-in files to remove them, and give us two levels of defense against uploading.

A clear and concise description of what you want to happen.

Describe alternatives you've considered

  • We could just have custom logic on OpenNeuro, but it seems nicer to keep it in the validator.

effigies avatar Sep 01 '22 21:09 effigies

A fix for this was implemented when this dataset uploaded originally, we silently drop these files in uploads after Nov 2020.

https://github.com/OpenNeuroOrg/openneuro/blob/bb9e722c228d435bb2d07d30c0e32de5d06ae5a2/services/datalad/datalad_service/handlers/upload_file.py#L12-L17

Also rejected if you try to push them via git.

https://github.com/OpenNeuroOrg/openneuro/pull/1988

nellh avatar Sep 01 '22 21:09 nellh

Since the solution for this was already implemented, closing.

nellh avatar Oct 05 '22 16:10 nellh