The new getAllFilesFromPath() function is not backward compatible with depreciated getAllFilesFromDir()
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
The issue points to getAllFilesFromPath() and the existing getAllFilesFromDir() implementation in src/main/java/nfcore/nftest/utils/Methods.java, plus usage docs and nf-test snapshots. Read the current function and the old implementation first, then run the relevant tests for relative paths and returned file types. Done means the new function supports the requested relative behavior and preserves List<File> output for full paths, with snapshots retaining file MD5 sums.
Written by the indexing model from the issue text.
Description
The situation
The getAllFilesFromDir() function is currently depreciated in favor of the new getAllFilesFromPath() function, which is said to "[...] provide the same functionality with S3 support".
However, when writing my own nf-tests I noticed a shortcoming of the new function: the boolean relative parameter is missing. This leads to multiple related issues.
The issues
- [Backward compatibility] Relative paths cannot trivially be shortened to plain file names. This prevents plainly replacing one function for the other in established nf-test cases.
- [Output data type] The
getAllFilesFromPath()function misses the case to return aList<File>. Previously, if therelative: falseparameter was set the returned List contained a File type. This is particularly relevant since nf-test creates an MD5 sum for the File type. In consequence, test snapshots do not contain the files' MD5 sum any longer.
I consider this particularly confusing as even the nf-core pipeline template generates a test case where the old getAllFilesFromDir() is used, the relative parameter is set, and a corresponding snapshot is produced.
Temporary workaround
Keep using the old depreciated getAllFilesFromDir() function.
Proposal
Please add the relative parameter to the new getAllFilesFromPath() function with the established List<File> return type for full syntactic and functional backward compatibility.
- Dominant language
- Java
- Stars
- 13
- Forks
- 11
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 9
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nf-core/nft-utils
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
nf-core/nft-utils#92 · 1 comment ·
Maintainers usually reply within 1 day
-
Bubble up some more errorsPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 3/5 1-2 days Newbie friendliness 55/100
Maintainers usually reply within 1 day
-
cleanup optionsOpen
Difficulty 5/5 Over a week Newbie friendliness 20/100
Maintainers usually reply within 1 day
All issues in nf-core/nft-utils
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
linagora/twake-calendar-side-service#1578 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
moneymanagerex/android-money-manager-ex#3122 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
tchiotludo/akhq#3438 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Paul-Austin-Oswego-CSC480-HCI521/gift-app#266 ·
Maintainers usually reply within 1 day