Skip to content

Create ElementWrapper.find and ElementWrapper.findall#114

Merged
pressler-vsc merged 1 commit intomainfrom
elementwrapper-child-selector
Mar 19, 2026
Merged

Create ElementWrapper.find and ElementWrapper.findall#114
pressler-vsc merged 1 commit intomainfrom
elementwrapper-child-selector

Conversation

@pressler-vsc
Copy link
Copy Markdown
Contributor

Description

Credit to @mtrachy

This PR adds find and findall methods to ElementWrapper, which should significantly improve the UX for CPHD/CRSD-esque identifier-based element lookups.

Examples from UG

>>> wrappedsicd["ImageFormation"].find("Processing", Type="inscription")
ElementWrapper({'Type': 'inscription', 'Applied': True, 'Parameter': (('krange', 'fixed'), ('kazimuth', 'fixed'))})
 >>> wrappedsicd["ImageFormation"].find("Processing", Applied=True)
ElementWrapper({'Type': 'inscription', 'Applied': True, 'Parameter': (('krange', 'fixed'), ('kazimuth', 'fixed'))})
 >>> wrappedsicd["ImageFormation"].find("Processing", Applied=False) is None
True

@pressler-vsc pressler-vsc merged commit 0b2379a into main Mar 19, 2026
5 checks passed
@pressler-vsc pressler-vsc deleted the elementwrapper-child-selector branch March 19, 2026 17:37
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.

3 participants