-
Notifications
You must be signed in to change notification settings - Fork 0
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: structure validator CLI output #47
Conversation
Fixing linter issues |
Coverage reportThe coverage rate went from
Diff Coverage details (click to unfold)src/validator/create_schemas.py
src/validator/main.py
|
Is this ready for review? just heads up: I see this error when running validator against the good and bad CSV files:
Also, we should add unit tests for create_schemas. Create_schemas was being used for local testing so that's why we didn't have unit tests. Now, we are using it to generate JSON data that will be called by API so we should add unit tests for it. I created unit tests for create_schemas in my WIP branch: src/tests/test_schema_functions.py. |
I don't see that locally, working fine. But I can add the unit tests. |
phase_2_sblar_schema(df, lazy=True) | ||
except SchemaErrors as errors: | ||
print_schema_errors(errors, "Phase 2") | ||
print(validate_phases_by_lei(df, 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.
this validate_phases_by_lei
does not exist in create_schemas
.
If you run /usr/local/bin/python /workspaces/regtech-data-validator/src/validator/main.py SBL_Validations_SampleData_GoodFile_03312 023.csv
, you'll see this error ImportError: cannot import name 'validate_phases_by_lei' from 'create_schemas' (/workspaces/regtech-data-validator/src/validator/create_schemas.py)
def get_phase_1_schema_for_lei(lei: str = None): | ||
return get_schema_by_phase_for_lei(phase_1_template, "phase_1", lei) | ||
|
||
|
||
def get_phase_2_schema_for_lei(lei: str = None): | ||
return get_schema_by_phase_for_lei(phase_2_template, "phase_2", lei) | ||
|
||
|
||
def validate(schema: DataFrameSchema, df: pd.DataFrame): |
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.
FYI: functions in #32 does not handle LEI so you'll need update them to handle LEI check
src/validator/create_schemas.py
Outdated
return findings | ||
|
||
|
||
def validate_phases(phase1: DataFrameSchema, phase2: DataFrameSchema, df: pd.DataFrame) -> list: |
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.
FYI: functions in #32 does not handle LEI so you'll need update them to handle LEI check
closing it because it works on my local branch but not on this PR, will recreate |
No description provided.