|
| 1 | +# Contributing |
| 2 | + |
| 3 | +Thanks for helping improve the Instapaper API Python library. Bug reports, fixes, and documentation improvements are all welcome. |
| 4 | + |
| 5 | +## Reporting issues |
| 6 | + |
| 7 | +Open a [GitHub issue](https://github.com/Instapaper/instapaper-api-python/issues). Search existing issues first, and include: |
| 8 | + |
| 9 | +- The library version (`instapaper.__version__`) and your Python version |
| 10 | +- The method you called and the arguments you passed |
| 11 | +- What you expected to happen and what happened instead, including the full traceback |
| 12 | + |
| 13 | +Leave access tokens, client secrets, and Instaparser keys out of issues, logs, and code samples. |
| 14 | + |
| 15 | +For questions about the API itself, such as endpoints, rate limits, or application approval, see the [developer documentation](https://www.instapaper.com/developers/overview/getting-started) or email support@instapaper.com. |
| 16 | + |
| 17 | +### Security issues |
| 18 | + |
| 19 | +Don't open a public issue for a security vulnerability. Email support@instapaper.com instead. |
| 20 | + |
| 21 | +## Making changes |
| 22 | + |
| 23 | +1. Fork the repository and create a branch from `main`. |
| 24 | +2. Set up a development environment as described in [BUILD.md](BUILD.md). |
| 25 | +3. Make your change, with tests. |
| 26 | +4. Run the same checks CI runs: |
| 27 | + |
| 28 | + ```sh |
| 29 | + ruff check . |
| 30 | + ruff format --check . |
| 31 | + mypy instapaper tests examples |
| 32 | + pytest |
| 33 | + ``` |
| 34 | + |
| 35 | +5. Open a pull request that explains what changed and why. |
| 36 | + |
| 37 | +### Guidelines |
| 38 | + |
| 39 | +- **No runtime dependencies.** The library uses only the Python standard library. Development tools belong in the `dev` extra in `pyproject.toml`. |
| 40 | +- **Python 3.10 and later.** CI runs on 3.10 through 3.13, so avoid features newer than 3.10. |
| 41 | +- **Everything is typed.** mypy runs with `disallow_untyped_defs`, including on tests and examples. |
| 42 | +- **Tests don't touch the network.** Use the `client` and `transport` fixtures from `tests/conftest.py`. `FakeTransport` records each request and returns responses you queue, so a test can assert on the method, URL, and body the client sent. |
| 43 | +- **Match the API.** Parameter names, defaults, and validation should follow the [API reference](https://www.instapaper.com/developers/overview/getting-started). This library aims to behave the same as the official TypeScript SDK, so a change to shared behavior may need a matching change there. |
| 44 | +- **Update the docs.** Add user-facing changes to the unreleased version at the top of [CHANGELOG.md](CHANGELOG.md), and update [README.md](README.md) when you add or change public API. |
| 45 | + |
| 46 | +## License |
| 47 | + |
| 48 | +By contributing, you agree that your contributions will be licensed under the [MIT License](LICENSE). |
0 commit comments