Skip to content

BUG/MNT: return InvalidResult if container is malformed#362

Merged
tangkong merged 8 commits intopcdshub:masterfrom
tangkong:bug_dict_invalid
Jun 10, 2025
Merged

BUG/MNT: return InvalidResult if container is malformed#362
tangkong merged 8 commits intopcdshub:masterfrom
tangkong:bug_dict_invalid

Conversation

@tangkong
Copy link
Contributor

@tangkong tangkong commented Jun 3, 2025

Description

Creates an InvalidResult that may be returned if a container is malformed. Exceptions are still raised if keys do not exist. This does change the behavior of a few methods, which used to simply skip results that couldn't be created.

This could be considered an API break.

Fixes a variety of type hinting errors along the way

Motivation and Context

#299

Also I wanted to test pcds-6.0.1 development

How Has This Been Tested?

Mostly through test suite

Where Has This Been Documented?

This PR

Pre-merge checklist

  • Code works interactively
  • Code contains descriptive docstrings, including context and API
  • New/changed functions and methods are covered in the test suite where possible
  • Test suite passes locally
  • Test suite passes on GitHub Actions
  • Ran docs/pre-release-notes.sh and created a pre-release documentation page
  • Pre-release docs include context, functional descriptions, and contributors as appropriate

@tangkong tangkong requested a review from a team as a code owner June 3, 2025 18:57
Co-authored-by: Zachary Lentz <ZLLentz@users.noreply.github.com>
Copy link
Member

@ZLLentz ZLLentz left a comment

Choose a reason for hiding this comment

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

This makes sense and I think is well-motivated.
I'm trying to be a little cautious because it is an API break on some level.
For users with well-formed databases it will behave the same at least.

ZLLentz
ZLLentz previously approved these changes Jun 4, 2025
Copy link
Member

@ZLLentz ZLLentz left a comment

Choose a reason for hiding this comment

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

I'm on board. Not sure if you want to let this sit and percolate or not (it's an API break after all).

Co-authored-by: Zachary Lentz <ZLLentz@users.noreply.github.com>
@tangkong
Copy link
Contributor Author

tangkong commented Jun 9, 2025

I'll merge this as is (with extra docs context added). I'll go about making followup issues for the unresolved comments.

@tangkong tangkong merged commit 1b9e372 into pcdshub:master Jun 10, 2025
8 checks passed
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.

2 participants