Repository navigation
Remove validate_file() and LiftValidationError - #49
Open
imnasnainaec wants to merge 1 commit into
Open
imnasnainaec wants to merge 1 commit into
imnasnainaec wants to merge 1 commit into
Conversation
validate_file() was iter_problems() raising on the first error-level problem, and the only thing that raised LiftValidationError. It took no require_ids, so it could not serve the re-import gate where fail-fast matters most, and the fail-fast check is a one-line any() over iter_problems(), which the validate guide now shows. CLI pipelines already get it from the exit code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes
validate_file()andLiftValidationErrorfrom the public API (R1 of the #30 API surface review).sil_lift.__all__ iter_problems(path, *, require_ids=False) Lexicon.iter_problems(*, require_ids=False) Problem LiftError LiftParseError LiftWriteError - LiftValidationError - validate_file(path)validate_file()wasiter_problems()that raised on the first error. It was the only thing that raisedLiftValidationError, and it took norequire_ids, so it couldn't back the re-import gate. The validate guide now shows the fail-fast check written againstiter_problems()instead:The CHANGELOG's 0.1.0 Validation entry no longer lists
validate_file(). 0.1.0 is unreleased, so this needs no "Removed" entry.Evidence
test_validate_file_raises_on_first_errorandtest_validate_file_passes_on_warning_only_filesexercised the wrapper.After: both removed.
ruff check,ruff format --check,mypy --strict,pytest(688 passed, 5 skipped), andmkdocs build --strictall pass.Merge Danger
Door: two-way
Nothing has been published yet, so restoring the function means reverting this commit. After 1.0, adding it back would be additive (minor) and removing it again would be major.
Blast Radius: none
No
src/caller, CLI path, or Action input used either name.Refs #30
🤖 Generated with Claude Code
This change is