Skip to content

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
tclose merged 3 commits into
mainfrom
all-file-paths
Oct 14, 2026
Merged

tclose merged 3 commits into
mainfrom
all-file-paths

Conversation

@tclose

@tclose tclose commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Changes

  • all_file_paths() is now a method (was a property). It returns a sorted, de-duplicated list[Path].
    • New ignore_hidden_files / ignore_hidden_dirs options. These apply only inside listed directories, as on byte_chunks.
    • A broken symlink inside a listed directory raises FileNotFoundError, so it can no longer slip into a hash or copy unnoticed.
  • byte_chunks walks via all_file_paths(), so hashing and file listing agree. As a result:
    • Files are yielded in sorted path order.
    • A file listed directly and also inside a listed directory is yielded once.
    • ignore_hidden_dirs=True now skips everything beneath a hidden directory. Previously files in non-hidden subfolders of a hidden folder were still included.
    • Broken symlinks raise rather than hashing as b"\x00".
  • decomposed_fspaths: a required file inside a listed but non-required directory was dropped when required_only=True, so copy(trim=True) raised UnsatisfiableCopyModeError. 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_paths must now be called as a method: all_file_paths().

Tests

New tests cover ordering, de-duplication, the hidden-file options, broken symlinks, byte_chunks matching all_file_paths(), and the decomposed_fspaths / trimmed-copy fix. Full suite: 300 passed, 16 xfailed, 3 xpassed.

…cation of file paths, flags to ignore hidden files+dirs and return in alphabetically sorted list of paths
@codecov

codecov Bot commented Oct 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@tclose
tclose merged commit 9eebc32 into main Oct 14, 2026
19 checks passed
@tclose
tclose deleted the all-file-paths branch October 19, 2026 07:41
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.

1 participant