pyrobase

PyroBase - General Python Helpers and Utilities


Keywords
python, utility, library, paver, unittests, package
License
CPOL-1.02
Install
pip install pyrobase==0.4.1

Documentation

pyrobase

General Python Helpers and Utilities. Travis CI Issues β€ˆPyPI

What is it?

pyrobase assembles general Python helper functions and classes that can be applied to any project. That includes some additional tasks for the Paver build tool, an improved xmlrpc2scgi module, unit test helpers, and generic base modules for various domains.

All modules have unit tests (currently pyrobase.paver is an exception), and the goal is to reach >80% coverage.

Links:

Installation

Install it with pip install --user pyrobase, or more commonly just add it as a dependency to your project and call python setup.py develop -U. Installing into a virtualenv is recommended.

Usage

See the project's pavement.py and unit tests, and for a full API documentation go to http://packages.python.org/pyrobase/.

Build Instructions

First, check out the source:

mkdir -p ~/src
git clone https://github.com/pyroscope/pyrobase.git ~/src/pyrobase
cd ~/src/pyrobase

You are strongly encouraged to build within a virtualenv, call the provided script bootstrap.sh to create one in your working directory:

./bootstrap.sh
. bin/activate

Use paver to run common project tasks:

paver test
paver docs
paver lint -m
paver coverage

Performing a Release

  1. Check Travis CI status at https://travis-ci.org/pyroscope/pyrobase

  2. Check for and fix pylint violations:

    paver lint -m
    
  3. Verify debian/changelog for completeness and the correct version, and bump the release date:

    dch -r
    
  4. Remove β€˜dev’ version tagging from setup.cfg, and perform a release check:

    sed -i -re 's/^(tag_[a-z ]+=)/##\1/' setup.cfg
    paver release
    
  5. Commit and tag the release:

    git status  # check all is committed
    tag="v$(dpkg-parsechangelog | grep '^Version:' | awk '{print $2}')"
    git tag -a "$tag" -m "Release $tag"
    
  6. Build the final release and upload it to PyPI:

    paver dist_clean sdist bdist_wheel
    twine upload dist/*.{zip,whl}
    
  7. Create the ZIP file with the API documentation:

    paver dist_docs
    
  8. Upload the docs from the dist directory to pythonhosted.org:

    xdg-open "https://pypi.python.org/pypi?%3Aaction=pkg_edit&name=pyrobase" &
    

Acknowledgements