Contributing to PaperQA
Last updated
Last updated
Thank you for your interest in contributing to PaperQA! Here are some guidelines to help you get started.
We use for our local development.
Install uv
by following the instructions on the .
Run the following command to install all dependencies and set up the development environment:
If you prefer to use pip
for installing the package in development mode, you can do so by running:
Where the dev
extra includes development dependencies such as pytest
.
Use the following commands:
Run tests (requires an OpenAI key in your environment)
Run pre-commit
for formatting and type checking
Run mypy
, refurb
, or pylint
directly:
pytest-recording
and VCR cassettesTo record a new VCR cassette:
Please ensure cassettes are less than 1 MB to keep tests loading quickly.
Happy coding!
See our GitHub Actions for further reference.
We use the plugin to create VCR cassettes to cache HTTP requests, making our unit tests more deterministic.
And the new cassette(s) should appear in .
Our configuration for pytest-recording
can be found in . This includes header removals (e.g. OpenAI authorization
key) from responses to ensure sensitive information is excluded from the cassettes.