add parents to Groups and Datasets objects - #59
Merged
Conversation
## eval_functions.py - omit /data when generating identifiers - join matching substrings before replacing '.' with '_' in generate_identifiers() ## hdfmap_class.py - add parent to Group object - add default to Group object - add parent to Dataset object - populate parents - only populate array if default or not in array (fixes scannable paths) - add 'data' for image data groups (because it is removed with change to generate_ids) - generate_scannables_from_names() now uses default dataset name - first_last_scannables() refactored to be much simpler. ## nexus.py - names_from_scan_fields now uses generate_identifier - default_nexus_names re-written to be simpler and more reliable. Now using default NeXus paths and checking these are in scannables first. ## tests - add tests for parents, defaults and population speed. - add tests fro default names - updated edge_cases - added additional edge_cases
Test is too slow on CI tests and fails, instead compare the time between reading two files.
note that squeeze returns float if np.float64 is given, causing assert to fail. Change to asarray instead.
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.
To fix the issue #58 , a redesign of the NexusMap.nexus_default_names() function was required. As part of this I added parents to Group and Dataset objects and also performed some other major refactoring. I also added new tests to ensure old and new defaults stay the same, however there were some changes to the choices of scannables made. They are now more consistent.
eval_functions.py
hdfmap_class.py
nexus.py
tests