轻松满足(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中的集成版本,该版本使用更改详细信息进行提交。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
多线程试图找出线程和Java   java字符串池(字符串和字符串缓冲区)   java如何通过entryid从kaltura获取文件url   java如何通过Oracle服务总线重定向请求   java RecyclerView我最多只能添加一行   java如何防止Paho在处理来自代理的消息后发送ACK?   java从泛型方法调用重载方法   java如何使javac编译我的多语言程序   java Log4j不会在删除时重新创建文件   java如何设置Zk会话(org.zkoss.Zk.ui),以便对扩展GenericForwardComposer的控制器类进行单元测试   Java:为什么可以对通配符集合进行强制转换?   java如何将数据更新到从自定义视图类创建的对象,以便可以在自定义视图上绘制数据?   java如何解决在片段中使用意图时应用程序崩溃的问题?   java如何使来自JSP的Servlet调用更安全?   java在Lucene中索引正则表达式并搜索输入   java如何设置Jetty,使其与Tomcat对等,同时支持JSP和servlet?   java在检查和使用对话框输入时遇到问题   java Git可以在签出时更改文件吗?