Implement skip_invalid_edges argument#1337
Merged
MariusWirtz merged 1 commit intomasterfrom Mar 16, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements the skip_invalid_edges argument for the delete_edges functionality in the ElementService, allowing users to optionally skip invalid edge deletion operations instead of failing. This addresses issue #1336.
Changes:
- Added
skip_invalid_edgesparameter todelete_edges,delete_edges_use_ti,delete_edges_use_blob, and_build_unwind_hierarchy_edges_from_blob_processmethods - Implemented logic to conditionally check edge validity using TM1's
ElementIsParentfunction before attempting deletion whenskip_invalid_edges=True - Added comprehensive test coverage for both blob and TI execution paths with valid and invalid edge scenarios
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 10 comments.
| File | Description |
|---|---|
| Tests/ElementService_test.py | Added test cases for skip_invalid_edges feature with both use_blob and use_ti options; minor formatting improvements to imports and existing code |
| TM1py/Services/ElementService.py | Implemented skip_invalid_edges parameter across delete_edges methods with conditional TI logic to check edge validity before deletion |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4542729 to
feb30f5
Compare
Contributor
|
Tests completed for environment: tm1-11-cloud. Check artifacts for details. |
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.
Fixes #1336