Skip to content

Commit c68e335

Browse files
authored
Merge pull request #1123 from cmu-delphi/validator-se-bugfixes
Fix Check SE errors
2 parents 2c20a75 + bb8c6a2 commit c68e335

File tree

1 file changed

+4
-4
lines changed
  • _delphi_utils_python/delphi_utils/validator

1 file changed

+4
-4
lines changed

_delphi_utils_python/delphi_utils/validator/static.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,8 @@ def check_bad_se(self, df_to_test, nameformat, report):
328328
df_to_test.eval(
329329
'se_upper_limit = (val * sample_size + 50)/(sample_size + 1)', inplace=True)
330330

331-
df_to_test['se'] = df_to_test['se'].round(3)
332-
df_to_test['se_upper_limit'] = df_to_test['se_upper_limit'].round(3)
331+
df_to_test['se'] = df_to_test['se'].round(5)
332+
df_to_test['se_upper_limit'] = df_to_test['se_upper_limit'].round(5)
333333

334334
if self.params.missing_se_allowed:
335335
result = df_to_test.query(
@@ -345,13 +345,13 @@ def check_bad_se(self, df_to_test, nameformat, report):
345345
else:
346346
# Find rows not in the allowed range for se.
347347
result = df_to_test.query(
348-
'~((se > 0) & (se < 50) & (se <= se_upper_limit))')
348+
'~((se >= 0) & (se < 50) & (se <= se_upper_limit))')
349349

350350
if not result.empty:
351351
report.add_raised_error(
352352
ValidationFailure("check_se_not_missing_and_in_range",
353353
filename=nameformat,
354-
message="se must be in (0, min(50,val*(1+eps))] and not "
354+
message="se must be in [0, min(50,val*(1+eps))] and not "
355355
"missing"))
356356

357357
report.increment_total_checks()

0 commit comments

Comments
 (0)