Skip to content

Update tutorials to use dot notation for accessing data objects from Sets and Container types#728

Draft
ehennestad wants to merge 91 commits into
mainfrom
update-tutorials-with-dot-syntax-for-sets
Draft

Update tutorials to use dot notation for accessing data objects from Sets and Container types#728
ehennestad wants to merge 91 commits into
mainfrom
update-tutorials-with-dot-syntax-for-sets

Conversation

@ehennestad

@ehennestad ehennestad commented Jun 30, 2025

Copy link
Copy Markdown
Collaborator

Depends on PR #705

Motivation

Update tutorials based on changes in PR #705

How to test the behavior?

Show here how to reproduce the new behavior (can be a bug fix or a new feature)

Todo:

  • basicUsage.mlx
  • behavior.mlx
  • dynamic_tables.mlx
  • dynamically_loaded_filters.mlx
  • ecephys.mlx
  • icephys.mlx
  • images.mlx
  • intro.mlx
  • ogen.mlx
  • ophys.mlx
  • read_demo.mlx
  • read_demo_dandihub.mlx
  • scratch.mlx

Checklist

  • Have you ensured the PR description clearly describes the problem and solutions?
  • Have you checked to ensure that there aren't other open or previously closed Pull Requests for the same change?
  • If this PR fixes an issue, is the first line of the PR description fix #XX where XX is the issue number?

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
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
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.
@ehennestad ehennestad changed the base branch from add-mixin-for-type-with-group-properties to main December 18, 2025 09:58
@codecov

codecov Bot commented Dec 18, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.53%. Comparing base (b285920) to head (2638606).
⚠️ Report is 36 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #728   +/-   ##
=======================================
  Coverage   95.53%   95.53%           
=======================================
  Files         191      191           
  Lines        6938     6938           
=======================================
  Hits         6628     6628           
  Misses        310      310           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ehennestad ehennestad added the topic: docs related to documentation label Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: docs related to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants