You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This adds support for reading distributed VR catalogues, as requested in #72. Metadata is present in each file of a distributed catalogue, so the only significant difference between a normal and a distributed catalogue is the way you read datasets. This is handled by using a new VelociraptorCatalogueReader object that takes care of reading and distinguishes between single file and distributed file reads.
Currently I have only implemented this for the actual catalogue (*properties.* files), but I assume something similar would need to be done for the particle and SO files.
I have attempted to add type hints, let me know if you want more. I agree that the filenames[0] was ugly and I have created a property.
Regarding your last comment: the issue here is not so much finding all the files, but generating an ordered list of files. While glob() would work to generate the list, there is no clean way to sort that list. glob() does not sort files and because numbers for VR are not padded, sort() sorts them wrong (so you get x.properties.1, x.properties.11... x.properties.2 etc). So in order to sort correctly, you need to write your own comparison function and that requires... a regex. I thought just using the regex from the start would be easier.
Any thoughts on the particle and SO list files? Where are those used?
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
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.
This adds support for reading distributed VR catalogues, as requested in #72. Metadata is present in each file of a distributed catalogue, so the only significant difference between a normal and a distributed catalogue is the way you read datasets. This is handled by using a new
VelociraptorCatalogueReaderobject that takes care of reading and distinguishes between single file and distributed file reads.Currently I have only implemented this for the actual catalogue (
*properties.*files), but I assume something similar would need to be done for the particle and SO files.