causal-testing-framework 14.0.1__tar.gz → 14.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/.github/workflows/ci-tests-drafts.yaml +1 -1
  2. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/.github/workflows/ci-tests.yaml +1 -1
  3. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/.github/workflows/publish-to-dafni.yaml +1 -1
  4. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/.github/workflows/publish-to-pypi.yaml +1 -1
  5. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/.pre-commit-config.yaml +1 -1
  6. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/.readthedocs.yaml +3 -3
  7. {causal_testing_framework-14.0.1/causal_testing_framework.egg-info → causal_testing_framework-14.2.0}/PKG-INFO +13 -13
  8. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/README.md +3 -3
  9. causal_testing_framework-14.2.0/causal_testing/_version.py +24 -0
  10. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/estimation/abstract_regression_estimator.py +27 -4
  11. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/estimation/cubic_spline_estimator.py +15 -1
  12. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/estimation/ipcw_estimator.py +1 -1
  13. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/estimation/linear_regression_estimator.py +4 -3
  14. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/estimation/logistic_regression_estimator.py +2 -2
  15. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/main.py +25 -42
  16. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/testing/metamorphic_relation.py +13 -5
  17. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0/causal_testing_framework.egg-info}/PKG-INFO +13 -13
  18. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing_framework.egg-info/SOURCES.txt +2 -0
  19. causal_testing_framework-14.2.0/causal_testing_framework.egg-info/entry_points.txt +16 -0
  20. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing_framework.egg-info/requires.txt +8 -8
  21. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/dafni/entrypoint.sh +3 -3
  22. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/index.rst +1 -0
  23. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/installation.rst +3 -3
  24. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/modules/causal_testing.rst +1 -1
  25. causal_testing_framework-14.2.0/docs/source/modules/custom_estimators.rst +65 -0
  26. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/modules/estimators.rst +2 -0
  27. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/tutorials/poisson_line_process/poisson_line_process_tutorial.ipynb +2 -10
  28. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/tutorials/vaccinating_elderly/causal_test_results.json +11 -11
  29. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/tutorials/vaccinating_elderly/vaccinating_elderly_tutorial.ipynb +24 -21
  30. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/poisson-line-process/README.md +1 -1
  31. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/poisson-line-process/example_pure_python.py +22 -18
  32. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/pyproject.toml +28 -11
  33. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/tests/estimation_tests/test_linear_regression_estimator.py +3 -3
  34. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/tests/estimation_tests/test_logistic_regression_estimator.py +9 -0
  35. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/tests/main_tests/test_main.py +60 -4
  36. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/tests/resources/data/tests.json +10 -6
  37. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/tests/testing_tests/test_causal_test_adequacy.py +7 -6
  38. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/tests/testing_tests/test_metamorphic_relations.py +15 -4
  39. causal_testing_framework-14.0.1/causal_testing/_version.py +0 -34
  40. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  41. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  42. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/.github/workflows/figshare.yaml +0 -0
  43. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/.github/workflows/joss.yaml +0 -0
  44. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/.github/workflows/lint-format.yaml +0 -0
  45. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/.gitignore +0 -0
  46. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/.mega-linter.yaml +0 -0
  47. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/.pylintrc +0 -0
  48. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/CITATION.cff +0 -0
  49. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/CONTRIBUTING.md +0 -0
  50. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/LICENSE +0 -0
  51. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/__init__.py +0 -0
  52. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/__main__.py +0 -0
  53. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/estimation/__init__.py +0 -0
  54. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/estimation/abstract_estimator.py +0 -0
  55. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/estimation/effect_estimate.py +0 -0
  56. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/estimation/experimental_estimator.py +0 -0
  57. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/estimation/genetic_programming_regression_fitter.py +0 -0
  58. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/estimation/instrumental_variable_estimator.py +0 -0
  59. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/specification/__init__.py +0 -0
  60. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/specification/causal_dag.py +0 -0
  61. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/specification/scenario.py +0 -0
  62. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/specification/variable.py +0 -0
  63. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/surrogate/__init__.py +0 -0
  64. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/surrogate/causal_surrogate_assisted.py +0 -0
  65. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/surrogate/surrogate_search_algorithms.py +0 -0
  66. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/testing/__init__.py +0 -0
  67. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/testing/base_test_case.py +0 -0
  68. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/testing/causal_effect.py +0 -0
  69. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/testing/causal_test_adequacy.py +0 -0
  70. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/testing/causal_test_case.py +0 -0
  71. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/testing/causal_test_result.py +0 -0
  72. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/testing/effect.py +0 -0
  73. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/testing/intervention.py +0 -0
  74. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/utils/__init__.py +0 -0
  75. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing/utils/validation.py +0 -0
  76. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing_framework.egg-info/dependency_links.txt +0 -0
  77. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/causal_testing_framework.egg-info/top_level.txt +0 -0
  78. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/codecov.yml +0 -0
  79. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/dafni/.dockerignore +0 -0
  80. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/dafni/.env +0 -0
  81. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/dafni/Dockerfile +0 -0
  82. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/dafni/README.md +0 -0
  83. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/dafni/data/inputs/causal-tests/causal_tests.json +0 -0
  84. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/dafni/data/inputs/dag-data/dag.dot +0 -0
  85. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/dafni/data/inputs/runtime-data/runtime_data.csv +0 -0
  86. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/dafni/data/outputs/causal_test_results.json +0 -0
  87. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/dafni/docker-compose.yaml +0 -0
  88. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/dafni/model_definition.yaml +0 -0
  89. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/Makefile +0 -0
  90. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/README.md +0 -0
  91. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/make.bat +0 -0
  92. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/_static/css/custom.css +0 -0
  93. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/_static/images/CITCOM-logo-white.png +0 -0
  94. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/_static/images/CITCOM-logo.png +0 -0
  95. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/_static/images/Sheffield-logo.png +0 -0
  96. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/_static/images/example_dag.png +0 -0
  97. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/background.rst +0 -0
  98. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/conf.py +0 -0
  99. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/credits.rst +0 -0
  100. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/dev/actions_and_webhooks.rst +0 -0
  101. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/dev/documentation.rst +0 -0
  102. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/dev/version_release.rst +0 -0
  103. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/glossary.rst +0 -0
  104. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/modules/causal_specification.rst +0 -0
  105. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/requirements.txt +0 -0
  106. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/tutorials/poisson_line_process/causal_tests.json +0 -0
  107. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/tutorials/poisson_line_process/dag.dot +0 -0
  108. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/tutorials/poisson_line_process/dag.png +0 -0
  109. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/tutorials/poisson_line_process/data/random/data_random_1000.csv +0 -0
  110. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/tutorials/vaccinating_elderly/causal_tests.json +0 -0
  111. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/tutorials/vaccinating_elderly/dag.dot +0 -0
  112. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/tutorials/vaccinating_elderly/dag_image.png +0 -0
  113. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/tutorials/vaccinating_elderly/simulated_data.csv +0 -0
  114. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/tutorials/visualising_causal_test_results/visualise_causal_test_results.ipynb +0 -0
  115. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/docs/source/tutorials.rst +0 -0
  116. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/.gitignore +0 -0
  117. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/covasim_/doubling_beta/README.md +0 -0
  118. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/covasim_/doubling_beta/dag.dot +0 -0
  119. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/covasim_/doubling_beta/dag.png +0 -0
  120. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/covasim_/doubling_beta/data/10k_observational_data.csv +0 -0
  121. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/covasim_/doubling_beta/data/high_contacts_avg_age_22.2.csv +0 -0
  122. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/covasim_/doubling_beta/data/high_contacts_avg_age_30.1.csv +0 -0
  123. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/covasim_/doubling_beta/data/low_contacts_avg_age_22.2.csv +0 -0
  124. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/covasim_/doubling_beta/data/low_contacts_avg_age_30.1.csv +0 -0
  125. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/covasim_/doubling_beta/data/older_population.csv +0 -0
  126. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/covasim_/doubling_beta/data/younger_population.csv +0 -0
  127. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/covasim_/doubling_beta/example_beta.py +0 -0
  128. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/covasim_/vaccinating_elderly/README.md +0 -0
  129. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/covasim_/vaccinating_elderly/dag.dot +0 -0
  130. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/covasim_/vaccinating_elderly/dag.png +0 -0
  131. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/covasim_/vaccinating_elderly/example_vaccine.py +0 -0
  132. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/covasim_/vaccinating_elderly/simulated_data.csv +0 -0
  133. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/lr91/README.md +0 -0
  134. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/lr91/dag.dot +0 -0
  135. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/lr91/dag.png +0 -0
  136. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/lr91/data/normalised_results.csv +0 -0
  137. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/lr91/data/results.csv +0 -0
  138. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/lr91/example_max_conductances.py +0 -0
  139. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/poisson-line-process/.gitignore +0 -0
  140. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/poisson-line-process/causal_tests.json +0 -0
  141. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/poisson-line-process/dag.dot +0 -0
  142. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/poisson-line-process/dag.png +0 -0
  143. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/poisson-line-process/data/random/data_random_1000.csv +0 -0
  144. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/poisson-line-process/data/smt_100/data_smt_wh10_100.csv +0 -0
  145. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/poisson-line-process/data/smt_100/data_smt_wh1_100.csv +0 -0
  146. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/poisson-line-process/data/smt_100/data_smt_wh2_100.csv +0 -0
  147. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/poisson-line-process/data/smt_100/data_smt_wh3_100.csv +0 -0
  148. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/poisson-line-process/data/smt_100/data_smt_wh4_100.csv +0 -0
  149. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/poisson-line-process/data/smt_100/data_smt_wh5_100.csv +0 -0
  150. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/poisson-line-process/data/smt_100/data_smt_wh6_100.csv +0 -0
  151. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/poisson-line-process/data/smt_100/data_smt_wh7_100.csv +0 -0
  152. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/poisson-line-process/data/smt_100/data_smt_wh8_100.csv +0 -0
  153. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/poisson-line-process/data/smt_100/data_smt_wh9_100.csv +0 -0
  154. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/examples/poisson-line-process/poisson_line_process.ipynb +0 -0
  155. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/images/.gitignore +0 -0
  156. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/images/schematic-dark.png +0 -0
  157. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/images/schematic.png +0 -0
  158. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/images/schematic.tex +0 -0
  159. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/paper/paper.bib +0 -0
  160. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/paper/paper.md +0 -0
  161. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/setup.cfg +0 -0
  162. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/tests/__init__.py +0 -0
  163. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/tests/estimation_tests/test_cubic_spline_estimator.py +0 -0
  164. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/tests/estimation_tests/test_experimental_estimator.py +0 -0
  165. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/tests/estimation_tests/test_genetic_programming_regression_fitter.py +0 -0
  166. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/tests/estimation_tests/test_instrumental_variable_estimator.py +0 -0
  167. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/tests/estimation_tests/test_ipcw_estimator.py +0 -0
  168. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/tests/resources/data/dag.dot +0 -0
  169. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/tests/resources/data/dag.xml +0 -0
  170. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/tests/resources/data/data.csv +0 -0
  171. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/tests/resources/data/data.pqt +0 -0
  172. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/tests/resources/data/data_with_categorical.csv +0 -0
  173. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/tests/resources/data/data_with_meta.csv +0 -0
  174. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/tests/resources/data/nhefs.csv +0 -0
  175. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/tests/resources/data/scarf_data.csv +0 -0
  176. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/tests/resources/data/temporal_data.csv +0 -0
  177. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/tests/specification_tests/test_causal_dag.py +0 -0
  178. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/tests/specification_tests/test_variable.py +0 -0
  179. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/tests/surrogate_tests/test_causal_surrogate_assisted.py +0 -0
  180. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/tests/testing_tests/test_causal_effect.py +0 -0
  181. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/tests/testing_tests/test_causal_test_case.py +0 -0
  182. {causal_testing_framework-14.0.1 → causal_testing_framework-14.2.0}/tests/tutorial_tests/test_tutorials.py +0 -0
