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.
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:
- starts the container in daemon mode (runs
docker-compose run project sleep 3590
). - read the next package in requirements.
- check comment. if the comment is
'# the latest working version'
go to p. 2. - check comment. if the comment is
'# error on the version x.x.x'
:- check if the is version between current and x.x.x
- if there is update requirements file to version in the middle between the current and x.x.x and go to p. 3
- if there is not, add comment
'# the latest working version'
and go to p. 2
- check if there is newer version
- if there is not go to p. 2
- if there is, update requirements file to the newest version
- starts the tests
- if tests fail set version back, add comment
'# error on the version x.x.x'
and go to p. 4. - 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)
Built Distribution
Close
Hashes for safe_pip_upgrade-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ff68ff2d2b64cbd9a2ea5a39427c5d2b78adf9db81864883507db05c4e1ac23 |
|
MD5 | bb153b62d88bd4509f1dacb1c951cc4d |
|
BLAKE2b-256 | 22631b58e9bf7d4bca4a15e3ba92bbf3dfc32a686f240c1727e119f484700220 |