Skip to content

Conversation

@yarikoptic
Copy link
Collaborator

Up to this point it was up for a validator to "code" that up. E.g. current new deno based validator in
https://github.com/bids-standard/bids-validator/blob/main/src/files/ignore.ts has

const defaultIgnores = [
  '.git**',
  '.*',
  'sourcedata/',
  ...

thus ignores all dotfiles from validation. But this is inconsistent e.g. with shipped in bids-specification schematools treatment, where files in a dotdirectory were reported as "invalid":

❯ cat /tmp/input.txt | python -m bidsschematools pre-receive-hook
.datalad/config
.gitattributes
sub-01/anat/sub-01_unknown.nii.gz

And as demonstrated above there could be legit "system" dotfiles (VCS related etc) which are part of the folder containing BIDS dataset, I think we should explicitly describe position of BIDS in relation to the dotfiles. As it is pretty much "ignore", that is what this PR is intended to state.

In this PR I also adjusted pre_receive_hook to ignore dotfiles. The find_files was already ignoring them.

Up to this point it was up for a validator to "code" that up.
E.g. current new deno based validator in
https://github.com/bids-standard/bids-validator/blob/main/src/files/ignore.ts
has

    const defaultIgnores = [
      '.git**',
      '.*',
      'sourcedata/',
      ...

thus ignores all dotfiles from validation.  But this is inconsistent e.g.  with
shipped in bids-specification schematools treatment, where files in a
dotdirectory were reported as "invalid":

	❯ cat /tmp/input.txt | python -m bidsschematools pre-receive-hook
	.datalad/config
	.gitattributes
	sub-01/anat/sub-01_unknown.nii.gz

And as demonstrated above there could be legit "system" dotfiles (VCS related
etc) which are part of the folder containing BIDS dataset, I think we should
**explicitly** describe position of BIDS in relation to the dotfiles.  As it is
pretty much "ignore", that is what this PR is intended to state.

In this PR I also adjusted `pre_receive_hook` to ignore dotfiles.
The `find_files` was already ignoring them.
Copy link
Collaborator

@effigies effigies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is reasonable.

@effigies
Copy link
Collaborator

Do we want to consider a schema addition, or leave it as an instruction to implementations?

@effigies
Copy link
Collaborator

Merging. Can consider schema later.

@effigies effigies merged commit ce0dca0 into bids-standard:master Dec 18, 2024
25 of 26 checks passed
@yarikoptic yarikoptic deleted the enh-dotfiles branch April 24, 2025 13:38
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

Successfully merging this pull request may close these issues.

3 participants