Skip to content
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, creating tests for SampleData GoodFile and BadFile #56

Merged
merged 8 commits into from
Sep 28, 2023

Conversation

nargis-sultani
Copy link
Contributor

@nargis-sultani nargis-sultani commented Sep 27, 2023

Closes #52

I misunderstood the requirements first. I thought we had to create tests to make sure the GoodFile had the correct data for each field. I understood the requirements later.

@github-actions
Copy link

github-actions bot commented Sep 27, 2023

Coverage report

The coverage rate went from 93.34% to 93.6% ⬆️
The branch rate is 82%.

100% of new lines are covered.

Diff Coverage details (click to unfold)

src/tests/test_sample_data.py

100% of new lines are covered (100% of the complete file).

@aharjati
Copy link
Contributor

I think we're going to use src/validator/sample_data.py only for testing so I think it's probably better to put all of these code in the test file : src/tests/test_sample_data.py

@nargis-sultani
Copy link
Contributor Author

I think we're going to use src/validator/sample_data.py only for testing so I think it's probably better to put all of these code in the test file : src/tests/test_sample_data.py

I agree. Doing it now.

@aharjati
Copy link
Contributor

I think we should organize CSV files into a folder and remove unused example_sblar.xlsx . let me know what you think

@nargis-sultani
Copy link
Contributor Author

I think we should organize CSV files into a folder and remove unused example_sblar.xlsx . let me know what you think

That's what I was thinking of too. I can do that

lei = "000TESTFIUIDDONOTUS1"
validation_result = validate_phases(self.bad_file_df, lei)

print(validation_result)
Copy link
Contributor

Choose a reason for hiding this comment

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

do you still need this?

@@ -26,7 +26,6 @@ def run_validation_on_df(df: pd.DataFrame, lei: str) -> None:
print("")
print(df)
print("")

print(validate_phases(df, lei))
Copy link
Contributor

Choose a reason for hiding this comment

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

can you undo this space change?

Copy link
Member

@hkeeler hkeeler left a comment

Choose a reason for hiding this comment

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

Overall looks good. Put in a few suggestions.

Seeing this also makes me realize that the response should be made more consistent whether there are validation findings or not. That's not something we need to fix for on this PR, though.

src/tests/test_sample_data.py Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
@nargis-sultani nargis-sultani merged commit 98da8ef into main Sep 28, 2023
3 checks passed
@nargis-sultani nargis-sultani deleted the features/52_testing_for_good_and_bad_data_files branch September 28, 2023 23:04
jcadam14 pushed a commit that referenced this pull request May 3, 2024
Closes #52 

I misunderstood the requirements first. I thought we had to create tests
to make sure the GoodFile had the correct data for each field. I
understood the requirements later.

---------

Co-authored-by: Nargis Sultani <[email protected]>
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.

Creating tests using test data files
3 participants