This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
Guard plot_cross_validation.save_outliers for institutionId and seriesId columns confirm with unit test #446
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.
Fixing Issue #423
Overview:
Guarding the call to
create_portal_query_for_outliers
so that the required columns are present, and providing unit test that confirms the change.Detail:
The functions
save_outliers
andcreate_portal_query_for_outliers
inInnerEye.ML.cisualizers.lot_cross_validation
fail if the columns institutionId and seriesId are missing from the data. This PR
create_portal_query_for_outliers
so that it checks for the required columns and raises an informativeValueError
if they are missing. The function description is updated accordingly.save_outliers
in two ways. If the columns are missinggroupby
which gleans the stats, andsave_outliers
produces expected data when the columns are missingtest_save_outliers
andtest_create_portal_query_for_outliers
inTests.ML.visualizers.test_plot_cross_validation
are extended to exercise the new code with columns missing.Checklist:
Run PyCharm's code cleanup tools on your Python files.(I'm using VS Code and have not done this.)Added/Changed/Removed/... in the "Upcoming" section.
and if needed a motivation why that change was required.