@@ -13,7 +13,7 @@ jobs:
13
13
  strategy:
14
14
  matrix:
15
15
  os: ["ubuntu-latest", "windows-latest", "macos-latest"]
16
- python-version: ["3.10", "3.11", "3.12"]
16
+ python-version: ["3.11", "3.12", "3.13", "3.14"]
17
17
  steps:
18
18
  - uses: actions/checkout@v4
19
19
  - name: Set up Python
@@ -18,7 +18,7 @@ jobs:
18
18
  strategy:
19
19
  matrix:
20
20
  os: ["ubuntu-latest", "windows-latest", "macos-latest"]
21
- python-version: ["3.10", "3.11", "3.12", "3.13"]
21
+ python-version: ["3.11", "3.12", "3.13", "3.14"]
22
22
  steps:
23
23
  - uses: actions/checkout@v4
24
24
  - name: Set up Python
@@ -40,7 +40,7 @@ jobs:
40
40
 
41
41
  - uses: actions/setup-python@v3
42
42
  with:
43
- python-version: '3.10'
43
+ python-version: '3.11'
44
44
 
45
45
  - name: Install dependencies
46
46
  run: |
@@ -16,7 +16,7 @@ jobs:
16
16
  - name: Set up Python
17
17
  uses: actions/setup-python@v3
