Skip to content
Snippets Groups Projects
Commit 8dc331e7 authored by Coda Phillips's avatar Coda Phillips
Browse files

Check that all variables are updated when promised

parent 4f547c2a
No related branches found
No related tags found
No related merge requests found
...@@ -120,8 +120,9 @@ class BaseCheckList: ...@@ -120,8 +120,9 @@ class BaseCheckList:
def compute(self, frame): def compute(self, frame):
# Filter bad records from previous level # Filter bad records from previous level
filtered_frame = frame.ix[frame.qc_percent < 1].copy() filtered_frame = frame.ix[frame.qc_percent < 1].copy()
for check in self.checks: for check, metadata in self.checks.items():
original_shape = filtered_frame.shape original_shape = filtered_frame.shape
filtered_frame = check(filtered_frame, self.parameters) filtered_frame = check(filtered_frame, self.parameters)
assert filtered_frame.shape[0] == original_shape[0] assert filtered_frame.shape[0] == original_shape[0]
assert np.in1d(list(metadata['updates']), filtered_frame.columns).all()
return self.update_qc_percent(filtered_frame.combine_first(frame)) return self.update_qc_percent(filtered_frame.combine_first(frame))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment