Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

MAINT: Drop pytest-xdist requirement, minimum pytest version #2856

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

Merged
merged 10 commits into from
Jan 20, 2019
Merged
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
3 changes: 2 additions & 1 deletion 3 .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,10 @@ before_install:

install:
- travis_retry pip install $EXTRA_PIP_FLAGS -e .[$NIPYPE_EXTRAS]
- travis_retry pip install pytest-xdist

script:
- py.test -v --cov nipype --cov-config .coveragerc --cov-report xml:cov.xml -c nipype/pytest.ini --doctest-modules nipype
- py.test -v --cov nipype --cov-config .coveragerc --cov-report xml:cov.xml -c nipype/pytest.ini --doctest-modules nipype -n auto

after_script:
- codecov --file cov.xml --flags unittests -e TRAVIS_JOB_NUMBER
1 change: 1 addition & 0 deletions 1 docker/files/run_pytests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export COVERAGE_FILE=${WORKDIR}/tests/.coverage.py${PYTHON_VERSION}
py.test -v --junitxml=${WORKDIR}/tests/pytests_py${PYTHON_VERSION}.xml \
--cov nipype --cov-config /src/nipype/.coveragerc \
--cov-report xml:${WORKDIR}/tests/coverage_py${PYTHON_VERSION}.xml \
-n auto \
-c ${TESTPATH}/pytest.ini ${TESTPATH}
exit_code=$?

Expand Down
2 changes: 1 addition & 1 deletion 2 docker/generate_dockerfiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function generate_main_dockerfile() {
conda_install='python=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}
icu=58.1 libxml2 libxslt matplotlib mkl numpy paramiko
pandas psutil scikit-learn scipy traits=4.6.0' \
pip_install="grabbit==0.1.2 https://github.com/INCF/pybids/tarball/0.6.5" \
pip_install="pytest-xdist" \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the grabbit/pybids stuff, as it's not installed correctly to test BIDSDataGrabber, anyway. This should be fixed up in #2737.

activate=true \
--copy docker/files/run_builddocs.sh docker/files/run_examples.sh \
docker/files/run_pytests.sh nipype/external/fsl_imglob.py /usr/bin/ \
Expand Down
13 changes: 9 additions & 4 deletions 13 nipype/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,22 @@


class NipypeTester(object):
def __call__(self, doctests=True, parallel=True):
def __call__(self, doctests=True, parallel=False):
try:
import pytest
except:
except ImportError:
raise RuntimeError(
'py.test not installed, run: pip install pytest')
args = []
if not doctests:
args.extend(['-p', 'no:doctest'])
if not parallel:
args.append('-n0')
if parallel:
try:
import xdist
except ImportError:
raise RuntimeError(
"pytest-xdist required for parallel run")
args.append('-n auto')
args.append(os.path.dirname(__file__))
pytest.main(args=args)

Expand Down
10 changes: 3 additions & 7 deletions 10 nipype/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ def get_nipype_gitversion():
SCIPY_MIN_VERSION = '0.14'
TRAITS_MIN_VERSION = '4.6'
DATEUTIL_MIN_VERSION = '2.2'
PYTEST_MIN_VERSION = '3.6'
FUTURE_MIN_VERSION = '0.16.0'
SIMPLEJSON_MIN_VERSION = '3.8.0'
PROV_VERSION = '1.5.2'
Expand Down Expand Up @@ -149,19 +148,16 @@ def get_nipype_gitversion():
'neurdflib',
'click>=%s' % CLICK_MIN_VERSION,
'funcsigs',
'mock',
'pydotplus',
'pydot>=%s' % PYDOT_MIN_VERSION,
'packaging',
'futures; python_version == "2.7"',
'configparser; python_version <= "3.4"',
]

if sys.version_info <= (3, 4):
REQUIRES.append('configparser')

TESTS_REQUIRES = [
'pytest>=%s' % PYTEST_MIN_VERSION,
'pytest-xdist',
'mock',
'pytest',
'pytest-cov',
'codecov',
'pytest-env',
Expand Down
2 changes: 1 addition & 1 deletion 2 nipype/pytest.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[pytest]
norecursedirs = .git build dist doc nipype/external tools examples src
addopts = --doctest-modules -n auto
addopts = --doctest-modules
doctest_optionflags = ALLOW_UNICODE NORMALIZE_WHITESPACE
env =
PYTHONHASHSEED=0
4 changes: 0 additions & 4 deletions 4 requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ neurdflib
click>=6.6.0
funcsigs
configparser
pytest>=3.0
Copy link
Member

@mgxd mgxd Jan 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need to maintain our dependencies in 2 locations - info, requirements? What are thoughts on replacing this file with a simple:

.

or

.[dev]

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that will also install the current repo, not just the dependencies, right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really care, but that changes what pip install -r requirements.txt does. Do we know anybody who installs it that way, and what they desire from that?

@yarikoptic Does Debian use requirements.txt for anything?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mgxd Let's leave changing requirements.txt to another PR, where we can seek a consensus on the proper way to manage it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thats good with me

pytest-xdist
pytest-env
mock
pydotplus
pydot>=1.2.3
packaging
Morty Proxy This is a proxified and sanitized view of the page, visit original site.