Skip to content

Fix prefetch_data_files missing data files nested under data/<subdir>/ - #331

Merged
g5t merged 1 commit into
mainfrom
329-datafile-prefetch-misses-files
Sep 2, 2026
Merged

Fix prefetch_data_files missing data files nested under data/<subdir>/#331
g5t merged 1 commit into
mainfrom
329-datafile-prefetch-misses-files

Conversation

@g5t

@g5t g5t commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

TargetVisitor.prefetch_data_files required a registered file's resolved path to contain the literal substring data/<name>, i.e. the file had to sit directly inside a directory named data/. McStas nests some data families one level deeper (data/ISIS_tables/, data/Gas_tables/), so e.g. ViewModISIS's Face="TS2.imat" (mcstas-comps/data/ISIS_tables/TS2.imat) was silently skipped even though the registry resolves it correctly.

Relax the check to accept data as any directory component preceding the filename, not just the immediate parent. Fixes #329.

TargetVisitor.prefetch_data_files required a registered file's resolved
path to contain the literal substring `data/<name>`, i.e. the file had
to sit directly inside a directory named `data/`. McStas nests some
data families one level deeper (data/ISIS_tables/, data/Gas_tables/),
so e.g. ViewModISIS's Face="TS2.imat" (mcstas-comps/data/ISIS_tables/TS2.imat)
was silently skipped even though the registry resolves it correctly.

Relax the check to accept `data` as any directory component preceding
the filename, not just the immediate parent. Fixes #329.
@g5t g5t linked an issue Sep 2, 2026 that may be closed by this pull request
@g5t
g5t merged commit c47396b into main Sep 2, 2026
14 checks passed
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.

Datafile prefetch misses files

1 participant