[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)


# Disentangling Consistency and Accuracy
Improving the Error Consistency Metric.

## Requirements

This repo assumes a python version of at least 3.13. All other requirements are in `requirements.txt` and can just be pip-installed.


## Code Style

We use [Black](https://github.com/psf/black) and [isort](https://github.com/PyCQA/isort) for code formatting, and automate this using [pre-commit](https://pre-commit.com/#intro). We keep notebooks clean using [nbstripout](https://github.com/kynan/nbstripout).

To install requirements and apply the style:
```
pip install -r requirements.txt
pre-commit install
pre-commit run --all-files
```

If the CI fails for a PR you'd like to merge, it means that your changes don't adhere to the style guide.
To fix this, run `pre-commit run --all-files` locally, then commit and push again.
If black applies auto-formatting that is really nonsensical, you can force it to ignore a code block like this:
```
# fmt: off
print("...")
# fmt: on
```

## Testing

We use `pytest` for unit testing. Install it with `pip install pytest` and then run `pytest` from the repository root to run all tests.