Skip to main content

Pip safe auto-upgrade

Project description

Pip-safe-upgrade

Pip-safe-upgrade do automatic upgrade your pip requirements to the highest versions the tests pass.

build codecov PyPI version

Overview

This package can works only with docker-compose projects for now.

Installation

pip install safe-pip-upgrade

Work algorithm

After that you run the program with requirement parameters safe_pip_upgrade will do:

  1. starts the container in daemon mode (runs docker-compose run project sleep 3590).
  2. read the next package in requirements.
  3. check comment. if the comment is '# the latest working version' go to p. 2.
  4. check comment. if the comment is '# error on the version x.x.x':
    1. check if the is version between current and x.x.x
    2. if there is update requirements file to version in the middle between the current and x.x.x and go to p. 3
    3. if there is not, add comment '# the latest working version' and go to p. 2
  5. check if there is newer version
    1. if there is not go to p. 2
    2. if there is, update requirements file to the newest version
  6. starts the tests
  7. if tests fail set version back, add comment '# error on the version x.x.x' and go to p. 4.
  8. otherwise, go to p. 2

Usage

The main parameters

REQUIREMENTS_FILE = 'deploy/requirements.txt' # path to the requirements file in docker container
LOCAL_REQUIREMENTS_FILE = r'C:\work\big-project\deploy\requirements\requirements.txt' # the local path to the requirements file 

PROJECT_FOLDER = r'C:\work\big-project' # the local project path
COMPOSE_SERVICE_NAME = 'django' # the docker-compose service name
REMOTE_WORK_DIR = '/app'  # remote working directory

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

safe-pip-upgrade-0.0.1.tar.gz (6.4 kB view hashes)

Uploaded Source

Built Distribution

safe_pip_upgrade-0.0.1-py3-none-any.whl (7.8 kB view hashes)

Uploaded Python 3

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