feat: add robust validation and 100% branch coverage for _derive_grade#63
Open
BHOGALA-SRIKA wants to merge 2 commits into
Open
feat: add robust validation and 100% branch coverage for _derive_grade#63BHOGALA-SRIKA wants to merge 2 commits into
BHOGALA-SRIKA wants to merge 2 commits into
Conversation
|
@BHOGALA-SRIKA is attempting to deploy a commit to the karan3431's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
🎉 Thank you for your Pull Request! We're thrilled to have your contribution to FreshScan AI. Before we review, please make sure you have:
A maintainer will review your code as soon as possible! |
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.
Closes #10
Description
This PR resolves the issue tracking critical business logic testing for the backend grading utility. It introduces comprehensive validation checking and branch coverage for
_derive_gradeinmain.pyto prevent regression bugs.Changes Made
isinstanceto catch and gracefully reject non-numeric inputs (str,NoneType,list,bool), raising a cleanValueErrorinstead of unhandled runtime crashes.0and100inclusive.sys.modulesinterception intests/test_ci.pyto isolate tests from heavy third-party framework layers (torchbinary paths andsupabasenetwork connections), dropping local CI suite test execution to < 2 seconds.Checklist
npm run lintpasses with no errorsnpm run buildcompiles without TypeScript errorspython -m pytestpasses (including new tests I added).envfiles, API keys, secrets, model weights, or__pycache__in this diffmain, not merged