0%

A Project Someone Else Can Run · practice

Separate Runtime and Test Dependencies

The command needs Requests at runtime. A contributor also needs pytest. Keep those scopes visible instead of making every user install test tooling.

Leave requirements.txt exactly:

requests==2.34.2

Create requirements-dev.txt exactly:

-r requirements.txt
pytest==9.1.1

Installing the dev recipe includes the runtime recipe once, then adds pytest. A runtime-only user installs requirements.txt. These are direct pinned requirements backed by Python Land’s reviewed mirror closure; they do not every transitive package and are not a universal byte-for-byte lock across all indexes and platforms.

Why does the development recipe begin with -r requirements.txt?

Task

Keep requirements.txt exactly requests==2.34.2 and create requirements-dev.txt with exactly -r requirements.txt followed by pytest==9.1.1, each line newline-terminated. Add no duplicate, ranged, conflicting, or unneeded transitive dependencies.