Skip to content

Run tests against the minimum allowed versions of direct dependencies #145

Description

@namurphy

Running a test suite against the lowest versions of direct dependencies helps make sure that a package actually works in the oldest allowed environment, and can find bugs where a very new feature from a dependency that isn't in the oldest allowed version gets used.

The setup could be something like this:

uv venv --python=3.9
uv pip install . --resolution=lowest-direct
uv pip install pytest
source .venv/bin/activate  # change if using a shell other than bash or sh
pytest

There are cleaner ways to do this with nox and nox-uv if pyproject.toml defines a dev dependency group.

We have a Nox session in noxfile.py set up to do this for PlasmaPy which is invoked in a GitHub workflow.

(I've been on a mission to get PyHC packages run tests against their minimum dependencies, so I might have raised this issue in a few places before. 😅)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions