hyperspy / hyperspy

Multidimensional data analysis
https://hyperspy.org
GNU General Public License v3.0
518 stars 210 forks source link

Hyperspy 1.6.1 next_minor and next_patch branch Pytest failed with error: unrecognized arguments: -n --dist loadfile #2552

Closed kevinsmia1939 closed 4 years ago

kevinsmia1939 commented 4 years ago

Hello,

I was just testing upcoming 1.6.1 because I want to package it to openSUSE Tumbleweed. I am aware that 1.6.1 is not release but I just want to check that it came out smoothly. I build hyperspy 1.6.1 from the latest snapshot next_minor and next_patch branch. I found Pytest error as shown below.

This error both occurred on next_minor and next_patch branch.

[   83s] + pytest-3.8 --ignore=_build.python2 --ignore=_build.python3 --ignore=_build.pypy3 -v
[   84s] ERROR: usage: pytest-3.8 [options] [file_or_dir] [file_or_dir] [...]
[   84s] pytest-3.8: error: unrecognized arguments: -n --dist loadfile

Have this error been made aware of? If so I don't have anything to add.

Full build log: https://build.opensuse.org/package/live_build_log/home:andythe_great/python-hyperspy/openSUSE_Tumbleweed/x86_64

All Python dependencies installed

[   15s] [253/428] cumulate python3-PTable-0.9.2-3.4
[   15s] [254/428] cumulate python3-appdirs-1.4.4-2.1
[   15s] [255/428] cumulate python3-asn1crypto-1.4.0-1.1
[   15s] [256/428] cumulate python3-attrs-19.3.0-2.2
[   15s] [257/428] cumulate python3-backcall-0.2.0-1.2
[   15s] [258/428] cumulate python3-decorator-4.4.2-1.3
[   15s] [259/428] cumulate python3-entrypoints-0.3-2.3
[   15s] [260/428] cumulate python3-idna-2.10-1.3
[   15s] [261/428] cumulate python3-iniconfig-1.0.1-1.1
[   15s] [262/428] cumulate python3-more-itertools-8.4.0-1.2
[   15s] [263/428] cumulate python3-olefile-0.46-2.4
[   15s] [264/428] cumulate python3-ordered-set-3.1.1-4.2
[   15s] [265/428] cumulate python3-parso-0.7.0-1.4
[   15s] [266/428] cumulate python3-pickleshare-0.7.5-3.3
[   15s] [267/428] cumulate python3-pluggy-0.13.1-1.4
[   15s] [268/428] cumulate python3-ptyprocess-0.6.0-3.3
[   15s] [269/428] cumulate python3-py-1.9.0-1.3
[   15s] [270/428] cumulate python3-pyasn1-0.4.8-1.5
[   15s] [271/428] cumulate python3-pybind11-2.5.0-2.2
[   15s] [272/428] cumulate python3-pycparser-2.20-1.5
[   15s] [273/428] cumulate python3-pyparsing-2.4.7-2.2
[   15s] [274/428] cumulate python3-simplegeneric-0.8.1-9.8
[   15s] [275/428] cumulate python3-threadpoolctl-2.1.0-1.2
[   15s] [276/428] cumulate python3-toml-0.10.1-2.1
[   15s] [277/428] cumulate python3-toolz-0.10.0-1.4
[   15s] [278/428] cumulate python3-wcwidth-0.2.5-1.2
[   15s] [287/428] cumulate python3-pytz-2020.1-1.2
[   15s] [288/428] cumulate python3-simplejson-3.17.2-1.2
[   15s] [289/428] cumulate python3-six-1.15.0-1.2
[   15s] [293/428] cumulate python3-PyYAML-5.3.1-1.6
[   15s] [294/428] cumulate python3-chardet-3.0.4-8.6
[   15s] [295/428] cumulate python3-dill-0.3.1.1-1.6
[   15s] [296/428] cumulate python3-future-0.18.2-1.6
[   15s] [297/428] cumulate python3-gmpy-1.17-2.13
[   15s] [298/428] cumulate python3-kiwisolver-1.2.0-1.3
[   15s] [299/428] cumulate python3-llvmlite-0.32.0-1.3
[   15s] [300/428] cumulate python3-numpy-1.19.1-1.1
[   15s] [301/428] cumulate python3-tqdm-4.48.2-1.1
[   15s] [310/428] cumulate python3-Cycler-0.10.0-4.4
[   15s] [311/428] cumulate python3-ipython_genutils-0.2.0-1.10
[   15s] [312/428] cumulate python3-jedi-0.17.2-2.1
[   15s] [313/428] cumulate python3-networkx-2.5-1.1
[   15s] [314/428] cumulate python3-pexpect-4.8.0-2.3
[   15s] [315/428] cumulate python3-prompt_toolkit-3.0.5-1.3
[   15s] [316/428] cumulate python3-python-dateutil-2.8.1-1.4
[   15s] [317/428] cumulate python3-uncertainties-3.1.4-2.2
[   15s] [321/428] cumulate python3-PyWavelets-1.1.1-1.6
[   15s] [322/428] cumulate python3-blosc-1.9.1-3.2
[   15s] [323/428] cumulate python3-cytoolz-0.10.1-2.5
[   15s] [324/428] cumulate python3-mpmath-1.1.0-1.8
[   15s] [325/428] cumulate python3-packaging-20.4-1.2
[   15s] [326/428] cumulate python3-patsy-0.5.1-2.1
[   15s] [327/428] cumulate python3-pyrsistent-0.16.0-1.2
[   15s] [328/428] cumulate python3-traits-6.1.0-1.2
[   15s] [330/428] cumulate python3-cffi-1.14.2-1.1
[   15s] [331/428] cumulate python3-psutil-5.7.0-2.1
[   15s] [332/428] cumulate python3-pyzmq-19.0.2-3.1
[   15s] [333/428] cumulate python3-talloc-2.3.1-1.4
[   15s] [334/428] cumulate python3-ldb-2.1.4-1.3
[   15s] [335/428] cumulate python3-numexpr-2.7.1-1.6
[   15s] [336/428] cumulate python3-tornado6-6.0.4-2.5
[   15s] [337/428] cumulate python38-devel-3.8.5-2.1
[   15s] [338/428] cumulate python3-h5py-2.10.0-2.4
[   15s] [341/428] cumulate python3-scipy-1.5.2-1.2
[   15s] [343/428] cumulate python3-Pillow-7.2.0-3.1
[   15s] [344/428] cumulate python3-imagecodecs-2020.5.30-1.1
[   15s] [345/428] cumulate python3-tornado-6.0-13.3
[   15s] [346/428] cumulate python3-mrcz-0.5.6-19.4
[   15s] [347/428] cumulate python3-Pint-0.14-1.3
[   15s] [348/428] cumulate python3-lz4-3.0.2-2.3
[   15s] [349/428] cumulate python3-traitlets-4.3.3-2.3
[   15s] [350/428] cumulate python3-Cython-0.29.21-1.3
[   15s] [352/428] cumulate python3-jsonschema-3.2.0-2.5
[   15s] [354/428] cumulate python3-setuptools-44.1.1-1.1
[   15s] [357/428] cumulate python3-matplotlib-3.3.0-1.2
[   15s] [358/428] cumulate python3-numba-0.49.1-1.4
[   15s] [364/428] cumulate python3-click-7.1.2-2.1
[   15s] [365/428] cumulate python3-joblib-0.16.0-3.1
[   15s] [366/428] cumulate python3-natsort-7.0.1-3.2
[   15s] [367/428] cumulate python3-Pygments-2.6.1-1.5
[   15s] [368/428] cumulate python3-jupyter-core-4.6.3-3.3
[   15s] [369/428] cumulate python3-sparse-0.8.0-1.5
[   15s] [370/428] cumulate python3-dask-2.25.0-1.1
[   15s] [371/428] cumulate python3-sympy-1.6.2-1.1
[   15s] [372/428] cumulate python3-pandas-1.1.1-1.1
[   15s] [373/428] cumulate python3-cryptography-3.0-1.3
[   15s] [374/428] cumulate python3-pytest-6.0.1-1.1
[   15s] [378/428] cumulate jupyter-jupyter-core-4.6.3-3.3
[   15s] [379/428] cumulate python3-certifi-2020.6.20-1.1
[   15s] [380/428] cumulate python3-dask-array-2.25.0-1.1
[   15s] [381/428] cumulate python3-pyOpenSSL-19.1.0-1.4
[   15s] [382/428] cumulate python3-pytest-mpl-0.11-2.2
[   15s] [383/428] cumulate python3-tifffile-2020.5.30-30.6
[   15s] [384/428] cumulate python3-statsmodels-0.11.1-1.5
[   15s] [385/428] cumulate python3-jupyter-client-6.1.7-1.1
[   15s] [386/428] cumulate python3-scikit-learn-0.23.2-1.3
[   15s] [387/428] cumulate python3-ipython-7.18.1-1.1
[   15s] [390/428] cumulate python3-urllib3-1.25.10-1.2
[   15s] [391/428] cumulate python3-ipykernel-5.3.4-1.2
[   15s] [395/428] cumulate python3-ipywidgets-7.5.1-2.2
[   15s] [396/428] cumulate python3-requests-2.24.0-1.2
[   15s] [397/428] cumulate python3-ipyparallel-6.3.0-1.3
[   15s] [399/428] cumulate python3-sidpy-0.0.1-6.3
[   15s] [402/428] cumulate python3-pyUSID-0.0.9-4.3
[   16s] [426/428] cumulate python3-imageio-ffmpeg-0.4.1-1.2
[   16s] [427/428] cumulate python3-imageio-2.8.0-2.3
[   16s] [428/428] cumulate python3-scikit-image-0.17.2-1.1
thomasaarholt commented 4 years ago

I'm pretty sure this is because you are missing pytest-xdist, which @tjof2 introduced in #2520 for parallel execution of tests. I'm on mobile so I'm a bit slow in checking whether we've added the above to the dev package dependencies.

tjof2 commented 4 years ago

From the docs https://hyperspy.readthedocs.io/en/latest/dev_guide/testing.html#running-tests

First ensure pytest and its plugins are installed by:

# If using a standard hyperspy install $ pip install hyperspy[tests]

The dependencies are listed here: https://github.com/hyperspy/hyperspy/blob/912fc5776c0f8c604cb339332760b3cbd0058386/setup.py#L81


An ugly hack is to override the config in setup.cfg, e.g. pytest -c /dev/null hyperspy/ - so it looks elsewhere for the config. Would not recommend though.

kevinsmia1939 commented 4 years ago

Hello,

Thanks, the test is working now. I also noticed that test need matplotlib>=3.1 but install need matplotlib>=2.2.3. Is this a conflict?

Thank you.