Ensures your dependencies work with minimum version
Reason this release was yanked:
Release created from wrong rev, changelog is incorrect. Use 0.9.3 instead.
Project description
pessimist
The name "optimist" was already taken?
Given your listed requirements, and how to run your tests, tries various versions to ensure the minimums are accurate.
Usage
python -m pessimist [-c 'make test'] [--fast] [--extend=name[,name...]] [--requirements=requirements*.txt] /path/to/repo
-c
-- command to run. If you're using a src/ layout you can usecd src; python -m unittest
or so.--fast
-- only verify min and max versions--extend
-- ignore specifiers entirely for the listed canonical names; intended to let you go back past==
and may be improved to do something more like that in the future. Also allows*
as a name to mean all names that are "variable"--requirements
-- comma-separated globs which represented "fixed" requirements.--verbose
-- show logs as it's working
Fixed and variable
- Fixed requirements are from
requirements*.txt
. If these match more than one version, only the newest is kept. - Variable requirements are from your setup.py/setup.cfg/etc that make it into the metadata. These are the ones we're interested in trying.
- If a name is in both sets, the variable logic is followed.
Strategy
- Try newest versions of everything. Bail if this fails to pass.
- For each dep independently, try progressively older versions.
- Try oldest versions of all. Bail if this fails to pass.
I subscribe to the "requirements.txt should be concrete versions you want to
use in CI" school of thought; the constraints in setup.py/setup.cfg/pyproject.toml
should be >=
the minimum version that works, and <
the next major version
("compatible", in poetry terms).
My goal in creating this is to have an automated check that we haven't broken
compatibility with an older version unintentionally. You could have a simpler
version of this that does sed -e 's/>=/==/
on your requirements files, but if
that fails, finding the new minimum is still a research projct that's automated
by this one.
License
pessimist is copyright Tim Hatch, and licensed under
the MIT license. I am providing code in this repository to you under an open
source license. This is my personal repository; the license you receive to
my code is from me and not from my employer. See the LICENSE
file for details.
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 pessimist-0.9.2.tar.gz
.
File metadata
- Download URL: pessimist-0.9.2.tar.gz
- Upload date:
- Size: 13.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.8.2 requests/2.27.1 setuptools/48.0.0 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50600a4fc8e7e39001961c0bcf3d29d48f1834200534ad96e762c62b3e3a3896 |
|
MD5 | 13631b137dd797af0da0aae9ff20252b |
|
BLAKE2b-256 | dc8af2f75909f4e13b38f84e93c0eab5627c075633304a500cfd9aed48878730 |
File details
Details for the file pessimist-0.9.2-py3-none-any.whl
.
File metadata
- Download URL: pessimist-0.9.2-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.8.2 requests/2.27.1 setuptools/48.0.0 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f350525886577b8175ca850e6b72f3a2c59d5be3048a7327977dec01d076ef6d |
|
MD5 | 822ad80a7e30cf0cfec9d6cdb8790404 |
|
BLAKE2b-256 | 6dc178dda2a2db29b8df2e8fd5de6b8456dac1de65722d04a81ab5bac868862d |