Skip to content

Commit

Permalink
Merge pull request #500 from oesteban/enh/use-versioneer
Browse files Browse the repository at this point in the history
[ENH] Use versioneer to handle versions
  • Loading branch information
oesteban committed May 17, 2017
2 parents a3104b1 + b819a04 commit 9759df5
Show file tree
Hide file tree
Showing 10 changed files with 2,438 additions and 114 deletions.
1 change: 1 addition & 0 deletions .gitattributes
@@ -0,0 +1 @@
mriqc/_version.py export-subst
4 changes: 3 additions & 1 deletion MANIFEST.in
Expand Up @@ -7,4 +7,6 @@ recursive-include mriqc/data *
#Misc
include requirements.txt
include CHANGES.txt
include LICENSE.txt
include LICENSE.txt
include versioneer.py
include mriqc/_version.py
4 changes: 2 additions & 2 deletions circle.yml
Expand Up @@ -22,12 +22,12 @@ dependencies:
# Create scratch folder and force group permissions
- mkdir -p $SCRATCH && sudo setfacl -d -m group:ubuntu:rwx $SCRATCH && sudo setfacl -m group:ubuntu:rwx $SCRATCH
- if [[ ! -d ~/data/${TEST_DATA_NAME} ]]; then wget --retry-connrefused --waitretry=5 --read-timeout=20 --timeout=15 -t 0 -q -O ${TEST_DATA_NAME}.tar.gz "${TEST_DATA_URL}" && tar xzf ${TEST_DATA_NAME}.tar.gz -C ~/data/; fi
- if [ "$CIRCLE_TAG" != "" ]; then sed -i -E "s/(__version__ = )'[A-Za-z0-9.-]+'/\1'$CIRCLE_TAG'/" mriqc/info.py ; fi
- docker load --input $HOME/docker/cache.tar || true
override:
- echo "${CIRCLE_TAG:-$CIRCLE_SHA1}" > mriqc/VERSION
- ? |
e=1 && for i in {1..5}; do
docker build --rm=false -t ${DOCKER_IMAGE}:${DOCKER_TAG} --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` --build-arg VCS_REF=`git rev-parse --short HEAD` --build-arg VERSION="${CIRCLE_TAG:-99.99.99}" . && e=0 && break || sleep 15
docker build --rm=false -t ${DOCKER_IMAGE}:${DOCKER_TAG} --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` --build-arg VCS_REF=`git rev-parse --short HEAD` --build-arg VERSION="${CIRCLE_TAG:-$CIRCLE_SHA1}" . && e=0 && break || sleep 15
done && [ "$e" -eq "0" ]
:
timeout: 3200
Expand Down
24 changes: 16 additions & 8 deletions mriqc/info.py → mriqc/__about__.py
Expand Up @@ -7,12 +7,16 @@
"""

__version__ = '99.99.99'
from datetime import date
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions

__author__ = 'Oscar Esteban'
__email__ = 'code@oscaresteban.es'
__maintainer__ = 'Oscar Esteban'
__copyright__ = ('Copyright 2016, Center for Reproducible Neuroscience, '
'Stanford University')
__copyright__ = ('Copyright %d, Center for Reproducible Neuroscience, '
'Stanford University') % date.today().year
__credits__ = 'Oscar Esteban'
__license__ = '3-clause BSD'
__status__ = 'Prototype'
Expand All @@ -30,18 +34,21 @@
"It is also scheduled to add diffusion MRI to the target "
"imaging families.")

URL = 'http://mriqc.readthedocs.org/'
DOWNLOAD_URL = ('https://pypi.python.org/packages/source/m/mriqc/'
'mriqc-{}.tar.gz'.format(__version__))
__url__ = 'http://mriqc.readthedocs.org/'
__download__ = ('https://github.com/poldracklab/mriqc/archive/'
'{}.tar.gz'.format(__version__))

PACKAGE_NAME = 'mriqc'
CLASSIFIERS = [
'Development Status :: 3 - Alpha',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Image Recognition',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
]

SETUP_REQUIRES = []

REQUIRES = [
'numpy>=1.12.0',
Expand All @@ -62,7 +69,8 @@
'svgutils',
'nipy',
'statsmodels',
'pybids>=0.1.0'
'pybids>=0.1.0',
'versioneer',
]

LINKS_REQUIRES = []
Expand Down
9 changes: 6 additions & 3 deletions mriqc/__init__.py
Expand Up @@ -9,9 +9,9 @@
"""
from __future__ import print_function, division, absolute_import, unicode_literals

import logging
from .info import (

from .__about__ import (
__version__,
__author__,
__email__,
Expand All @@ -21,7 +21,9 @@
__license__,
__status__,
__description__,
__longdesc__
__longdesc__,
__url__,
__download__,
)


Expand All @@ -34,3 +36,4 @@
'ants_nthreads': 6,
'float32': False
}

0 comments on commit 9759df5

Please sign in to comment.