causal-testing-framework


Namecausal-testing-framework JSON
Version 7.0.0 PyPI version JSON
download
home_pageNone
SummaryA framework for causal testing using causal directed acyclic graphs.
upload_time2024-04-30 15:43:58
maintainerNone
docs_urlNone
authorThe CITCOM team
requires_python>=3.9
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.9 and 3.10 only.

- 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.9",
    "maintainer_email": null,
    "keywords": "causal inference, verification",
    "author": "The CITCOM team",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/16/4b/b224e8bfc36f2beecc9019d30dc8e8ea884427bead13e40818748226aad0/causal_testing_framework-7.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.9 and 3.10 only.\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": "7.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": "b6efb66437b20aba9399203f81fc757ab20ead784c1bb6abf11ba3ecc753d84a",
                "md5": "23197b4a7c9459f23e10d46eb0f70000",
                "sha256": "cbbde517315fd142b87d10a3a71a3b5367422c60f4b9675de286c591cfffcece"
            },
            "downloads": -1,
            "filename": "causal_testing_framework-7.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "23197b4a7c9459f23e10d46eb0f70000",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 1016522,
            "upload_time": "2024-04-30T15:43:53",
            "upload_time_iso_8601": "2024-04-30T15:43:53.442098Z",
            "url": "https://files.pythonhosted.org/packages/b6/ef/b66437b20aba9399203f81fc757ab20ead784c1bb6abf11ba3ecc753d84a/causal_testing_framework-7.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "164bb224e8bfc36f2beecc9019d30dc8e8ea884427bead13e40818748226aad0",
                "md5": "0f756338cde98e293ed36988cb11d236",
                "sha256": "f220a22a8a453a7f8cfc2119bdaf475a2b7972426457d8809d791359b39f3e2e"
            },
            "downloads": -1,
            "filename": "causal_testing_framework-7.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "0f756338cde98e293ed36988cb11d236",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 993015,
            "upload_time": "2024-04-30T15:43:58",
            "upload_time_iso_8601": "2024-04-30T15:43:58.254155Z",
            "url": "https://files.pythonhosted.org/packages/16/4b/b224e8bfc36f2beecc9019d30dc8e8ea884427bead13e40818748226aad0/causal_testing_framework-7.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-30 15:43:58",
    "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.31780s