Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[bumpversion]
current_version = 0.1.7
commit = True
tag = False

[bumpversion:file:setup.py]

[bumpversion:file:do_release.sh]

53 changes: 53 additions & 0 deletions TBBSS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
The Better Bioinformatics Software Society (TBBSS): https://github.com/TBBSS
============================================================================

Mitchell Stanton-Cook ([email protected]) is using your code in a project.

He noticed you were not tagging releases. He's provided you with a script
**do_release.sh**.

It depends on -
* (pip)
* bumpversion
* wheel
* twine

You can install the using::

$ pip install -r requirements-dev.txt


Using do_release.sh
-------------------

Set the following in your (BASH shell)::

export VERSION=0.1.6
export BUMP_TYPE=patch
# can be major, minor, patch. See http://semver.org
export PYPIUSER=user
export PYPIPASS=pass
# Above assumes- have PyPI account and have registered you project
# see: http://peterdowns.com/posts/first-time-with-pypi.html


**Note:** See *.bumpversion.cfg* for finer control.

Finally::

./do_release.sh

In this case::

export VERSION=0.1.6
export BUMP_TYPE=patch
export PYPIUSER=user
export PYPIPASS=pass
sh do_release.sh

Generated:
* https://github.com/TBBSS/rubra/releases/tag/v0.1.6 and
* (would have updated PyPI version as well...)


Cheers ;-)
63 changes: 63 additions & 0 deletions do_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Provided by Mitchell Stanton-Cook ([email protected])

#VERSION=0.1.7

# Lets run the examples first...
pip uninstall Rubra
python setup.py install
pip uninstall Rubra
python setup.py clean


# Do all the versioning stuff here..
bumpversion $BUMP_TYPE


# Clean, test, build the source distribution & pip install it
# Need to get exit statuses here...
#python setup.py test
#STATUS=`echo $?`
#if [ $STATUS -eq 0 ]; then
# echo ""
#else
# echo "Tests failed. Will not release"
# exit
#fi

python setup.py sdist bdist_wheel
pip install dist/Rubra-$VERSION.tar.gz
STATUS=`echo $?`
if [ $STATUS -eq 0 ]; then
echo ""
else
echo "Package is not pip installable. Will not release"
exit
fi


# Docs
# Need to get exit statuses here...
#cd docs
#make clean
#sphinx-apidoc -o API ../Rubra
#mv API/* .
#rmdir API
#make html
#cd ..


git push
# tag & push the tag to github
GIT=`git status`
CLEAN='# On branch master nothing to commit, working directory clean'
if [ "$s1" == "$s2" ]; then
git tag v$VERSION
git push --tags
else
echo "Git not clean. Will not release"
exit
fi


# Upload to PyPI & clean
twine upload -u $PYPIUSER -p $PYPIPASS dist/* && python setup.py clean
3 changes: 3 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bumpversion==0.5.3
twine==1.5.0
wheel==0.24.0
31 changes: 24 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
#!/usr/bin/env python

from setuptools import setup
import sys
import os


# Helper functions
if sys.argv[-1] == 'publish':
print "Please use twine or do_release.sh"
sys.exit()

if sys.argv[-1] == 'clean':
os.system('rm -rf Rubra.egg-info build dist')
sys.exit()

if sys.argv[-1] == 'docs':
os.system('cd docs && make html')
sys.exit()

setup(
name='Rubra',
version='0.1.5',
version='0.1.7',
author='Bernie Pope',
author_email='[email protected]',
packages=['rubra'],
Expand All @@ -14,17 +30,18 @@
},
url='https://github.com/bjpop/rubra',
license='LICENSE.txt',
description='Rubra is a pipeline system for bioinformatics workflows\
with support for running pipeline stages on a distributed compute cluster.',
description=('Rubra is a pipeline system for bioinformatics workflows '
'with support for running pipeline stages on a distributed '
'compute cluster.'),
long_description=open('README.txt').read(),
install_requires=[
"ruffus >= 2.0.0",
],
classifiers=[
'Development Status :: 4 - Beta',
'License :: OSI Approved :: MIT',
'Operating System :: POSIX',
'Programming Language :: Python',
'Development Status :: 4 - Beta',
'License :: OSI Approved :: MIT',
'Operating System :: POSIX',
'Programming Language :: Python',
],

)