Repository: Future-House/paper-qa (language: python)

Issue:
Documentation in `CONTRIBUTING.md` for `pytest-recording` and VCR cassettes
We use `pytest-recording` plugin to make test cassettes to cache HTTP requests, making our unit tests more deterministic.

We need a little blurb in `CONTRIBUTING.md` that:
- Links to `pytest-recording`
- Gives a brief summary on how to record a new VCR using a command like `uv run pytest tests/test_module.py`
- Links the config in `tests/conftest.py` and documents header removals from responses


Discussion / hints:

Fix patch:
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 85c9a134d..55c753623 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -52,6 +52,27 @@ Use the following commands:
 
 See our GitHub Actions [`tests.yml`](.github/workflows/tests.yml) for further reference.
 
+## Using `pytest-recording` and VCR cassettes
+
+We use the [`pytest-recording`](https://github.com/kiwicom/pytest-recording) plugin
+to create VCR cassettes to cache HTTP requests,
+making our unit tests more deterministic.
+
+To record a new VCR cassette:
+
+```bash
+uv run pytest --record-mode=once tests/desired_test_module.py
+```
+
+And the new cassette(s) should appear in [`tests/cassettes`](tests/cassettes).
+
+Our configuration for `pytest-recording` can be found in [`tests/conftest.py`](tests/conftest.py).
+This includes header removals (e.g. OpenAI `authorization` key)
+from responses to ensure sensitive information is excluded from the cassettes.
+
+Please ensure cassettes are less than 1 MB
+to keep tests loading quickly.
+
 ## Additional resources
 
 For more information on contributing, please refer to the [CONTRIBUTING.md](CONTRIBUTING.md) file in the repository.


Test patch:
diff --git a/tests/conftest.py b/tests/conftest.py
index c307e3d13..18f96c1be 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -34,7 +34,6 @@ def _setup_default_logs() -> None:
 def fixture_vcr_config() -> dict[str, Any]:
     return {
         "filter_headers": [CROSSREF_HEADER_KEY, SEMANTIC_SCHOLAR_HEADER_KEY],
-        "record_mode": "none",
         "match_on": ["method", "host", "path", "query"],
         "allow_playback_repeats": True,
         "cassette_library_dir": "tests/cassettes",