Skip to main content

Ensures your dependencies work with minimum version

Project description

pessimist

The name "optimist" was already taken?

Given a requirements.txt and some basic information about how to run your tests, finds accurate minimum versions.

Usage

python -m pessimist.manager [-c 'make test'] [--fast] [--extend] /path/to/repo
  • -c -- command to run. If you're using a src/ layout you can use cd src; python -m unittest or so.
  • --fast -- only verify min and max versions
  • --extend -- ignore specifiers entirely; intended to let you go back past == and may be improved to do something more like that in the future.
  • --verbose -- show logs as it's working

Strategy

  1. Try newest versions of everything. Bail if this fails to pass.
  2. For each dep independently, try progressively older versions.
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pessimist-0.6.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

pessimist-0.6.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file pessimist-0.6.0.tar.gz.

File metadata

  • Download URL: pessimist-0.6.0.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for pessimist-0.6.0.tar.gz
Algorithm Hash digest
SHA256 b8850b3235f7907adcc40f683444740d6bf4058bb5fe154ba29b1962bd6d2bfe
MD5 0c74b84058b7ead32d3c774cfd222910
BLAKE2b-256 0adeb26816a2a8c372d37669d62364d31ee98ce74e0a8dc592a9a5c0a96b6bff

See more details on using hashes here.

File details

Details for the file pessimist-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: pessimist-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for pessimist-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3a27e0d2803f00219f3c84a430fcb4a5b172c6a0fd450ffa841edfadd0a26089
MD5 4da6f23b5c4580c3b83db642313c41dd
BLAKE2b-256 c87ccfbd241d30f3bb66f9f0d4a6cdd78ba51eb7beb1c1affbfb4e27bb7393fb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page