causal-testing-framework


Namecausal-testing-framework JSON
Version 9.0.0 PyPI version JSON
download
home_pageNone
SummaryA framework for causal testing using causal directed acyclic graphs.
upload_time2024-12-04 09:33:53
maintainerNone
docs_urlNone
authorThe CITCOM team
requires_python>=3.10
licenseMIT
keywords causal inference verification
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Causal Testing Framework
### A Causal Inference-Driven Software Testing Framework


[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
![example workflow](https://github.com/CITCOM-project/CausalTestingFramework/actions/workflows/ci-tests.yaml/badge.svg)
[![codecov](https://codecov.io/gh/CITCOM-project/CausalTestingFramework/branch/main/graph/badge.svg?token=04ijFVrb4a)](https://codecov.io/gh/CITCOM-project/CausalTestingFramework)
[![Documentation Status](https://readthedocs.org/projects/causal-testing-framework/badge/?version=latest)](https://causal-testing-framework.readthedocs.io/en/latest/?badge=latest)
![Dynamic TOML Badge](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2FCITCOM-project%2FCausalTestingFramework%2Fmain%2Fpyproject.toml&query=%24.project%5B'requires-python'%5D&label=python)
![PyPI - Version](https://img.shields.io/pypi/v/causal-testing-framework)
[![DOI](https://t.ly/FCT1B)](https://orda.shef.ac.uk/articles/software/CITCOM_Software_Release/24427516)
![GitHub Licens[schematic.tex](images%2Fschematic.tex)e](https://img.shields.io/github/license/CITCOM-project/CausalTestingFramework)

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).

![Causal Testing Workflow](images/schematic-dark.png#gh-dark-mode-only)
![Causal Testing Workflow](images/schematic.png#gh-light-mode-only)

## Installation

### Requirements
- Python 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:

```shell
git clone https://github.com/CITCOM-project/CausalTestingFramework
cd CausalTestingFramework
```
then to install a specific release:

```shell
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](https://causal-testing-framework.readthedocs.io/en/latest/?badge=latest).  
## 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](https://dl.acm.org/doi/10.1145/3607184), 
and the software citation should contain the specific Figshare [DOI](https://orda.shef.ac.uk/articles/software/CITCOM_Software_Release/24427516) of the version used in your work.



<details>
  <summary><b>BibTeX Citations</b></summary>
  
  <details>
    <summary>Paper</summary>
    
    ```
    @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}
    }
    ```

  </details>
  
  <details>
    <summary>Software (example)</summary>
    
    ```
    @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}
    }
    ```
  </details>

</details>

## How to Contribute

To contribute to our work, please ensure the following:

1. [Fork the repository](https://help.github.com/articles/fork-a-repo/) into your own GitHub account, and [clone](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) it to your local machine.
2. [Create a new branch](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository) in your forked repository. Give this branch an appropriate name, and create commits that describe the changes.
3. [Push your changes](https://docs.github.com/en/get-started/using-git/pushing-commits-to-a-remote-repository) to your new branch in your remote fork, compare with `CausalTestingFramework/main`, and ensure any conflicts are resolved.
4. Create a draft [pull request](https://docs.github.com/en/get-started/quickstart/hello-world#opening-a-pull-request) from your branch, and ensure you have [linked](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls) it to any relevant issues in your description. 

We use the [unittest]() module to develop our tests and the [pytest](https://pytest.org/en/latest/) framework as our test discovery, [pylint](https://pypi.org/project/pylint/) for our code analyser, and [black](https://pypi.org/project/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](https://gow.epsrc.ukri.org/NGBOViewGrant.aspx?GrantRef=EP/T030526/1) - "_Causal Inference for Testing of Computational Models_" 
under the grant EP/T030526/1.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "causal-testing-framework",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "causal inference, verification",
    "author": "The CITCOM team",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/94/49/a8e4e2cc1fd2e1ebbb1faf0e96a07dc5d84144f74366da83f5f5f044eba9/causal_testing_framework-9.0.0.tar.gz",
    "platform": null,
    "description": "# Causal Testing Framework\n### A Causal Inference-Driven Software Testing Framework\n\n\n[![Project Status: Active \u2013 The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n![example workflow](https://github.com/CITCOM-project/CausalTestingFramework/actions/workflows/ci-tests.yaml/badge.svg)\n[![codecov](https://codecov.io/gh/CITCOM-project/CausalTestingFramework/branch/main/graph/badge.svg?token=04ijFVrb4a)](https://codecov.io/gh/CITCOM-project/CausalTestingFramework)\n[![Documentation Status](https://readthedocs.org/projects/causal-testing-framework/badge/?version=latest)](https://causal-testing-framework.readthedocs.io/en/latest/?badge=latest)\n![Dynamic TOML Badge](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2FCITCOM-project%2FCausalTestingFramework%2Fmain%2Fpyproject.toml&query=%24.project%5B'requires-python'%5D&label=python)\n![PyPI - Version](https://img.shields.io/pypi/v/causal-testing-framework)\n[![DOI](https://t.ly/FCT1B)](https://orda.shef.ac.uk/articles/software/CITCOM_Software_Release/24427516)\n![GitHub Licens[schematic.tex](images%2Fschematic.tex)e](https://img.shields.io/github/license/CITCOM-project/CausalTestingFramework)\n\nCausal testing is a causal inference-driven framework for functional black-box testing. This framework utilises\ngraphical causal inference (CI) techniques for the specification and functional testing of software from a black-box\nperspective. In this framework, we use causal directed acyclic graphs (DAGs) to express the anticipated cause-effect\nrelationships amongst the inputs and outputs of the system-under-test and the supporting mathematical framework to\ndesign statistical procedures capable of making causal inferences. Each causal test case focuses on the causal effect of\nan intervention made to the system-under test. That is, a prescribed change to the input configuration of the\nsystem-under-test that is expected to cause a change to some output(s).\n\n![Causal Testing Workflow](images/schematic-dark.png#gh-dark-mode-only)\n![Causal Testing Workflow](images/schematic.png#gh-light-mode-only)\n\n## Installation\n\n### Requirements\n- Python 3.10, 3.11 and 3.12\n\n- Microsoft Visual C++ 14.0+ (Windows only).\n\nTo install the latest stable release of the Causal Testing Framework:\n\n``pip install causal-testing-framework``\n\nor if you want to install with the development packages/tools:\n\n``pip install causal-testing-framework[dev]``\n\nAlternatively, you can install directly via source:\n\n```shell\ngit clone https://github.com/CITCOM-project/CausalTestingFramework\ncd CausalTestingFramework\n```\nthen to install a specific release:\n\n```shell\ngit fetch --all --tags --prune\ngit checkout tags/<tag> -b <branch>\npip install . # For core API only\npip install -e . # For editable install, useful for development work\n```\nFor more information on how to use the Causal Testing Framework, please refer to our [documentation](https://causal-testing-framework.readthedocs.io/en/latest/?badge=latest).  \n## How to Cite\nIf you use our framework in your work, please cite the following:\n\n``This research has used version X.Y.Z (software citation) of the \nCausal Testing Framework (paper citation).``\n\nThe paper citation should be the Causal Testing Framework [paper](https://dl.acm.org/doi/10.1145/3607184), \nand the software citation should contain the specific Figshare [DOI](https://orda.shef.ac.uk/articles/software/CITCOM_Software_Release/24427516) of the version used in your work.\n\n\n\n<details>\n  <summary><b>BibTeX Citations</b></summary>\n  \n  <details>\n    <summary>Paper</summary>\n    \n    ```\n    @ARTICLE{Clark_etal_2023,\n    author = {Clark, Andrew G. and Foster, Michael and Prifling, Benedikt and Walkinshaw, Neil and Hierons, Robert M.\n    and Schmidt, Volker and Turner, Robert D.},\n    title = {Testing Causality in Scientific Modelling Software},\n    year = {2023},\n    publisher = {Association for Computing Machinery},\n    url = {https://doi.org/10.1145/3607184},\n    doi = {10.1145/3607184},\n    journal = {ACM Trans. Softw. Eng. Methodol.},\n    month = {jul},\n    keywords = {Software Testing, Causal Testing, Causal Inference}\n    }\n    ```\n\n  </details>\n  \n  <details>\n    <summary>Software (example)</summary>\n    \n    ```\n    @ARTICLE{Wild2023,\n    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},\n    title = {CITCOM Software Release},\n    year = {2023},\n    month = {nov},\n    url = {https://orda.shef.ac.uk/articles/software/CITCOM_Software_Release/24427516},\n    doi = {10.15131/shef.data.24427516.v1}\n    }\n    ```\n  </details>\n\n</details>\n\n## How to Contribute\n\nTo contribute to our work, please ensure the following:\n\n1. [Fork the repository](https://help.github.com/articles/fork-a-repo/) into your own GitHub account, and [clone](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) it to your local machine.\n2. [Create a new branch](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository) in your forked repository. Give this branch an appropriate name, and create commits that describe the changes.\n3. [Push your changes](https://docs.github.com/en/get-started/using-git/pushing-commits-to-a-remote-repository) to your new branch in your remote fork, compare with `CausalTestingFramework/main`, and ensure any conflicts are resolved.\n4. Create a draft [pull request](https://docs.github.com/en/get-started/quickstart/hello-world#opening-a-pull-request) from your branch, and ensure you have [linked](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls) it to any relevant issues in your description. \n\nWe use the [unittest]() module to develop our tests and the [pytest](https://pytest.org/en/latest/) framework as our test discovery, [pylint](https://pypi.org/project/pylint/) for our code analyser, and [black](https://pypi.org/project/black/) for our code formatting.\nTo find the other (optional) developer dependencies, please check `pyproject.toml`.\n\n\n\n## Acknowledgements \n\nThe Causal Testing Framework is supported by the UK's Engineering and Physical Sciences Research Council (EPSRC),\nwith the project name [CITCOM](https://gow.epsrc.ukri.org/NGBOViewGrant.aspx?GrantRef=EP/T030526/1) - \"_Causal Inference for Testing of Computational Models_\" \nunder the grant EP/T030526/1.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A framework for causal testing using causal directed acyclic graphs.",
    "version": "9.0.0",
    "project_urls": {
        "Bug_Tracker": "https://github.com/CITCOM-project/CausalTestingFramework/issues",
        "Documentation": "https://causal-testing-framework.readthedocs.io/",
        "Source": "https://github.com/CITCOM-project/CausalTestingFramework"
    },
    "split_keywords": [
        "causal inference",
        " verification"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a0d7f37353d54fa5d2aa3093598d2f5dd890f7563ea11669932d0a9726bb3949",
                "md5": "eb21aa7ed501d2aeecb71567b31d73b8",
                "sha256": "20959b5820fca23a71653f8e8440c408494b1425761c21d5db53a9f1c52d244e"
            },
            "downloads": -1,
            "filename": "causal_testing_framework-9.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "eb21aa7ed501d2aeecb71567b31d73b8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 1035228,
            "upload_time": "2024-12-04T09:33:51",
            "upload_time_iso_8601": "2024-12-04T09:33:51.578956Z",
            "url": "https://files.pythonhosted.org/packages/a0/d7/f37353d54fa5d2aa3093598d2f5dd890f7563ea11669932d0a9726bb3949/causal_testing_framework-9.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9449a8e4e2cc1fd2e1ebbb1faf0e96a07dc5d84144f74366da83f5f5f044eba9",
                "md5": "7ce1114ea28abc809487329f186ed384",
                "sha256": "9340ccff12583ec7f44b926a65e48141d89c31a6aeb831845891e350823d67ce"
            },
            "downloads": -1,
            "filename": "causal_testing_framework-9.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "7ce1114ea28abc809487329f186ed384",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 1004955,
            "upload_time": "2024-12-04T09:33:53",
            "upload_time_iso_8601": "2024-12-04T09:33:53.554034Z",
            "url": "https://files.pythonhosted.org/packages/94/49/a8e4e2cc1fd2e1ebbb1faf0e96a07dc5d84144f74366da83f5f5f044eba9/causal_testing_framework-9.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-04 09:33:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "CITCOM-project",
    "github_project": "CausalTestingFramework",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "causal-testing-framework"
}
        
Elapsed time: 0.57347s