18
18
  with:
19
- python-version: '3.10'
19
+ python-version: '3.11'
20
20
 
21
21
  - name: Install build tools
22
22
  run: |
@@ -19,7 +19,7 @@ repos:
19
19
  rev: 25.9.0
20
20
  hooks:
21
21
  - id: black
22
- args: ['--line-length=120', '--target-version=py310']
22
+ args: ['--line-length=120', '--target-version=py311']
23
23
  files: ^causal_testing/
24
24
 
25
25
  - repo: https://github.com/pycqa/isort
@@ -7,9 +7,9 @@ version: 2
7
7
 
8
8
  # Set the version of Python
9
9
  build:
10
- os: ubuntu-20.04
10
+ os: ubuntu-24.04
11
11
  tools:
12
- python: "3.10"
12
+ python: "3.11"
13
13
 
14
14
  # Build documentation in the docs/ directory with Sphinx
15
15
  sphinx:
@@ -24,4 +24,4 @@ python:
24
24
  install:
25
25
  - requirements: docs/source/requirements.txt
26
26
  - method: pip
27
- path: . # This should tell RTD to install the CTF from root to render the Estimators page correctly.
27
+ path: . # This should tell RTD to install the CTF from root to render the Estimators page correctly.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: causal_testing_framework
3
- Version: 14.0.1
3
+ Version: 14.2.0
4
4
  Summary: A framework for causal testing using causal directed acyclic graphs.
5
5
  Author: The CITCOM team
6
6
  License: MIT
@@ -9,23 +9,23 @@ Project-URL: Documentation, https://causal-testing-framework.readthedocs.io/
9
9
  Project-URL: Repository, https://github.com/CITCOM-project/CausalTestingFramework
10
10
  Project-URL: Issues, https://github.com/CITCOM-project/CausalTestingFramework/issues
11
11
  Keywords: causal inference,verification
12
- Requires-Python: <3.14,>=3.10
12
+ Requires-Python: <3.15,>=3.11
13
13
  Description-Content-Type: text/markdown
14
14
  License-File: LICENSE
15
- Requires-Dist: lifelines~=0.30.0
16
- Requires-Dist: networkx<3.5,>=3.4
17
- Requires-Dist: numpy<=2.2.0,>=1.26.0
18
- Requires-Dist: pandas<3,>=2.1
15
+ Requires-Dist: lifelines
16
+ Requires-Dist: networkx<3.7,>=3.4
17
+ Requires-Dist: numpy<=2.4.4,>=1.26.0
18
+ Requires-Dist: pandas>=2.1
19
19
  Requires-Dist: scikit_learn~=1.4
20
- Requires-Dist: scipy<=1.16.2,>=1.12.0
20
+ Requires-Dist: scipy<=1.17.1,>=1.12.0
21
21
  Requires-Dist: statsmodels~=0.14
22
22
  Requires-Dist: tabulate~=0.9
23
23
  Requires-Dist: pydot~=2.0
