A utility for installing extremal versions of dependencies for more robust testing
Project description
extremal-python-dependencies
A utility for installing extremal versions of dependencies for more robust testing.
Install extremal versions of package dependencies for more robust continuous integration testing, given a package that specifies its dependencies in a pyproject.toml
file.
For instance, one might use this utility to install the minimum supported version of each dependency before a CI run. Ensuring all tests then pass ensures that the code is indeed compatible with the range of package versions it claims to be compatible with, helping to prevent users from encountering broken installs.
Another way to use this tool is to install development versions of certain packages.
This utility works with dependencies specified in a pyproject.toml
file. It modifies pyproject.toml
, either by sending the transformed version to stdout (the default) or by modifying in place (which may be useful in CI scripts).
How to use
The following snippet modifies pyproject.toml
in place to test with the minimum supported version of each direct dependency, under the minimum supported tox version (as specified by minversion
in tox.ini
).
pip install "tox==$(extremal-python-dependencies get-tox-minversion)"
extremal-python-dependencies pin-dependencies-to-minimum --inplace
tox -epy
The following snippet modifies pyproject.toml
in place to test with the development version of one or more dependencies:
extremal-python-dependencies pin-dependencies \
"qiskit @ git+https://github.com/Qiskit/qiskit.git" \
"qiskit-ibm-runtime @ git+https://github.com/Qiskit/qiskit-ibm-runtime.git" \
--inplace
tox -epy
Each of the above patterns can be used in a CI script.
Caveats
- The minimum versions of all optional dependencies installed simultaneously must be compatible with each other.
- This tool does not set the minimum supported version of transitive dependencies.
Similar tools
- requirements-builder (builds requirements from a
setup.py
file instead of apyproject.toml
file)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file extremal_python_dependencies-0.0.3.tar.gz
.
File metadata
- Download URL: extremal_python_dependencies-0.0.3.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59cc30e230861f519f6636432393f7b9ec2fafd131a4a7000cae769f815f3e19 |
|
MD5 | e43253db98be8a69fd9c1165e2b67220 |
|
BLAKE2b-256 | 6eed6e06c006af1c9409c3d7a3e577b4136705726d0d869e825d6cfe9366fca8 |
File details
Details for the file extremal_python_dependencies-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: extremal_python_dependencies-0.0.3-py3-none-any.whl
- Upload date:
- Size: 12.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a72662dc48ae8934530c8a58e3ce186164face1e10ccfc54441ec28f2477c09 |
|
MD5 | 6b1111f67f5aa0ecde353018d9836dd5 |
|
BLAKE2b-256 | 1070d1870d82f3e2ae95296927ee6ba8c59a0a4097921acc9f34070f51a4e07e |