A framework for causal testing using causal directed acyclic graphs.
Project description
Causal Testing Framework
A Causal Inference-Driven Software Testing Framework
Causal testing is a causal inference-driven framework for functional black-box testing. This framework utilises graphical causal inference (CI) techniques for the specification and functional testing of software from a black-box perspective. In this framework, we use causal directed acyclic graphs (DAGs) to express the anticipated cause-effect relationships amongst the inputs and outputs of the system-under-test and the supporting mathematical framework to design statistical procedures capable of making causal inferences. Each causal test case focuses on the causal effect of an intervention made to the system-under test. That is, a prescribed change to the input configuration of the system-under-test that is expected to cause a change to some output(s).
Installation
Requirements
-
Python 3.9, 3.10, 3.11 and 3.12
-
Microsoft Visual C++ 14.0+ (Windows only).
To install the latest stable release of the Causal Testing Framework:
pip install causal-testing-framework
or if you want to install with the development packages/tools:
pip install causal-testing-framework[dev]
Alternatively, you can install directly via source:
git clone https://github.com/CITCOM-project/CausalTestingFramework
cd CausalTestingFramework
then to install a specific release:
git fetch --all --tags --prune
git checkout tags/<tag> -b <branch>
pip install . # For core API only
pip install -e . # For editable install, useful for development work
For more information on how to use the Causal Testing Framework, please refer to our documentation.
How to Cite
If you use our framework in your work, please cite the following:
This research has used version X.Y.Z (software citation) of the Causal Testing Framework (paper citation).
The paper citation should be the Causal Testing Framework paper, and the software citation should contain the specific Figshare DOI of the version used in your work.
BibTeX Citations
Paper
```
@ARTICLE{Clark_etal_2023,
author = {Clark, Andrew G. and Foster, Michael and Prifling, Benedikt and Walkinshaw, Neil and Hierons, Robert M.
and Schmidt, Volker and Turner, Robert D.},
title = {Testing Causality in Scientific Modelling Software},
year = {2023},
publisher = {Association for Computing Machinery},
url = {https://doi.org/10.1145/3607184},
doi = {10.1145/3607184},
journal = {ACM Trans. Softw. Eng. Methodol.},
month = {jul},
keywords = {Software Testing, Causal Testing, Causal Inference}
}
```
Software (example)
```
@ARTICLE{Wild2023,
author = {Foster, Michael and Clark, Andrew G. and Somers, Richard and Wild, Christopher and Allian, Farhad and Hierons, Robert M. and Wagg, David and Walkinshaw, Neil},
title = {CITCOM Software Release},
year = {2023},
month = {nov},
url = {https://orda.shef.ac.uk/articles/software/CITCOM_Software_Release/24427516},
doi = {10.15131/shef.data.24427516.v1}
}
```
How to Contribute
To contribute to our work, please ensure the following:
- Fork the repository into your own GitHub account, and clone it to your local machine.
- Create a new branch in your forked repository. Give this branch an appropriate name, and create commits that describe the changes.
- Push your changes to your new branch in your remote fork, compare with
CausalTestingFramework/main
, and ensure any conflicts are resolved. - Create a draft pull request from your branch, and ensure you have linked it to any relevant issues in your description.
We use the unittest module to develop our tests and the pytest framework as our test discovery, pylint for our code analyser, and black for our code formatting.
To find the other (optional) developer dependencies, please check pyproject.toml
.
Acknowledgements
The Causal Testing Framework is supported by the UK's Engineering and Physical Sciences Research Council (EPSRC), with the project name CITCOM - "Causal Inference for Testing of Computational Models" under the grant EP/T030526/1.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file causal_testing_framework-8.1.0.tar.gz
.
File metadata
- Download URL: causal_testing_framework-8.1.0.tar.gz
- Upload date:
- Size: 1.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d629ac6592c92c0bc3f03f2fae0bda3cb55859a3436803a5ce7915e9c0bd9fe1 |
|
MD5 | d8cf1dea5821e796e15baecd186531d9 |
|
BLAKE2b-256 | b421067c9c6039b0648404093ba68aa451bdb3bba91fa53a7d3b8bf907d4c329 |
File details
Details for the file causal_testing_framework-8.1.0-py3-none-any.whl
.
File metadata
- Download URL: causal_testing_framework-8.1.0-py3-none-any.whl
- Upload date:
- Size: 1.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86998bad55f1b9dc5b50e9a5755ddfbb8f45e0c6b19d3c1a6f2d27f5de45c0ca |
|
MD5 | 28ad800ee5d7ef6c62e59f8ac155939d |
|
BLAKE2b-256 | a7110b3d72e8a7c56be24c8e7299277d3b898f6233cbcff6e6f7304d63bb4c0a |