Skip to content

Implement skip_invalid_edges argument#1337

Merged
MariusWirtz merged 1 commit intomasterfrom
1336-delete-edges-skip-invalid-edges
Mar 16, 2026
Merged

Implement skip_invalid_edges argument#1337
MariusWirtz merged 1 commit intomasterfrom
1336-delete-edges-skip-invalid-edges

Conversation

@MariusWirtz
Copy link
Copy Markdown
Collaborator

Fixes #1336

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_edges parameter to delete_edges, delete_edges_use_ti, delete_edges_use_blob, and _build_unwind_hierarchy_edges_from_blob_process methods
  • Implemented logic to conditionally check edge validity using TM1's ElementIsParent function before attempting deletion when skip_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.

Comment thread TM1py/Services/ElementService.py Outdated
Comment thread TM1py/Services/ElementService.py Outdated
Comment thread TM1py/Services/ElementService.py Outdated
Comment thread TM1py/Services/ElementService.py
Comment thread Tests/ElementService_test.py Outdated
Comment thread TM1py/Services/ElementService.py
Comment thread Tests/ElementService_test.py
Comment thread TM1py/Services/ElementService.py Outdated
Comment thread TM1py/Services/ElementService.py
Comment thread TM1py/Services/ElementService.py Outdated
@MariusWirtz MariusWirtz force-pushed the 1336-delete-edges-skip-invalid-edges branch from 4542729 to feb30f5 Compare January 20, 2026 17:37
@github-actions
Copy link
Copy Markdown
Contributor

Tests completed for environment: tm1-11-cloud. Check artifacts for details.

@MariusWirtz MariusWirtz merged commit 0f56230 into master Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add skip_invalid_edges argument to ElementService.delete_edges function

2 participants