GithubHelp home page GithubHelp logo

eagleppp / pip-review Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jgonggrijp/pip-review

0.0 0.0 0.0 230 KB

A tool to keep track of your Python package updates.

Home Page: https://pypi.python.org/pypi/pip-review

License: BSD 3-Clause "New" or "Revised" License

Shell 0.29% Python 85.11% Perl 14.60%

pip-review's Introduction

Build status

pip-review

Looking for a new maintainer! See jgonggrijp#76.

pip-review is a convenience wrapper around pip. It can list available updates by deferring to pip list --outdated. It can also automatically or interactively install available updates for you by deferring to pip install.

Example, report-only:

$ pip-review
requests==0.13.4 is available (you have 0.13.2)
redis==2.4.13 is available (you have 2.4.9)
rq==0.3.2 is available (you have 0.3.0)

Example, actually install everything:

$ pip-review --auto
... <pip install output>

Example, run interactively, ask to upgrade for each package:

$ pip-review --interactive
requests==0.14.0 is available (you have 0.13.2)
Upgrade now? [Y]es, [N]o, [A]ll, [Q]uit y
...
redis==2.6.2 is available (you have 2.4.9)
Upgrade now? [Y]es, [N]o, [A]ll, [Q]uit n
rq==0.3.2 is available (you have 0.3.0)
Upgrade now? [Y]es, [N]o, [A]ll, [Q]uit y
...

Example, preview for update target list by pip list --outdated format, with run interactively or install everything:

$ pip-review --interactive --preview
Package  Version Latest Type
-----------------------------
redis    2.4.9   2.6.2  wheel
requests 0.13.2  0.14.0 wheel
rq       0.3.0   0.3.4  wheel
-----------------------------
... < --interactive processing >
$ pip-review --auto --preview
... <same above and pip install output>

Example, only preview for update target list:

$ pip-review --preview-only
Package  Version Latest Type
-----------------------------
redis    2.4.9   2.6.2  wheel
requests 0.13.2  0.14.0 wheel
rq       0.3.0   0.3.4  wheel
-----------------------------

Run pip-review -h for a complete overview of the options.

Note: If you want to pin specific packages to prevent them from automatically being upgraded, you can use a constraint file (similar to requirements.txt):

$ export PIP_CONSTRAINT="${HOME}/constraints.txt"
$ cat $PIP_CONSTRAINT
pyarrow==0.14.1
pandas<0.24.0

$ pip-review --auto
...

Set this variable in .bashrc or .zshenv to make it persistent. Alternatively, this option can be specified in pip.conf, e.g.:

  • Linux:
$ cat ~/.config/pip/pip.conf
[global]
constraint = /home/username/constraints.txt
  • Windows:
$ cat $HOME\AppData\Roaming\pip\pip.ini
[global]
constraint = '$HOME\Roaming\pip\constraints.txt'

The conf file are dependent of the user, so If you use multiple users you must define config file for each of them. https://pip.pypa.io/en/stable/user_guide/#constraints-files

Since version 0.5, you can also invoke pip-review as python -m pip_review. This can be useful if you are using multiple versions of Python next to each other.

Before version 1.0, pip-review had its own logic for finding package updates instead of relying on pip list --outdated.

Like pip, pip-review updates all packages, including pip and pip-review.

Installation

To install, simply use pip:

$ pip install pip-review

Decide for yourself whether you want to install the tool system-wide, or inside a virtual env. Both are supported.

Testing

To test with your active Python version:

$ ./run-tests.sh

To test under all (supported) Python versions:

$ tox

The tests run quite slow, since they actually interact with PyPI, which involves downloading packages, etc. So please be patient.

Origins

pip-review was originally part of pip-tools but has been discontinued as such. See Pin Your Packages by Vincent Driessen for the original introduction. Since there are still use cases, the tool now lives on as a separate package.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.