Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into addSPMrealingUnwarp
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Aug 10, 2018
2 parents 3f6c5d2 + 297a24c commit 1b12a27
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 10 deletions.
26 changes: 20 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,25 @@ jobs:
- run:
name: Check pypi preconditions
command: |
pip install twine future wheel readme_renderer
pip install --upgrade twine future wheel readme_renderer setuptools
python setup.py check -r -s
python setup.py sdist bdist_wheel
- run:
name: Validate Python 2 installation
command: |
pyenv local 2.7.12
pip install dist/nipype-*-py2.py3-none-any.whl
# Futures should install in Python 2
pip show futures 2>/dev/null | grep "Name: futures"
- run:
name: Validate Python 3 installation
command: |
pyenv local 3.5.2
pip install dist/nipype-*-py2.py3-none-any.whl
# Futures should not install in Python 3
test $(pip show futures 2>/dev/null | wc -l) = "0"
- store_artifacts:
path: /home/circleci/nipype/dist

deploy_pypi:
machine: *machine_kwds
Expand All @@ -352,7 +368,7 @@ jobs:
- run:
name: Deploy to PyPI
command: |
pip install twine future wheel readme_renderer
pip install --upgrade twine future wheel readme_renderer setuptools
python setup.py check -r -s
python setup.py sdist bdist_wheel
twine upload dist/*
Expand Down Expand Up @@ -393,6 +409,7 @@ workflows:
version: 2
build_test_deploy:
jobs:
- pypi_precheck
- compare_base_dockerfiles:
filters:
tags:
Expand Down Expand Up @@ -428,6 +445,7 @@ workflows:
tags:
only: /.*/
requires:
- pypi_precheck
- test_pytest
- update_feedstock:
context: nipybot
Expand All @@ -436,7 +454,3 @@ workflows:
only: /rel\/.*/
tags:
only: /.*/
- pypi_precheck:
filters:
branches:
only: /rel\/.*/
12 changes: 9 additions & 3 deletions nipype/interfaces/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,16 @@

have_pybids = True
try:
from bids import grabbids as gb
import bids
except ImportError:
have_pybids = False

if have_pybids:
try:
from bids import layout as bidslayout
except ImportError:
from bids import grabbids as bidslayout

try:
import pyxnat
except:
Expand Down Expand Up @@ -2810,7 +2816,7 @@ def __init__(self, infields=None, **kwargs):

# If infields is empty, use all BIDS entities
if infields is None and have_pybids:
bids_config = join(dirname(gb.__file__), 'config', 'bids.json')
bids_config = join(dirname(bidslayout.__file__), 'config', 'bids.json')
bids_config = json.load(open(bids_config, 'r'))
infields = [i['name'] for i in bids_config['entities']]

Expand All @@ -2835,7 +2841,7 @@ def _list_outputs(self):
exclude = None
if self.inputs.strict:
exclude = ['derivatives/', 'code/', 'sourcedata/']
layout = gb.BIDSLayout(self.inputs.base_dir, exclude=exclude)
layout = bidslayout.BIDSLayout(self.inputs.base_dir, exclude=exclude)

# If infield is not given nm input value, silently ignore
filters = {}
Expand Down
1 change: 0 additions & 1 deletion nipype/interfaces/tests/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
have_pybids = True
try:
import bids
from bids import grabbids as gb
filepath = os.path.realpath(os.path.dirname(bids.__file__))
datadir = os.path.realpath(os.path.join(filepath, 'tests/data/'))
except ImportError:
Expand Down

0 comments on commit 1b12a27

Please sign in to comment.