24
24
  Requires-Dist: pygad~=3.3
25
25
  Requires-Dist: deap~=1.4.1
26
- Requires-Dist: sympy~=1.13.1
27
- Requires-Dist: pyarrow~=19.0.1
28
- Requires-Dist: fastparquet~=2024.11.0
26
+ Requires-Dist: sympy~=1.14.0
27
+ Requires-Dist: pyarrow<25,>=19.0.1
28
+ Requires-Dist: fastparquet>=2024.11.0
29
29
  Requires-Dist: tqdm~=4.67.1
30
30
  Provides-Extra: dev
31
31
  Requires-Dist: astroid==3.3.8; extra == "dev"
@@ -78,7 +78,7 @@ a deliberate modification to the input configuration expected to produce a corre
78
78
  ## Installation
79
79
 
80
80
  ### Requirements
81
- - Python 3.10, 3.11, 3.12 and 3.13
81
+ - Python 3.11, 3.12, 3.13 and 3.14
82
82
 
83
83
  ### Recommended: Install from conda-forge
84
84
 
@@ -140,12 +140,12 @@ For more information on how to use the Causal Testing Framework, please refer to
140
140
 
141
141
  2. If you do not already have causal test cases, you can convert your causal DAG to causal tests by running the following command.
142
142
  ```
143
- python -m causal_testing generate --dag-path $PATH_TO_DAG --output $PATH_TO_TESTS
143
+ causal-testing generate --dag-path $PATH_TO_DAG --output $PATH_TO_TESTS
144
144
  ```
145
145
 
146
146
  3. You can now execute your tests by running the following command.
147
147
  ```
148
- python -m causal_testing test --dag-path $PATH_TO_DAG --data-paths $PATH_TO_DATA --test-config $PATH_TO_TESTS --output $OUTPUT
148
+ causal-testing test --dag-path $PATH_TO_DAG --data-paths $PATH_TO_DATA --test-config $PATH_TO_TESTS --output $OUTPUT
149
149
  ```
150
150
  The results will be saved for inspection in a JSON file located at `$OUTPUT`.
151
151
  In the future, we hope to add a visualisation tool to assist with this.
@@ -27,7 +27,7 @@ a deliberate modification to the input configuration expected to produce a corre
27
27
  ## Installation
28
28
 
29
29
  ### Requirements
30
- - Python 3.10, 3.11, 3.12 and 3.13
30
+ - Python 3.11, 3.12, 3.13 and 3.14
31
31
 
32
32
  ### Recommended: Install from conda-forge
33
33
 
@@ -89,12 +89,12 @@ For more information on how to use the Causal Testing Framework, please refer to
89
89
 
90
90
  2. If you do not already have causal test cases, you can convert your causal DAG to causal tests by running the following command.
91
91
  ```
92
- python -m causal_testing generate --dag-path $PATH_TO_DAG --output $PATH_TO_TESTS
92
+ causal-testing generate --dag-path $PATH_TO_DAG --output $PATH_TO_TESTS
93
93
  ```
94
94
 
95
95
  3. You can now execute your tests by running the following command.
96
96
  ```
97
- python -m causal_testing test --dag-path $PATH_TO_DAG --data-paths $PATH_TO_DATA --test-config $PATH_TO_TESTS --output $OUTPUT
97
+ causal-testing test --dag-path $PATH_TO_DAG --data-paths $PATH_TO_DATA --test-config $PATH_TO_TESTS --output $OUTPUT
98
98
  ```
99
99
  The results will be saved for inspection in a JSON file located at `$OUTPUT`.
100
100
  In the future, we hope to add a visualisation tool to assist with this.
@@ -0,0 +1,24 @@
1
+ # file generated by vcs-versioning
2
+ # don't change, don't track in version control
3
+ from __future__ import annotations
4
+
5
+ __all__ = [
6
+ "__version__",
7
+ "__version_tuple__",
8
+ "version",
9
+ "version_tuple",
10
+ "__commit_id__",
11
+ "commit_id",
12
+ ]
13
+
14
+ version: str
15
+ __version__: str
16
+ __version_tuple__: tuple[int | str, ...]
17
+ version_tuple: tuple[int | str, ...]
18
+ commit_id: str | None
19
+ __commit_id__: str | None
20
+
21
+ __version__ = version = '14.2.0'
22
+ __version_tuple__ = version_tuple = (14, 2, 0)
23
+
24
+ __commit_id__ = commit_id = 'g9f06df212'
@@ -5,7 +5,7 @@ from abc import abstractmethod
5
5
  from typing import Any
6
6
 
7
7
  import pandas as pd
8
- from patsy import dmatrix # pylint: disable = no-name-in-module
8
+ from patsy import dmatrix, dmatrices # pylint: disable = no-name-in-module
9
9
  from statsmodels.regression.linear_model import RegressionResultsWrapper
10
10
 
11
11
  from causal_testing.estimation.abstract_estimator import Estimator
@@ -56,6 +56,22 @@ class RegressionEstimator(Estimator):
56
56
  [base_test_case.treatment_variable.name] + sorted(list(adjustment_set)) + sorted(list(effect_modifiers))
57
57
  )
58
58
  self.formula = f"{base_test_case.outcome_variable.name} ~ {'+'.join(terms)}"
