-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAINT: Switch to a setup.cfg
-style of installation
#24
Changes from all commits
33035a0
5a9907b
4d22fd5
902c235
7f2bbc7
157b65b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Group inference and reporting of neuroimaging studies require that individual's | ||
features are spatially aligned into a common frame where their location can be | ||
called standard. | ||
To that end, a multiplicity of brain templates with anatomical annotations | ||
(i.e., atlases) have been published. | ||
However, a centralized resource that allows programmatic access to templates is | ||
lacking. | ||
TemplateFlow is a modular, version-controlled resource that allows researchers | ||
to use templates "off-the-shelf" and share new ones. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[build-system] | ||
requires = ["setuptools >= 30.3.0", "wheel"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
pybids>=0.9.0,<0.10.0a0 | ||
pytest | ||
pybids~=0.9.2 | ||
requests | ||
tqdm | ||
pytest | ||
pytest-xdist | ||
pytest-cov==2.5.1 | ||
coverage |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,12 @@ | ||
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- | ||
# vi: set ft=python sts=4 ts=4 sw=4 et: | ||
"""\ | ||
Group inference and reporting of neuroimaging studies require that individual's \ | ||
features are spatially aligned into a common frame where their location can be \ | ||
called standard. \ | ||
To that end, a multiplicity of brain templates with anatomical annotations \ | ||
(i.e., atlases) have been published. \ | ||
However, a centralized resource that allows programmatic access to templates is \ | ||
lacking. \ | ||
TemplateFlow is a modular, version-controlled resource that allows researchers \ | ||
to use templates "off-the-shelf" and share new ones. \ | ||
""" | ||
Templateflow | ||
""" | ||
from ._version import get_versions | ||
__version__ = get_versions()['version'] | ||
del get_versions | ||
|
||
__packagename__ = 'templateflow' | ||
__author__ = 'The CRN developers' | ||
__copyright__ = 'Copyright 2019, Center for Reproducible Neuroscience, Stanford University' | ||
__credits__ = ['Oscar Esteban'] | ||
__license__ = '3-clause BSD' | ||
__maintainer__ = 'Oscar Esteban' | ||
__email__ = 'code@oscaresteban.es' | ||
__status__ = 'Prototype' | ||
|
||
__description__ = """\ | ||
TemplateFlow's Python Client - TemplateFlow is the Zone of neuroimaging templates. | ||
""" | ||
__longdesc__ = __doc__ | ||
__url__ = 'https://github.com/poldracklab/{}'.format(__packagename__) | ||
|
||
DOWNLOAD_URL = ( | ||
'https://pypi.python.org/packages/source/{name[0]}/{name}/{name}-{ver}.tar.gz'.format( | ||
name=__packagename__, ver=__version__)) | ||
CLASSIFIERS = [ | ||
'Development Status :: 3 - Alpha', | ||
'Intended Audience :: Science/Research', | ||
'Topic :: Scientific/Engineering :: Image Recognition', | ||
'License :: OSI Approved :: Apache Software License', | ||
'Programming Language :: Python :: 3.5', | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3.7', | ||
] | ||
|
||
REQUIRES = [ | ||
'pybids>=0.9.0,<0.10.0a0', | ||
'requests', | ||
'tqdm', | ||
] | ||
|
||
SETUP_REQUIRES = [] | ||
REQUIRES += SETUP_REQUIRES | ||
|
||
LINKS_REQUIRES = [] | ||
TESTS_REQUIRES = [ | ||
'pytest', | ||
'pytest-xdist', | ||
] | ||
|
||
EXTRA_REQUIRES = { | ||
'doc': [], | ||
'tests': TESTS_REQUIRES, | ||
'datalad': ['datalad'], | ||
} | ||
|
||
# Enable a handle to install all extra dependencies at once | ||
EXTRA_REQUIRES['all'] = list(EXTRA_REQUIRES.values()) | ||
__credits__ = ['Oscar Esteban', 'Chris Markiewicz', 'Rastko Ciric', 'Yaroslav O. Halchenko', | ||
'Chris Gorgolewski', 'Russell Poldrack'] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
from warnings import warn | ||
from pathlib import Path | ||
from pkg_resources import resource_filename | ||
from .bids import Layout | ||
|
||
TF_DEFAULT_HOME = Path.home() / '.cache' / 'templateflow' | ||
TF_HOME = Path(getenv('TEMPLATEFLOW_HOME', str(TF_DEFAULT_HOME))) | ||
|
@@ -76,6 +75,11 @@ def update_home(force=False): | |
return False | ||
|
||
|
||
TF_LAYOUT = Layout( | ||
str(TF_HOME), validate=False, config='templateflow', | ||
ignore=['.git', '.datalad', '.gitannex', '.gitattributes', 'scripts']) | ||
TF_LAYOUT = None | ||
try: | ||
from .bids import Layout | ||
TF_LAYOUT = Layout( | ||
TF_HOME, validate=False, config='templateflow', | ||
ignore=['.git', '.datalad', '.gitannex', '.gitattributes', 'scripts']) | ||
except ImportError: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What condition should this happen under? You've got There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For some reason pybids is not available when running the update script during install - could dig more into this, but I'm not sure it's worthy. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, you could add pybids to |
||
pass |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[flake8] | ||
max-line-length = 99 | ||
doctests = False | ||
exclude=*build/ | ||
|
||
[pytest] | ||
norecursedirs = .git | ||
addopts = -svx | ||
doctest_optionflags = ALLOW_UNICODE NORMALIZE_WHITESPACE | ||
env = | ||
PYTHONHASHSEED=0 | ||
filterwarnings = | ||
ignore::DeprecationWarning |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These may be automatically ignored these days... I might flag them for review in a future PR, though not worth the trouble for this PR, IMO.