neurodatascience / file_tree_check

File checking project for McGill NeuroDataScience - ORIGAMI lab
https://file-tree-check.readthedocs.io/en/latest/
MIT License
2 stars 2 forks source link

[ENH] Search Criteria Directory Behavior #44

Open JRandy77 opened 1 year ago

JRandy77 commented 1 year ago

Is there an existing issue for this?

New feature

When using search criteria for directory, won't look past the root directory if the root directory doesn't match search criteria.

[Search Criteria]
use search criteria = yes
regular expression for search criteria = sub-01
filter files = no
filter directories = yes

├───dataset1 │ ├───sub-01 │ │ ├───anat │ │ ├───dwi │ │ └───func │ ├───sub-02 │ │ ├───anat │ │ ├───dwi │ │ └───func │ ├───sub-03 │ │ ├───anat │ │ └───dwi │ └───sub-04 │ ├───anat │ ├───dwi │ └───wrong_dir_name └───derivatives1 ├───sub-01 │ ├───pipeline1 │ └───ses-pre ├───sub-02 │ ├───pipeline1 │ │ └───derivatives1 │ └───ses-pre └───sub-03 ├───pipeline1 └───ses-pre

image

Unclear documentation

No response

JRandy77 commented 1 year ago

This is the documented functionality, but I think it is incorrect.

Remi-Gau commented 1 year ago

or least it could throw a warning or display a message explaining why it does that

JRandy77 commented 1 year ago

I think that the options for searching should be increased. We are going to want to be able to specify directories we want to search through then continue to children as normal from there. i.e we only want to look in anat directories, but we also want to look at anat directory children. In addition to that, we might want to look at only that level of directory and no further.

There are a couple of priorities I can picture: filtering for the sake of specified output, and filtering to reduce amount of computation. Overall robustness vs. ease of use.

I don't think its worth continuing now, but we should discuss more.