Skip to content

Feat remove ied duplicates issue#146

Open
stee-re wants to merge 4 commits intoOpenEnergyTools:mainfrom
stee-re:feat_removeIED-duplicates-issue
Open

Feat remove ied duplicates issue#146
stee-re wants to merge 4 commits intoOpenEnergyTools:mainfrom
stee-re:feat_removeIED-duplicates-issue

Conversation

@stee-re
Copy link
Copy Markdown
Collaborator

@stee-re stee-re commented Apr 27, 2026

Resolves #121

Summary

When multiple IEDs reference the same LNode, removing those IEDs sequentially can result in duplicate LNode
entries with iedName="None". This PR adds an option to detect and remove such duplicates instead of
creating redundant entries, by default. Callers can use the options to prevent this happening:

remove(myIEDElement, {removeLNodes: false});

Changes

  • tIED/removeIED.ts:
    • Added RemoveIedOptions interface with a removeLNodes flag (defaults to true)
    • Introduced a lNodeKey() helper to compute a unique key per LNode
    • When removeLNodes is true (default), duplicate LNodes already set to "None" are removed rather
      than duplicated
    • When removeLNodes is false, LNodes are only updated to "None" (previous behaviour)
  • index.ts: Exported RemoveIedOptions type
  • tIED/removeIED.spec.ts: Added tests for duplicate removal and opt-out behaviour
  • tIED/removeIED.testfile.ts: Added test fixture with duplicate LNode scenario
  • .gitignore: Added IDE and build artifact patterns

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.

tIED: removeIeds behaviours with LNodes

2 participants