Code Monkey home page Code Monkey logo

requirements's Introduction

Global Requirements for OpenStack Projects

Why Global Requirements?

Refer to the Dependency Management section of the Project Team Guide for information about the history of the project and the files involved.

Tools

All the tools require openstack_requirements to be installed (e.g. in a Python virtualenv). They all have help, which is the authoritative documentation.

update-requirements

This will update the requirements in a project from the global requirements file found in .. Alternatively, pass --source to use a different global requirements file:

update-requirements --source /opt/stack/requirements /opt/stack/nova

Entries in all requirements files will have their versions updated to match the entries listed in the global requirements. Excess entries will cause errors in hard mode (the default) or be ignored in soft mode.

generate-constraints

Compile a constraints file showing the versions resulting from installing all of global-requirements.txt:

generate-constraints -p /usr/bin/python2.7 -p /usr/bin/python3 \
  -b blacklist.txt -r global-requirements.txt > new-constraints.txt

edit-constraints

Replace all references to a package in a constraints file with a new specification. Used by DevStack to enable git installations of libraries that are normally constrained:

edit-constraints oslo.db "-e file://opt/stack/oslo.db#egg=oslo.db"

Proposing changes

Look at the Review Guidelines and make sure your change meets them.

All changes to global-requirements.txt may dramatically alter the contents of upper-constraints.txt due to adding or removing transitive dependencies. As such you should always generate a diff against the current merged constraints, otherwise your change may fail if it is incompatible with the current tested constraints.

A change to the minimum specified vesion of a library in global-requirements.txt currenty requires adjusting the lower-constraints.txt file alongside with the new constrainted coinstallable version of minimums.

Regenerating involves five steps.

  1. Install the dependencies needed to compile various Python packages:

    sudo apt-get install $(bindep -b)
    
  2. Create a reference file (do this without your patch applied):

    generate-constraints -p /usr/bin/python2.7 -p /usr/bin/python3 \
      -b blacklist.txt -r global-requirements.txt > baseline
    
  3. Apply your patch and generate a new reference file:

    generate-constraints -p /usr/bin/python2.7 -p /usr/bin/python3 \
      -b blacklist.txt -r global-requirements.txt > updated
    
  4. Diff them:

    diff -p baseline updated
    
  5. Apply the patch to upper-constraints.txt. This may require some fiddling. edit-constraint can do this for you when the change does not involve multiple lines for one package.

Resources

requirements's People

Contributors

dhellmann avatar openstackadmin avatar dirkmueller avatar dims avatar rbtcollins avatar ajaeger avatar emonty avatar sdague avatar tbreeds avatar jd avatar jogo avatar booxter avatar amotoki avatar glongwave avatar dtantsur avatar frostman avatar stmcginnis avatar claudiubelu avatar tempusfrangit avatar prometheanfire avatar fungi avatar chungg avatar gkotton avatar harlowja avatar markmc avatar yamt avatar dklyle avatar flaper87 avatar stevemar avatar jamielennox avatar

Watchers

James Cloos avatar Alexander Chadin avatar

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.