From c3cfdea0c6914eae136e22859c3a77b44e7a22b2 Mon Sep 17 00:00:00 2001 From: Michael Foster Date: Tue, 28 Mar 2023 13:29:02 +0100 Subject: [PATCH 1/4] Added citation.cff --- citation.cff | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 citation.cff diff --git a/citation.cff b/citation.cff new file mode 100644 index 00000000..ae6fe003 --- /dev/null +++ b/citation.cff @@ -0,0 +1,20 @@ +cff-version: 1.0.0 +message: "If you use this software, please cite it as below." +authors: + - family-names: Clark + given-names: Andrew + - family-names: Foster + given-names: Michael + orcid: https://orcid.org/0000-0001-8233-9873 + - family-names: Somers + given-names: Richard + - family-names: Turner + given-names: Robert + - family-names: Walkinshaw + given-names: Neil + - family-names: Wild + given-names: Christopher +title: "Causal Testing Framework" +version: 3.1.0 +doi: https://doi.org/10.48550/arXiv.2209.00357 +date-released: 2023-03-30 From 456fbdf27de3ad309a54df8f392d432628095c64 Mon Sep 17 00:00:00 2001 From: Michael Foster Date: Tue, 28 Mar 2023 13:33:14 +0100 Subject: [PATCH 2/4] Black --- tests/specification_tests/test_metamorphic_relations.py | 6 +++--- tests/specification_tests/test_variable.py | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/specification_tests/test_metamorphic_relations.py b/tests/specification_tests/test_metamorphic_relations.py index 0bd836ac..951ac729 100644 --- a/tests/specification_tests/test_metamorphic_relations.py +++ b/tests/specification_tests/test_metamorphic_relations.py @@ -106,9 +106,9 @@ def test_should_cause_metamorphic_relations_correct_spec_one_input(self): self.data_collector = SingleInputProgramUnderTestEDC( self.scenario, self.default_control_input_config, self.default_treatment_input_config ) - causal_dag.graph.remove_nodes_from(['X2', 'X3']) - adj_set = list(causal_dag.direct_effect_adjustment_sets(['X1'], ['Z'])[0]) - should_cause_MR = ShouldCause('X1', 'Z', adj_set, causal_dag) + causal_dag.graph.remove_nodes_from(["X2", "X3"]) + adj_set = list(causal_dag.direct_effect_adjustment_sets(["X1"], ["Z"])[0]) + should_cause_MR = ShouldCause("X1", "Z", adj_set, causal_dag) should_cause_MR.generate_follow_up(10, -10.0, 10.0, 1) test_results = should_cause_MR.execute_tests(self.data_collector) should_cause_MR.test_oracle(test_results) diff --git a/tests/specification_tests/test_variable.py b/tests/specification_tests/test_variable.py index e2ece117..cc76df6a 100644 --- a/tests/specification_tests/test_variable.py +++ b/tests/specification_tests/test_variable.py @@ -133,7 +133,6 @@ class Var(Variable): var = Var("v", int) self.assertEqual(var.typestring(), "Var") - def test_copy(self): ip = Input("ip", float, norm) self.assertTrue(ip.copy() is not ip) @@ -173,7 +172,7 @@ def test_neg(self): self.assertEqual(str(-self.i1), "-i1") def test_pow(self): - self.assertEqual(str(self.i1 ** 5), "i1**5") + self.assertEqual(str(self.i1**5), "i1**5") def test_le(self): self.assertEqual(str(self.i1 <= 5), "i1 <= 5") From 9d83f26e3d51c2a64908d419b3c6c5c3f445e7ae Mon Sep 17 00:00:00 2001 From: Richard Somers Date: Tue, 28 Mar 2023 13:33:37 +0100 Subject: [PATCH 3/4] R Somers ORCID --- citation.cff | 1 + 1 file changed, 1 insertion(+) diff --git a/citation.cff b/citation.cff index ae6fe003..7b1dd551 100644 --- a/citation.cff +++ b/citation.cff @@ -8,6 +8,7 @@ authors: orcid: https://orcid.org/0000-0001-8233-9873 - family-names: Somers given-names: Richard + orcid: https://orcid.org/0000-0002-1101-9722 - family-names: Turner given-names: Robert - family-names: Walkinshaw From 502c3f84c64813db292c7db9c9adec6b12cea123 Mon Sep 17 00:00:00 2001 From: Michael Foster <13611658+jmafoster1@users.noreply.github.com> Date: Thu, 30 Mar 2023 11:19:23 +0100 Subject: [PATCH 4/4] Add Bob's ORCID Co-authored-by: bobturneruk <34244196+bobturneruk@users.noreply.github.com> --- citation.cff | 1 + 1 file changed, 1 insertion(+) diff --git a/citation.cff b/citation.cff index 7b1dd551..cfd9fd15 100644 --- a/citation.cff +++ b/citation.cff @@ -11,6 +11,7 @@ authors: orcid: https://orcid.org/0000-0002-1101-9722 - family-names: Turner given-names: Robert + orcid: https://orcid.org/0000-0002-1353-1404 - family-names: Walkinshaw given-names: Neil - family-names: Wild