Skip to content

RF: Move pytest and pytest-xdist from general requirement into tests_required #2850

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 1 commit into from
Jan 14, 2019

Conversation

yarikoptic
Copy link
Member

not really sure why this didn't give me troubles before but it does now:

reproin@59965c6fd52f:/$ /usr/bin/heudiconv
Traceback (most recent call last):
  File "/usr/bin/heudiconv", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3019, in <module>
    @_call_aside
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3003, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3032, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 657, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 670, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 849, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pytest>=3.6' distribution was not found and is required by nipype
  • I do not think pytest must be a runtime requirement
  • I do not know if there is any negative side-effect (e.g. some unguarded import of nipype at runtime)

@effigies
Copy link
Member

How did you install that the dependencies weren't installed?

pytest is in the main dependencies because the following is expected to work out-of-the-box:

import nipype
nipype.test()

@effigies
Copy link
Member

Related: #2680.

@effigies
Copy link
Member

Eh, nevermind. I think this makes sense. We do perform an import check in nipype.test:

try:
import pytest
except:
raise RuntimeError(
'py.test not installed, run: pip install pytest')

@satra Any objections?

@effigies effigies added this to the 1.1.8 milestone Jan 13, 2019
@codecov-io
Copy link

Codecov Report

Merging #2850 into master will decrease coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2850      +/-   ##
==========================================
- Coverage   67.47%   67.45%   -0.03%     
==========================================
  Files         341      341              
  Lines       43362    43362              
  Branches     5379     5379              
==========================================
- Hits        29257    29248       -9     
- Misses      13409    13417       +8     
- Partials      696      697       +1
Flag Coverage Δ
#smoketests 50.53% <ø> (ø) ⬆️
#unittests 64.88% <ø> (ø) ⬆️
Impacted Files Coverage Δ
nipype/pipeline/plugins/legacymultiproc.py 61.5% <0%> (-4.5%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update add9bd7...2ad6f37. Read the comment docs.

@yarikoptic
Copy link
Member Author

For completeness, in my case it was a reproin docker image, which installed python-nipype debian package. pytest I believe is recommended but not strict dependency.

@yarikoptic
Copy link
Member Author

oh, got merged already... just wanted to push more ;) will do in a new PR.

yarikoptic added a commit to ReproNim/reproin that referenced this pull request Jan 15, 2019
yarikoptic added a commit to yarikoptic/nipype that referenced this pull request Feb 4, 2019
1.1.8 (January 28, 2019)

  * FIX: ANTS LaplacianThickness cmdline opts fixed up (nipy#2846)
  * FIX: Resolve LinAlgError during SVD (nipy#2838)
  * ENH: Add interfaces wrapping DIPY worflows (nipy#2830)
  * ENH: Update BIDSDataGrabber for pybids 0.7 (nipy#2737)
  * ENH: Add FSL `eddy_quad` interface (nipy#2825)
  * ENH: Support tckgen -select in MRtrix3 v3+ (nipy#2823)
  * ENH: Support for BIDS event files (nipy#2845)
  * ENH: CompositeTransformUtil, new ANTs interface (nipy#2785)
  * RF: Move pytest and pytest-xdist from general requirement into tests_required (nipy#2850)
  * DOC: Add S3DataGrabber example (nipy#2849)
  * DOC: Skip conftest module in API generation (nipy#2852)
  * DOC: Hyperlink DOIs to preferred resolver (nipy#2833)
  * MAINT: Install numpy!=1.16.0 from conda in Docker (nipy#2862)
  * MAINT: Drop pytest-xdist requirement, minimum pytest version  (nipy#2856)
  * MAINT: Disable numpy 1.16.0 for Py2.7 (nipy#2855)

* tag '1.1.8': (79 commits)
  MNT: Add @feilong to .zenodo, update ordering
  MNT: Update .mailmap
  MNT: Update .zenodo ordering
  Accept invitation as Zenodo release co-author (see nipy#2864)
  MAINT: Update .mailmap
  BF: allowing bids_event_file as alternate input
  MNT: Update .zenodo ordering
  MNT: Version 1.1.8
  DOC: 1.1.8 changelog
  Update nipype/interfaces/dipy/tracks.py
  Update nipype/interfaces/dipy/reconstruction.py
  MNT: Install numpy!=1.16.0 from conda in Docker
  Add FSL auto test
  remake specs
  Update nipype/interfaces/io.py
  Remove return type named tuple
  Update nipype/info.py
  STY: Whitespace, line length
  Remove out_ prefix from EddyQuad outputs
  Apply minor edits from code review
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants