轻松满足(pin/manage)您的依赖性需求
bumper的Python项目详细描述
保险杠
轻松满足(固定/管理)您的依赖性需求
功能摘要
- 将requirements.txt/pinned.txt中的依赖项提升到最新版本或指定版本
- 版本根据pypi中发布的版本进行验证
- 显示固定版本凸点的详细更改日志
- 从详细的变更日志中自动锁定依赖项要求
- 通过编写自己的保险杠类可以轻松扩展
快速入门教程
要安装:
sudo pip3 install autopip app install bumper
要将所有内容更新到最新版本:
$ cat requirements.txt localconfig<=0.3 remoteconfig requests==2 $ bump [INFO] Updated requirements.txt: requests==2.5.1 $ cat requirements.txt localconfig<=0.3 remoteconfig requests==2.5.1
要切换到特定版本:
$ bump localconfig==0.5 [ERROR] There are no published versions that satisfies localconfig==0.5 Please change to match at least one of these: 0.4.1, 0.4.0, 0.3.6, 0.3.5, 0.3.4, 0.3.3, 0.3.2, 0.3.1, 0.3.0, 0.2.9 # Needs quote when using > or < sign they are stdout/in redirects in bash. $ bump 'localconfig>=0.4' requests==2.5 [INFO] Updated requirements.txt: localconfig>=0.4 requests==2.5
要显示凹凸的详细信息:
$ bump --detail [INFO] Checking requests [INFO] Updated requirements.txt: requests==2.5.1 requests 2.5.1 **Behavioural Changes** + Only catch HTTPErrors in raise_for_status (#2382) **Bugfixes** + Handle LocationParseError from urllib3 (#2344) + Handle file-like object filenames that are not strings (#2379) + Unbreak HTTPDigestAuth handler. Allow new nonces to be negotiated (#2389) $ bump [INFO] No need to bump. Everything is up to date!
为了显示详细信息,包的long_description、docs_url或url必须链接到包的git/bitbucket存储库,其中changelog.rst(或其变体:changelog changes history changes.md txt)可以在源根目录或“docs”文件夹中找到。
对于pinned.txt,它甚至会锁定来自更改的任何要求:
$ cat pinned.txt remoteconfig==0.2 $ bump --dependencies [INFO] Checking remoteconfig [INFO] Changes in remoteconfig require: localconfig>=0.4 [INFO] Pinned localconfig==0.4.1, remoteconfig==0.2.4 remoteconfig 0.2.4 * Add py26 testing to tox * Use mangled url as file name instead of base64 encode * Fix tests 0.2.2 * Add an example to instantiate another config * Raise a more descriptive error when requests.get fails 0.2.1 * Require localconfig>=0.4 * Fix API doc * Update changelog
简单又酷,对吧?:)
想让它更容易吗?查看workspace-tools中的集成版本,该版本使用更改详细信息进行提交。