Enhance node addition logic in Collection class#79
Merged
ehennestad merged 5 commits intomainfrom Nov 20, 2025
Merged
Conversation
Added 'AbortIfNodeExists' option to node addition methods and improved handling of controlled term instances based on preferences. Subnodes are now added before the main node, and code comments were updated to reflect new functionality.
Contributor
Contributor
Added a check to reshape allInstances to a row vector if it is a column. This prevents issues when iterating over instances and ensures consistent behavior in the addNode method.
…adataInitiative/openMINDS_MATLAB into fix-collection-add-nodes
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #79 +/- ##
==========================================
+ Coverage 75.68% 75.73% +0.05%
==========================================
Files 349 349
Lines 3726 3734 +8
==========================================
+ Hits 2820 2828 +8
Misses 906 906 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Added 'AbortIfNodeExists' option to node addition methods in Collection
Added preference to control whether controlled instances should be added to a Metadata Collection or not