Skip to content

Commit fed97ad

Browse files
authored
Merge pull request #355 from CITCOM-project/jmafoster1/remove-unnecessary-print-statement
Removed deubugging print satement from `NoEffect` class
2 parents e7371aa + 20aace7 commit fed97ad

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

causal_testing/testing/causal_effect.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def __init__(self, atol: float = 1e-10, ctol: float = 0.05):
5656
self.ctol = ctol
5757

5858
def apply(self, res: CausalTestResult) -> bool:
59-
if res.effect_estimate.type in ("risk_ratio", "hazard_ratio", "unit_odds_ratio"):
59+
if res.effect_estimate.type in ("risk_ratio", "hazard_ratio", "unit_odds_ratio", "odds_ratio"):
6060
return any(
6161
ci_low < 1 < ci_high or np.isclose(value, 1.0, atol=self.atol)
6262
for ci_low, ci_high, value in zip(
@@ -69,8 +69,6 @@ def apply(self, res: CausalTestResult) -> bool:
6969
if isinstance(res.effect_estimate.ci_high, Iterable)
7070
else [res.effect_estimate.value]
7171
)
72-
for ci_low, ci_high, v in zip(res.effect_estimate.ci_low, res.effect_estimate.ci_high, value):
73-
print(not ((ci_low < 0 < ci_high) or abs(v) < self.atol))
7472
return (
7573
sum(
7674
not ((ci_low < 0 < ci_high) or abs(v) < self.atol)

causal_testing/testing/metamorphic_relation.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,11 @@ def generate_causal_tests(
244244
if len(list(causal_dag.predecessors(relation.base_test_case.outcome_variable))) > 0
245245
]
246246

247-
logger.warning("The skip parameter is hard-coded to False during test generation for better integration with the "
248-
"causal testing component (python -m causal_testing test ...)"
249-
"Please carefully review the generated tests and decide which to skip.")
247+
logger.warning(
248+
"The skip parameter is hard-coded to False during test generation for better integration with the "
249+
"causal testing component (python -m causal_testing test ...)"
250+
"Please carefully review the generated tests and decide which to skip."
251+
)
250252

251253
logger.info(f"Generated {len(tests)} tests. Saving to {output_path}.")
252254
with open(output_path, "w", encoding="utf-8") as f:

0 commit comments

Comments
 (0)