-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Task 42: recreating the PR #50
Conversation
Coverage reportThe coverage rate went from
Diff Coverage details (click to unfold)src/tests/test_schema_functions.py
src/validator/main.py
src/validator/create_schemas.py
|
|
||
class TestValidate: | ||
util = TestUtil() | ||
phase1_schema = get_phase_1_schema_for_lei() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add (positive and negative) tests with LEI value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
src/validator/create_schemas.py
Outdated
raise AttributeError(f"{str(check)}") | ||
|
||
if hasattr(check, "id"): | ||
check_id: str = check.id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can add this logic to Ln 56 . Our checks should have id and name defined or else it should throw attribute error
|
||
def test_with_invalid_data(self): | ||
result = validate_phases(pd.DataFrame(data=self.util.get_data({"ct_credit_product": ["989"]}))) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also add tests with LEI defined
This looks good to me. Probably need to have another pair of eyes to review this since this PR is using a bit of code from my WIP branch #32 |
Looks mostly fine for now; I'd like something in the future to refactor the the |
@hkeeler , I believe this is still the plan? |
Yes, that's correct. If phase 1 fails, we want it to stop processing. |
@lchen-2101 Any changes needed to be done? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, will merge; please make a ticket to refactor the the SchemaErrors processing part into more readable self documenting code.
Co-authored-by: Nargis Sultani <nargis.sultani@cfpb.gov>
No description provided.