59
+ self.setup_covariates()
60
+
61
+ def setup_covariates(self):
62
+ """
63
+ Parse the formula and set up the covariates from the design matrix so we can use them in the statsmodels array
64
+ API. This allows us to only parse the formula once, rather than using the formula API, which parses it every
65
+ time the regression model is fit, which can be a lot if using causal test adequacy.
66
+ """
67
+ if self.df is not None:
68
+ _, covariate_data = dmatrices(self.formula, self.df, return_type="dataframe")
69
+ self.covariates = covariate_data.columns
70
+ self.df = pd.concat(
71
+ [self.df, covariate_data[[col for col in covariate_data.columns if col not in self.df]]], axis=1
72
+ )
73
+ else:
74
+ self.covariates = None
59
75
 
60
76
  @property
61
77
  @abstractmethod
@@ -85,7 +101,16 @@ class RegressionEstimator(Estimator):
85
101
  """
86
102
  if data is None:
87
103
  data = self.df
88
- model = self.regressor(formula=self.formula, data=data).fit(disp=0)
104
+ if self.covariates is None:
105
+ _, covariate_data = dmatrices(self.formula, data, return_type="dataframe")
106
+ covariates = covariate_data.columns
107
+ data = pd.concat(
108
+ [data, covariate_data[[col for col in covariate_data.columns if col not in data]]], axis=1
109
+ ).dropna()
110
+ model = self.regressor(data[self.base_test_case.outcome_variable.name], data[covariates]).fit(disp=0)
111
+ else:
112
+ data = data.dropna(subset=self.covariates)
113
+ model = self.regressor(data[self.base_test_case.outcome_variable.name], data[self.covariates]).fit(disp=0)
89
114
  return model
90
115
 
91
116
  def _predict(self, data=None, adjustment_config: dict = None) -> pd.DataFrame:
@@ -115,6 +140,4 @@ class RegressionEstimator(Estimator):
115
140
  if str(x.dtypes[col]) == "object":
116
141
  x = pd.get_dummies(x, columns=[col], drop_first=True)
117
142
 
118
- # This has to be here in case the treatment variable is in an I(...) block in the self.formula
119
- x[self.base_test_case.treatment_variable.name] = [self.treatment_value, self.control_value]
120
143
  return model.get_prediction(x).summary_frame()
@@ -3,6 +3,8 @@ continuous outcomes with changes in behaviour"""
3
3
 
4
4
  import logging
5
5
  from typing import Any
6
+ import statsmodels.formula.api as smf
7
+ from statsmodels.regression.linear_model import RegressionResultsWrapper
6
8
 
7
9
  import pandas as pd
8
10
 
@@ -19,6 +21,8 @@ class CubicSplineRegressionEstimator(LinearRegressionEstimator):
19
21
  combination of parameters and basis functions of the variables.
20
22
  """
21
23
 
24
+ regressor = smf.ols
25
+
22
26
  def __init__(
23
27
  # pylint: disable=too-many-arguments
24
28
  self,
@@ -48,6 +52,16 @@ class CubicSplineRegressionEstimator(LinearRegressionEstimator):
48
52
  )
49
53
  self.formula = f"{base_test_case.outcome_variable.name} ~ cr({'+'.join(terms)}, df={basis})"
50
54
 
55
+ def fit_model(self, data=None) -> RegressionResultsWrapper:
56
+ """Run linear regression of the treatment and adjustment set against the outcome and return the model.
57
+
58
+ :return: The model after fitting to data.
59
+ """
60
+ if data is None:
61
+ data = self.df
62
+ model = self.regressor(formula=self.formula, data=data).fit(disp=0)
63
+ return model
64
+
51
65
  def estimate_ate_calculated(self, adjustment_config: dict = None) -> EffectEstimate:
52
66
  """Estimate the ate effect of the treatment on the outcome. That is, the change in outcome caused
53
67
  by changing the treatment variable from the control value to the treatment value. Here, we actually
@@ -62,7 +76,7 @@ class CubicSplineRegressionEstimator(LinearRegressionEstimator):
62
76
  """
63
77
  model = self.fit_model()
64
78
 
65
- x = {"Intercept": 1, self.base_test_case.treatment_variable.name: self.treatment_value}
79
+ x = pd.DataFrame({"Intercept": [1], self.base_test_case.treatment_variable.name: [self.treatment_value]})
66
80
  if adjustment_config is not None:
67
81
  for k, v in adjustment_config.items():
68
82
  x[k] = v
@@ -115,7 +115,7 @@ class IPCWEstimator(Estimator):
115
115
  pd.Series(strategy_assigned, index=individual.index) != pd.Series(strategy_followed, index=individual.index)
116
116
  ).astype("boolean")
117
117
  mask = mask | ~individual["eligible"]
118
- mask.reset_index(inplace=True, drop=True)
118
+ mask = mask.reset_index(drop=True)
119
119
  false = mask.loc[mask]
120
120
  if false.empty:
121
121
  return pd.DataFrame(
@@ -4,7 +4,7 @@ import logging
4
4
  from typing import Any
5
5
 
6
6
  import pandas as pd
7
- import statsmodels.formula.api as smf
7
+ import statsmodels.api as sm
8
8
  from patsy import ModelDesc, dmatrix # pylint: disable = no-name-in-module
9
9
 
10
10
  from causal_testing.estimation.abstract_regression_estimator import RegressionEstimator
@@ -21,7 +21,7 @@ class LinearRegressionEstimator(RegressionEstimator):
21
21
  combination of parameters and functions of the variables (note these functions need not be linear).
22
22
  """
23
23
 
