From 4f7b2457ff0e05c99597b2d6799e592f17b18f2e Mon Sep 17 00:00:00 2001 From: Farhad Allian Date: Tue, 14 Oct 2025 10:46:39 +0100 Subject: [PATCH] small fixes in the codebase --- .gitignore | 1 + causal_testing/estimation/abstract_estimator.py | 2 +- causal_testing/estimation/abstract_regression_estimator.py | 2 +- causal_testing/estimation/cubic_spline_estimator.py | 2 +- causal_testing/estimation/experimental_estimator.py | 4 ++-- causal_testing/estimation/linear_regression_estimator.py | 2 +- pyproject.toml | 1 + 7 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index fc5a8b3c..60c31aee 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ data/*.xls data/*.xlsx causal_testing_framework .idea +.venv .DS_Store */.DS_Store # Byte-compiled / optimized / DLL files diff --git a/causal_testing/estimation/abstract_estimator.py b/causal_testing/estimation/abstract_estimator.py index 782aeb08..b799ee01 100644 --- a/causal_testing/estimation/abstract_estimator.py +++ b/causal_testing/estimation/abstract_estimator.py @@ -38,7 +38,7 @@ def __init__( control_value: float, adjustment_set: set, df: pd.DataFrame = None, - effect_modifiers: dict[str:Any] = None, + effect_modifiers: dict[str, Any] = None, alpha: float = 0.05, query: str = "", ): diff --git a/causal_testing/estimation/abstract_regression_estimator.py b/causal_testing/estimation/abstract_regression_estimator.py index 64f6c77c..53597a0f 100644 --- a/causal_testing/estimation/abstract_regression_estimator.py +++ b/causal_testing/estimation/abstract_regression_estimator.py @@ -28,7 +28,7 @@ def __init__( control_value: float, adjustment_set: set, df: pd.DataFrame = None, - effect_modifiers: dict[Variable:Any] = None, + effect_modifiers: dict[Variable, Any] = None, formula: str = None, alpha: float = 0.05, query: str = "", diff --git a/causal_testing/estimation/cubic_spline_estimator.py b/causal_testing/estimation/cubic_spline_estimator.py index fa6a46ce..2fec6496 100644 --- a/causal_testing/estimation/cubic_spline_estimator.py +++ b/causal_testing/estimation/cubic_spline_estimator.py @@ -28,7 +28,7 @@ def __init__( adjustment_set: set, basis: int, df: pd.DataFrame = None, - effect_modifiers: dict[Variable:Any] = None, + effect_modifiers: dict[Variable, Any] = None, formula: str = None, alpha: float = 0.05, expected_relationship=None, diff --git a/causal_testing/estimation/experimental_estimator.py b/causal_testing/estimation/experimental_estimator.py index ce2d6faa..e94959d0 100644 --- a/causal_testing/estimation/experimental_estimator.py +++ b/causal_testing/estimation/experimental_estimator.py @@ -21,8 +21,8 @@ def __init__( base_test_case: BaseTestCase, treatment_value: float, control_value: float, - adjustment_set: dict[str:Any], - effect_modifiers: dict[str:Any] = None, + adjustment_set: dict[str, Any], + effect_modifiers: dict[str, Any] = None, alpha: float = 0.05, repeats: int = 200, ): diff --git a/causal_testing/estimation/linear_regression_estimator.py b/causal_testing/estimation/linear_regression_estimator.py index aee433d2..fcc1d8ae 100644 --- a/causal_testing/estimation/linear_regression_estimator.py +++ b/causal_testing/estimation/linear_regression_estimator.py @@ -31,7 +31,7 @@ def __init__( control_value: float, adjustment_set: set, df: pd.DataFrame = None, - effect_modifiers: dict[Variable:Any] = None, + effect_modifiers: dict[Variable, Any] = None, formula: str = None, alpha: float = 0.05, query: str = "", diff --git a/pyproject.toml b/pyproject.toml index 1b8b1787..9a845844 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,6 +43,7 @@ dev = [ "myst-parser", "sphinx-autoapi", "sphinx_rtd_theme", + "tqdm", ] test = [ "covasim~=3.0.7",