-
Notifications
You must be signed in to change notification settings - Fork 34
Update tutorials to use dot notation for accessing data objects from Sets and Container types #728
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
ehennestad
wants to merge
90
commits into
main
Choose a base branch
from
update-tutorials-with-dot-syntax-for-sets
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Try using redefinesParen
Add HasGroup mixin class to classes with anonymous subgroups
Fix HasGroups with redefinesDot. This is one option, but only supported from R2021b and later
Utility method for listing names of generated classes for neurodata types
Add TypeName property as a convenience for getting the short name of a data type
- Renamed to HasUnnamedGroups - Use dynamic props instead of overriding indexing - add "add" method
Use callback functions instead of event listeners. The dependency of container groups and their sets are very specific, and an event/listener system would be too general for this case. I.e a Set does not generally have to notify about Items added/removed.
- Add callback function properties accessible by matnwb.mixin.HasUnnamedGroups - Add add method - Add optional inputs for controlling behavior of set method
Rename and reorder methods for better logical composition
- Add the HasUnnamedGroups mixin to the relevant data type classes
Add minimal support for contained "types.untyped.Anon" objects add and NotImplemented warnings/errors in cases where these are not supported
Suppress warning
Rename variable depnm to superclassNames
Only invoke callback if the set operation adds a new element, but not for overrides
…thub.com/NeurodataWithoutBorders/matnwb into add-mixin-for-type-with-group-properties
Improve variable naming Remove unused code
Simplify some code sections Create nameExists method to check i name is already used in subgroup containers
Add verification the test that object is added and removed on the underlying subgroup object when using methods on the parent object
Standardized variable naming in MATLAB code examples to use consistent and descriptive names (e.g., 'NeuralActivity', 'ResultsTable', 'timeSeries', 'fluorescence'). Clarified documentation on adding, accessing, and removing data objects, and improved explanations regarding property naming and internal container properties. Added a note about the behavior of the remove() method
…utorials-with-dot-syntax-for-sets
Shorten warning message
Add more details to comment
Corrected the warning message in MetaClass to use 'instance of type' instead of 'instance for type'.
Improve object display
Improve object display pt 2
The documentation now provides detailed instructions on working directly with types.untyped.Set objects, including using set/get methods with original names and handling invalid MATLAB identifiers. It also introduces and explains container display modes ('groups', 'flat', 'legacy') and how to configure them for different output formats in MATLAB.
Changed preference name from 'displaymode' to 'ContainerDisplayMode' in HasUnnamedGroups.m and updated documentation to reflect this change. Improved explanations in the docs for containers, entries, and Set methods, and clarified usage of display modes and their configuration.
Updated troubleshooting headings and descriptions in the 'working_with_containers.rst' documentation for improved clarity. Headings now more clearly describe property name conflicts, duplicate names, and error handling scenarios in MatNWB.
Fix name of preference
Introduces a Hidden, Sealed addprop method in the Set class to prevent its reimplementation while keeping it accessible internally. This change enhances encapsulation and control over dynamic property addition.
…utorials-with-dot-syntax-for-sets
…utorials-with-dot-syntax-for-sets
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #728 +/- ##
==========================================
- Coverage 95.62% 95.50% -0.12%
==========================================
Files 186 191 +5
Lines 6465 6922 +457
==========================================
+ Hits 6182 6611 +429
- Misses 283 311 +28 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Depends on PR #705
Motivation
Update tutorials based on changes in PR #705
How to test the behavior?
Todo:
Checklist
fix #XXwhereXXis the issue number?