Skip to content

Commit 08f5437

Browse files
committed
Addressed comments
1 parent 59f0657 commit 08f5437

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

causal_testing/json_front/json_class.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,9 @@ def _setup_test(
231231
"""Create the necessary inputs for a single test case
232232
:param causal_test_case: The concrete test case to be executed
233233
:param test: Single JSON test definition stored in a mapping (dict)
234+
:param conditions: A list of conditions which should be applied to the
235+
data. Conditions should be in the query format detailed at
236+
https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.query.html
234237
:returns:
235238
- causal_test_engine - Test Engine instance for the test being run
236239
- estimation_model - Estimator instance for the test being run

causal_testing/specification/causal_dag.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ def identification(self, base_test_case: BaseTestCase):
521521
minimal_adjustment_set = min(minimal_adjustment_sets, key=len)
522522
return minimal_adjustment_set
523523

524-
def to_dot(self) -> str:
524+
def to_dot_string(self) -> str:
525525
"""Return a string of the DOT representation of the causal DAG.
526526
:return DOT string of the DAG.
527527
"""

tests/specification_tests/test_causal_dag.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ def test_empty_casual_dag(self):
9999
causal_dag = CausalDAG()
100100
assert list(causal_dag.graph.nodes) == [] and list(causal_dag.graph.edges) == []
101101

102-
def test_to_dot(self):
102+
def test_to_dot_string(self):
103103
causal_dag = CausalDAG(self.dag_dot_path)
104-
self.assertEqual(causal_dag.to_dot(), """digraph G {\nA -> B;\nB -> C;\nD -> A;\nD -> C;\n}""")
104+
self.assertEqual(causal_dag.to_dot_string(), """digraph G {\nA -> B;\nB -> C;\nD -> A;\nD -> C;\n}""")
105105

106106
def tearDown(self) -> None:
107107
remove_temp_dir_if_existent()

0 commit comments

Comments
 (0)