24
- regressor = smf.ols
24
+ regressor = sm.OLS
25
25
 
26
26
  def __init__(
27
27
  # pylint: disable=too-many-arguments
@@ -92,6 +92,7 @@ class LinearRegressionEstimator(RegressionEstimator):
92
92
  formula = gp.run_gp(ngen=ngen, pop_size=pop_size, num_offspring=num_offspring, seeds=seeds)
93
93
  formula = gp.simplify(formula)
94
94
  self.formula = f"{self.base_test_case.outcome_variable.name} ~ I({formula}) - 1"
95
+ self.setup_covariates()
95
96
 
96
97
  def estimate_coefficient(self) -> EffectEstimate:
97
98
  """Estimate the unit average treatment effect of the treatment on the outcome. That is, the change in outcome
@@ -105,7 +106,7 @@ class LinearRegressionEstimator(RegressionEstimator):
105
106
 
106
107
  if any(
107
108
  (
108
- self.df.dtypes[factor.name()] == "object"
109
+ not pd.api.types.is_numeric_dtype(self.df.dtypes[factor.name()])
109
110
  for factor in patsy_md.rhs_termlist[1].factors
110
111
  # We want to remove this long term as it prevents us from discovering categoricals within I(...) blocks
111
112
  if factor.name() in self.df.dtypes
@@ -4,7 +4,7 @@ import logging
4
4
 
5
5
  import numpy as np
6
6
  import pandas as pd
7
- import statsmodels.formula.api as smf
7
+ import statsmodels.api as sm
8
8
 
9
9
  from causal_testing.estimation.abstract_regression_estimator import RegressionEstimator
10
10
  from causal_testing.estimation.effect_estimate import EffectEstimate
@@ -18,7 +18,7 @@ class LogisticRegressionEstimator(RegressionEstimator):
18
18
  for estimating categorical outcomes.
19
19
  """
20
20
 
21
- regressor = smf.logit
21
+ regressor = sm.Logit
22
22
 
23
23
  def add_modelling_assumptions(self):
24
24
  """
@@ -7,18 +7,16 @@ from dataclasses import dataclass
7
7
  from enum import Enum
8
8
  from pathlib import Path
9
9
  from typing import Any, Dict, List, Optional, Sequence, Union
10
+ from importlib.metadata import entry_points
10
11
 
11
12
  import numpy as np
12
13
  import pandas as pd
13
14
  from tqdm import tqdm
14
15
 
15
- from causal_testing.estimation.linear_regression_estimator import LinearRegressionEstimator
16
- from causal_testing.estimation.logistic_regression_estimator import LogisticRegressionEstimator
17
16
  from causal_testing.specification.causal_dag import CausalDAG
18
17
  from causal_testing.specification.scenario import Scenario
19
18
  from causal_testing.specification.variable import Input, Output
20
19
  from causal_testing.testing.base_test_case import BaseTestCase
21
- from causal_testing.testing.causal_effect import Negative, NoEffect, Positive, SomeEffect
22
20
  from causal_testing.testing.causal_test_adequacy import DataAdequacy
23
21
  from causal_testing.testing.causal_test_case import CausalTestCase
24
22
  from causal_testing.testing.causal_test_result import CausalTestResult
@@ -259,48 +257,30 @@ class CausalTestingFramework:
259
257
  :return: CausalTestCase object
260
258
  :raises: ValueError if invalid estimator or configuration is provided
261
259
  """
262
- # Map effect string to effect class
263
- effect_map = {
264
- "NoEffect": NoEffect(),
265
- "SomeEffect": SomeEffect(),
266
- "Positive": Positive(),
267
- "Negative": Negative(),
268
- }
269
-
270
- # Map estimator string to estimator class
271
- estimator_map = {
272
- "LinearRegressionEstimator": LinearRegressionEstimator,
273
- "LogisticRegressionEstimator": LogisticRegressionEstimator,
274
- }
260
+ estimator_map = {ff.name: ff for ff in entry_points(group="estimators")}
261
+ effect_map = {ff.name: ff for ff in entry_points(group="causal_effects")}
275
262
 
276
263
  if "estimator" not in test:
277
264
  raise ValueError("Test configuration must specify an estimator")
278
265
 
279
- # Get the estimator class
280
- estimator_class = estimator_map.get(test["estimator"])
281
- if estimator_class is None:
282
- raise ValueError(f"Unknown estimator: {test['estimator']}")
283
-
284
- # Handle combined queries (global and test-specific)
285
- test_query = test.get("query")
286
- combined_query = None
287
-
288
- if self.query and test_query:
289
- combined_query = f"({self.query}) and ({test_query})"
290
- logger.info(
291
- f"Combining global query '{self.query}' with test-specific query "
292
- f"'{test_query}' for test '{test['name']}'"
266
+ if test["estimator"] not in estimator_map:
267
+ raise ValueError(
268
+ f"Unsupported estimator {test['estimator']}. Supported: {sorted(estimator_map)}. "
269
+ "If you have implemented a custom estimator, you will need to add this to your entrypoints via your "
270
+ "pyproject.toml file."
293
271
  )
294
- elif test_query:
295
- combined_query = test_query
296
- logger.info(f"Using test-specific query for '{test['name']}': {test_query}")
297
- elif self.query:
298
- combined_query = self.query
299
- logger.info(f"Using global query for '{test['name']}': {self.query}")
300
272
 
301
- filtered_df = self.data.query(combined_query) if combined_query else self.data
273
+ # Handle global queries
274
+ # Test-specific queries are handled by the estimator as not all estimators support them
275
+ filtered_df = self.data
276
+ if self.query:
277
+ filtered_df = self.data.query(self.query)
302
278
 
303
279
  # Create the estimator with correct parameters
280
+ estimator_class = estimator_map.get(test["estimator"]).load()
281
+ estimator_kwargs = test.get("estimator_kwargs", {})
282
+ if "query" in test:
283
+ estimator_kwargs["query"] = test["query"]
304
284
  estimator = estimator_class(
305
285
  base_test_case=base_test,
306
286
  treatment_value=test.get("treatment_value"),
@@ -310,15 +290,19 @@ class CausalTestingFramework:
310
290
  self.dag.identification(base_test, self.scenario.hidden_variables()),
311
291
  ),
312
292
  df=filtered_df,
313
- effect_modifiers=None,
314
- formula=test.get("formula"),
315
293
  alpha=test.get("alpha", 0.05),
316
- query=combined_query,
294
+ **estimator_kwargs,
317
295
  )
318
296
 
319
297
  # Get effect type and create expected effect
320
298
  effect_type = test["expected_effect"][base_test.outcome_variable.name]
321
- expected_effect = effect_map[effect_type]
299
+ if effect_type not in effect_map:
300
+ raise ValueError(
301
+ f"Unsupported causal effect {effect_type}. Supported: {sorted(effect_map)}. "
302
+ "If you have implemented a custom causal effect, you will need to add this to your entrypoints via "
303
+ "your pyproject.toml file."
304
+ )
305
+ expected_effect = effect_map[effect_type].load()(**test.get("effect_kwargs", {}))
322
306
 
323
307
  return CausalTestCase(
324
308
  base_test_case=base_test,
@@ -442,7 +426,6 @@ class CausalTestingFramework:
442
426
  result_index = 0
443
427
 
444
428
  for test_config in test_configs["tests"]:
445
-
446
429
  # Create a base output first of common entries
447
430
  base_output = {
448
431
  "name": test_config["name"],
@@ -49,18 +49,26 @@ class MetamorphicRelation:
49
49
  :param estimator: The name of the estimator class to use when evaluating the test
50
50
  :param alpha: The significance level to use when calculating the confidence intervals
51
51
  """
52
+ if estimator not in ["LinearRegressionEstimator", "LogisticRegressionEstimator"]:
53
+ raise ValueError(
54
+ f"Unsupported estimator {estimator}. "
55
+ "We only support autogeneration using LinearRegressionEstimator or LogisticRegressionEstimator."
56
+ "More advanced estimators require careful thought that cannot be easily automated."
57
+ )
52
58
  return {
53
59
  "name": str(self),
54
60
  "estimator": estimator,
55
61
  "estimate_type": estimate_type,
56
62
  "effect": effect_type,
57
63
  "treatment_variable": self.base_test_case.treatment_variable,
58
- "formula": (
59
- f"{self.base_test_case.outcome_variable} ~ "
60
- f"{' + '.join([self.base_test_case.treatment_variable] + self.adjustment_vars)}"
61
- ),
62
64
  "alpha": alpha,
63
65
  "skip": skip,
66
+ "estimator_kwargs": {
67
+ "formula": (
68
+ f"{self.base_test_case.outcome_variable} ~ "
69
+ f"{' + '.join([self.base_test_case.treatment_variable] + self.adjustment_vars)}"
70
+ ),
71
+ },
64
72
  }
65
73
 
66
74
 
@@ -271,7 +279,7 @@ def generate_causal_tests(
271
279
 
272
280
  logger.warning(
273
281
  "The skip parameter is hard-coded to False during test generation for better integration with the "
274
- "causal testing component (python -m causal_testing test ...)"
282
+ "causal testing component (causal-testing test ...)"
275
283
  "Please carefully review the generated tests and decide which to skip."
276
284
  )
277
285
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: causal_testing_framework
3
- Version: 14.0.1
3
+ Version: 14.2.0
4
4
  Summary: A framework for causal testing using causal directed acyclic graphs.
5
5
  Author: The CITCOM team
6
6
  License: MIT
@@ -9,23 +9,23 @@ Project-URL: Documentation, https://causal-testing-framework.readthedocs.io/
9
9
  Project-URL: Repository, https://github.com/CITCOM-project/CausalTestingFramework
10
10
  Project-URL: Issues, https://github.com/CITCOM-project/CausalTestingFramework/issues
11
11
  Keywords: causal inference,verification
12
- Requires-Python: <3.14,>=3.10
12
+ Requires-Python: <3.15,>=3.11
13
13
  Description-Content-Type: text/markdown
14
14
  License-File: LICENSE
15
- Requires-Dist: lifelines~=0.30.0
16
- Requires-Dist: networkx<3.5,>=3.4
17
- Requires-Dist: numpy<=2.2.0,>=1.26.0
18
- Requires-Dist: pandas<3,>=2.1
15
+ Requires-Dist: lifelines
16
+ Requires-Dist: networkx<3.7,>=3.4
17
+ Requires-Dist: numpy<=2.4.4,>=1.26.0
18
+ Requires-Dist: pandas>=2.1
19
19
  Requires-Dist: scikit_learn~=1.4
20
- Requires-Dist: scipy<=1.16.2,>=1.12.0
20
+ Requires-Dist: scipy<=1.17.1,>=1.12.0
21
21
  Requires-Dist: statsmodels~=0.14
22
22
  Requires-Dist: tabulate~=0.9
23
23
  Requires-Dist: pydot~=2.0
24
24
  Requires-Dist: pygad~=3.3
25
25
  Requires-Dist: deap~=1.4.1
26
- Requires-Dist: sympy~=1.13.1
27
- Requires-Dist: pyarrow~=19.0.1
28
- Requires-Dist: fastparquet~=2024.11.0
26
+ Requires-Dist: sympy~=1.14.0
27
+ Requires-Dist: pyarrow<25,>=19.0.1
28
+ Requires-Dist: fastparquet>=2024.11.0
29
29
  Requires-Dist: tqdm~=4.67.1
30
30
  Provides-Extra: dev
31
31
  Requires-Dist: astroid==3.3.8; extra == "dev"
@@ -78,7 +78,7 @@ a deliberate modification to the input configuration expected to produce a corre
78
78
  ## Installation
79
79
 
80
80
  ### Requirements
81
- - Python 3.10, 3.11, 3.12 and 3.13
81
+ - Python 3.11, 3.12, 3.13 and 3.14
82
82
 
83
83
  ### Recommended: Install from conda-forge
84
84
 
@@ -140,12 +140,12 @@ For more information on how to use the Causal Testing Framework, please refer to
140
140
 
141
141
  2. If you do not already have causal test cases, you can convert your causal DAG to causal tests by running the following command.
142
142
  ```
143
- python -m causal_testing generate --dag-path $PATH_TO_DAG --output $PATH_TO_TESTS
143
+ causal-testing generate --dag-path $PATH_TO_DAG --output $PATH_TO_TESTS
144
144
  ```
145
145
 
146
146
  3. You can now execute your tests by running the following command.
147
147
  ```
148
- python -m causal_testing test --dag-path $PATH_TO_DAG --data-paths $PATH_TO_DATA --test-config $PATH_TO_TESTS --output $OUTPUT
148
+ causal-testing test --dag-path $PATH_TO_DAG --data-paths $PATH_TO_DATA --test-config $PATH_TO_TESTS --output $OUTPUT
149
149
  ```
150
150
  The results will be saved for inspection in a JSON file located at `$OUTPUT`.
151
151
  In the future, we hope to add a visualisation tool to assist with this.
@@ -54,6 +54,7 @@ causal_testing/utils/validation.py
54
54
  causal_testing_framework.egg-info/PKG-INFO
55
55
  causal_testing_framework.egg-info/SOURCES.txt
56
56
  causal_testing_framework.egg-info/dependency_links.txt
57
+ causal_testing_framework.egg-info/entry_points.txt
57
58
  causal_testing_framework.egg-info/requires.txt
58
59
  causal_testing_framework.egg-info/top_level.txt
59
60
  dafni/.dockerignore
@@ -88,6 +89,7 @@ docs/source/dev/documentation.rst
88
89
  docs/source/dev/version_release.rst
89
90
  docs/source/modules/causal_specification.rst
90
91
  docs/source/modules/causal_testing.rst
92
+ docs/source/modules/custom_estimators.rst
91
93
  docs/source/modules/estimators.rst
92
94
  docs/source/tutorials/poisson_line_process/causal_tests.json
93
95
  docs/source/tutorials/poisson_line_process/dag.dot
@@ -0,0 +1,16 @@
1
+ [causal_effects]
2
+ ExactValue = causal_testing.testing.causal_effect:ExactValue
3
+ Negative = causal_testing.testing.causal_effect:Negative
4
+ NoEffect = causal_testing.testing.causal_effect:NoEffect
5
+ Positive = causal_testing.testing.causal_effect:Positive
6
+ SomeEffect = causal_testing.testing.causal_effect:SomeEffect
7
+
8
+ [console_scripts]
9
+ causal-testing = causal_testing.__main__:main
10
+
11
+ [estimators]
12
+ CubicSplineEstimator = causal_testing.estimation.cubic_spline_estimator:CubicSplineEstimator
13
+ IPCWEstimator = causal_testing.estimation.ipcw_estimator:IPCWEstimator
14
+ InstrumentalVariableEstimator = causal_testing.estimation.instrumental_variable_estimator:InstrumentalVariableEstimator
15
+ LinearRegressionEstimator = causal_testing.estimation.linear_regression_estimator:LinearRegressionEstimator
16
+ LogisticRegressionEstimator = causal_testing.estimation.logistic_regression_estimator:LogisticRegressionEstimator
@@ -1,17 +1,17 @@
1
- lifelines~=0.30.0
2
- networkx<3.5,>=3.4
3
- numpy<=2.2.0,>=1.26.0
4
- pandas<3,>=2.1
1
+ lifelines
2
+ networkx<3.7,>=3.4
3
+ numpy<=2.4.4,>=1.26.0
4
+ pandas>=2.1
5
5
  scikit_learn~=1.4
6
- scipy<=1.16.2,>=1.12.0
6
+ scipy<=1.17.1,>=1.12.0
7
7
  statsmodels~=0.14
8
8
  tabulate~=0.9
9
9
  pydot~=2.0
10
10
  pygad~=3.3
11
11
  deap~=1.4.1
12
- sympy~=1.13.1
13
- pyarrow~=19.0.1
14
- fastparquet~=2024.11.0
12
+ sympy~=1.14.0
13
+ pyarrow<25,>=19.0.1
14
+ fastparquet>=2024.11.0
15
15
  tqdm~=4.67.1
16
16
 
17
17
  [dev]