nf-core / nf-core/nft-utils

getAllFilesFromDir `includeDir` and `exclude` pattern are not comaptible with each other

Open
#33 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
13
Forks
11
Avg merge
1d 16h
Merged PRs (30d)
6

Description

The current implementation of the function has a flaw in it in regards to includeDir and exclude.

If you includeDir, then it will include parent directory paths in addition to the files themselves as an independent entry in the final list.

However, if you give a directory path to nf-test, it will automatically look into that directory and check md5sums of all files in the directory.

The problem is that this conflicts with the exclude patterns: while the function generated list will exclude files matching the pattern, the inclusion of the directory path will cause nf-test to pick these supposedly excluded files again (and generated md5sums

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating getAllFilesFromDir and trace how includeDir adds parent directory paths alongside files. Check how nf-test expands directory paths and applies exclude patterns; done means excluded files are not brought back through included parent directories or included in generated md5sums.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.