Skip to content

Commit b4d3030

Browse files
committed
Updated readme
1 parent b37cf09 commit b4d3030

File tree

1 file changed

+28
-9
lines changed

1 file changed

+28
-9
lines changed

README.md

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,23 +56,42 @@ For more information on how to use the Causal Testing Framework, please refer to
5656
>[!NOTE]
5757
>We recommend you use a 64 bit OS (standard in most modern machines) as we have had reports of the installation crashing on some 32 bit Debian installations.
5858
59+
## Usage
60+
>[!NOTE]
61+
> Example usage can be found in the `examples` directory.
62+
63+
1. To run the causal testing framework, you need some runtime data from your system, some causal test cases, and a causal DAG that specifies the expected causal relationships between the variables in your runtime data (and any other relevant variables that are _not_ recorded in the data but are known to be relevant).
64+
65+
2. If you do not already have causal test cases, you can convert your causal DAG to causal tests by running the following command.
66+
67+
```
68+
python causal_testing/testing/metamorphic_relation.py --dag_path $PATH_TO_DAG --output_path $PATH_TO_TESTS
69+
```
70+
71+
3. You can now execute your tests by running the following command.
72+
```
73+
python -m causal_testing --dag_path $PATH_TO_DAG --data_paths $PATH_TO_DATA --test_config $PATH_TO_TESTS --output $OUTPUT
74+
```
75+
The results will be saved for inspection in a JSON file located at `$OUTPUT`.
76+
In the future, we hope to add a visualisation tool to assist with this.
77+
5978
## How to Cite
6079
If you use our framework in your work, please cite the following:
6180

62-
``This research has used version X.Y.Z (software citation) of the
81+
``This research has used version X.Y.Z (software citation) of the
6382
Causal Testing Framework (paper citation).``
6483

65-
The paper citation should be the Causal Testing Framework [paper](https://dl.acm.org/doi/10.1145/3607184),
84+
The paper citation should be the Causal Testing Framework [paper](https://dl.acm.org/doi/10.1145/3607184),
6685
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.
6786

6887

6988

7089
<details>
7190
<summary><b>BibTeX Citations</b></summary>
72-
91+
7392
<details>
7493
<summary>Paper</summary>
75-
94+
7695
```
7796
@ARTICLE{Clark_etal_2023,
7897
author = {Clark, Andrew G. and Foster, Michael and Prifling, Benedikt and Walkinshaw, Neil and Hierons, Robert M.
@@ -89,10 +108,10 @@ and the software citation should contain the specific Figshare [DOI](https://ord
89108
```
90109

91110
</details>
92-
111+
93112
<details>
94113
<summary>Software (example)</summary>
95-
114+
96115
```
97116
@ARTICLE{Wild2023,
98117
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},
@@ -114,15 +133,15 @@ To contribute to our work, please ensure the following:
114133
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.
115134
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.
116135
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.
117-
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.
136+
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.
118137

119138
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.
120139
To find the other (optional) developer dependencies, please check `pyproject.toml`.
121140

122141

123142

124-
## Acknowledgements
143+
## Acknowledgements
125144

126145
The Causal Testing Framework is supported by the UK's Engineering and Physical Sciences Research Council (EPSRC),
127-
with the project name [CITCOM](https://gow.epsrc.ukri.org/NGBOViewGrant.aspx?GrantRef=EP/T030526/1) - "_Causal Inference for Testing of Computational Models_"
146+
with the project name [CITCOM](https://gow.epsrc.ukri.org/NGBOViewGrant.aspx?GrantRef=EP/T030526/1) - "_Causal Inference for Testing of Computational Models_"
128147
under the grant EP/T030526/1.

0 commit comments

Comments
 (0)