Skip to content

Datatype validator fix#1904

Merged
braingram merged 3 commits intoasdf-format:mainfrom
braingram:datatype_validator_fix
Apr 3, 2025
Merged

Datatype validator fix#1904
braingram merged 3 commits intoasdf-format:mainfrom
braingram:datatype_validator_fix

Conversation

@braingram
Copy link
Copy Markdown
Contributor

Description

This PR replaces the use of raise ValidationError in validate_datatype with yield ValidationError to allow use of datatype validators in schema combiners (see #1903).

Fixes: #1903

Tasks

  • run pre-commit on your machine
  • run pytest on your machine
  • Does this PR add new features and / or change user-facing code / API? (if not, label with no-changelog-entry-needed)
    • write news fragment(s) in changes/: echo "changed something" > changes/<PR#>.<changetype>.rst (see below for change types)
    • update relevant docstrings and / or docs/ page
    • for any new features, add unit tests
news fragment change types...
  • changes/<PR#>.feature.rst: new feature
  • changes/<PR#>.bugfix.rst: bug fix
  • changes/<PR#>.doc.rst: documentation change
  • changes/<PR#>.removal.rst: deprecation or removal of public API
  • changes/<PR#>.general.rst: infrastructure or miscellaneous change

@braingram braingram marked this pull request as ready for review February 12, 2025 17:34
@braingram braingram requested a review from a team as a code owner February 12, 2025 17:34
@braingram braingram force-pushed the datatype_validator_fix branch from 7a28f04 to 0c1371b Compare March 12, 2025 18:18
@braingram braingram force-pushed the datatype_validator_fix branch from 0c1371b to 0f47b57 Compare March 18, 2025 14:14
@braingram braingram force-pushed the datatype_validator_fix branch from 0f47b57 to 6988c91 Compare April 3, 2025 13:06
Copy link
Copy Markdown

@perrygreenfield perrygreenfield left a comment

Choose a reason for hiding this comment

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

LGTM

@braingram braingram merged commit 513ddf1 into asdf-format:main Apr 3, 2025
34 of 35 checks passed
@braingram braingram deleted the datatype_validator_fix branch April 3, 2025 13:34
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.

validate_datatype raises instead of yield preventing some schema combiner usage

2 participants