Repository navigation
Gives FileSet a single directory walk, all_file_paths(), which byte_chunks, hash() and hash_files() now use. Also fixes a bug in decomposed_fspaths. - #163
Merged
Conversation
…at aren't in the required_paths
…cation of file paths, flags to ignore hidden files+dirs and return in alphabetically sorted list of paths
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
all_file_paths()is now a method (was a property). It returns a sorted, de-duplicatedlist[Path].ignore_hidden_files/ignore_hidden_dirsoptions. These apply only inside listed directories, as onbyte_chunks.FileNotFoundError, so it can no longer slip into a hash or copy unnoticed.byte_chunkswalks viaall_file_paths(), so hashing and file listing agree. As a result:ignore_hidden_dirs=Truenow skips everything beneath a hidden directory. Previously files in non-hidden subfolders of a hidden folder were still included.b"\x00".decomposed_fspaths: a required file inside a listed but non-required directory was dropped whenrequired_only=True, socopy(trim=True)raisedUnsatisfiableCopyModeError. It is now kept.Breaking changes
hash()values change for directories that contain subfolders, because files are hashed in a different order.hash_files()keys and digests are unchanged, apart from the duplicate and broken-link cases above. Pydra caches keyed on these directory hashes will be invalidated.all_file_pathsmust now be called as a method:all_file_paths().Tests
New tests cover ordering, de-duplication, the hidden-file options, broken symlinks,
byte_chunksmatchingall_file_paths(), and thedecomposed_fspaths/ trimmed-copy fix. Full suite: 300 passed, 16 xfailed, 3 xpassed.