Dropping nose as a dependency #1480
Conversation
nose also has to be removed from |
@kain88-de We've got |
you can remove |
Since you're at it, you can update |
This would officially fix #884! |
NOSE_COVERAGE='--with-coverage --cover-package MDAnalysis' | ||
PYTEST_COVERAGE='--cov=MDAnalysis' | ||
MAIN_CMD='export COVERAGE_FILE=$PYTEST_COVERAGE_FILE; pytest ${PYTEST_LIST} ${PYTEST_FLAGS} ${PYTEST_COVERAGE}; export COVERAGE_FILE=$NOSE_COVERAGE_FILE; python ./testsuite/MDAnalysisTests/mda_nosetests ${NOSE_TEST_LIST} ${NOSE_FLAGS} ${NOSE_COVERAGE}' | ||
MAIN_CMD='pytest testsuite/MDAnalysisTests/ ${PYTEST_FLAGS} --cov=MDAnalysis' |
kain88-de
Jul 14, 2017
Member
can't you just update the PYTEST_FLAGS
variable here instead of rewriting MAIN_CMD
?
can't you just update the PYTEST_FLAGS
variable here instead of rewriting MAIN_CMD
?
the setup.py changes are still missing |
@@ -150,28 +147,4 @@ | |||
in_dir, | |||
assert_nowarns, | |||
) | |||
from MDAnalysisTests.core.util import make_Universe | |||
|
|||
def run(*args, **kwargs): |
kain88-de
Jul 14, 2017
Member
it would be nice if you could keep this method. This is shown in our docs how to run the tests yourself from an installation of MDAnalysisTests
it would be nice if you could keep this method. This is shown in our docs how to run the tests yourself from an installation of MDAnalysisTests
utkbansal
Jul 14, 2017
Author
Member
So this will then be deleted when we do the next release?
So this will then be deleted when we do the next release?
utkbansal
Jul 14, 2017
•
Author
Member
@kain88-de This function has calls to loaded_plugins
which comes from from MDAnalysisTests.plugins
which in turn depend upon nose
. What should I do?
@kain88-de This function has calls to loaded_plugins
which comes from from MDAnalysisTests.plugins
which in turn depend upon nose
. What should I do?
kain88-de
Jul 14, 2017
Member
modify this function so that I can still to MDAnalysisTests.run()
in an interpreter. This should start the pytest tests. I don't really care how the function is doing that. But it has to be rewritten.
modify this function so that I can still to MDAnalysisTests.run()
in an interpreter. This should start the pytest tests. I don't really care how the function is doing that. But it has to be rewritten.
utkbansal
Jul 14, 2017
Author
Member
So basically, I'm writing a wrapper to run pytest via this run
method?
So basically, I'm writing a wrapper to run pytest via this run
method?
kain88-de
Jul 14, 2017
Member
yes
yes
@kain88-de @richardjgowers @jbarnoud Is the |
sure remove that as well. No one of us uses it anymore. |
Have a look at how to run pytest from within python. |
testsuite/INSTALL and package/MDAnalysis/tests/init.py also contain comments about nose. Please update and replace them with appropriate pytest information if applicable. |
@@ -114,6 +114,9 @@ | |||
""" | |||
from __future__ import absolute_import | |||
import logging | |||
|
|||
import pytest | |||
|
kain88-de
Jul 14, 2017
Member
there are still a lot of nose comments in this file
there are still a lot of nose comments in this file
kain88-de
Jul 14, 2017
Member
Yes please. There is no sense in having them. Only a few might be useful.
Yes please. There is no sense in having them. Only a few might be useful.
|
||
def run(*args, **kwargs): | ||
pytest.main() |
kain88-de
Jul 14, 2017
Member
did you test this?
did you test this?
utkbansal
Jul 14, 2017
Author
Member
It's still running. Everything fine till now.
It's still running. Everything fine till now.
utkbansal
Jul 14, 2017
Author
Member
Do I have to update all comments related to nose in all files?
Do I have to update all comments related to nose in all files?
We also need new instructions for the wiki #1489. |
@@ -92,16 +92,14 @@ | |||
Writing test cases | |||
================== | |||
The unittests use the :mod:`unittest` module together with nose_. See the | |||
The unittests use the :mod:`pytest` module. See the |
kain88-de
Jul 15, 2017
Member
This should be pytest_
so that it links in the docs.
This should be pytest_
so that it links in the docs.
kain88-de
Jul 15, 2017
Member
with out the mod
sphinx likely wouldn't link to the right page
with out the mod
sphinx likely wouldn't link to the right page
|
@utkbansal I'd appreciate if you prioritize this PR |
@kain88-de The test in |
@kain88-de Will this PR be squashed and merged or can I clean up the history? |
Remove nose from dependencies & implement run method
minor clean up still do to. But good progress. |
@@ -84,9 +84,9 @@ From sources | |||
|
|||
From the top directory of the checked out sources: | |||
|
|||
./testsuite/MDAnalysisTests/mda_nosetests --exe -v --processes=4 --process-timeout=120 | |||
pytest /testsuite/MDAnalysisTests/ -n=3 |
kain88-de
Jul 17, 2017
Member
please add a note that the pytest-xdist
package should be installed to run tests in parallel.
please add a note that the pytest-xdist
package should be installed to run tests in parallel.
kain88-de
Jul 17, 2017
Member
and use the new pytest.xdist variable numprocesses
and use the new pytest.xdist variable numprocesses
@@ -90,22 +67,13 @@ | |||
Writing test cases | |||
================== | |||
The unittests use the :mod:`unittest` module together with nose_. See the | |||
The unittests use the :mod:`pytest` module. See the |
kain88-de
Jul 17, 2017
Member
here we should also have a link
here we should also have a link
@@ -36,9 +36,7 @@ | |||
assert_array_almost_equal, | |||
assert_raises, |
kain88-de
Jul 17, 2017
Member
can you remove this import as well. Seems like you already changed all occurrences of this
can you remove this import as well. Seems like you already changed all occurrences of this
@@ -213,7 +213,7 @@ def dynamic_author_list(): | |||
long_description=LONG_DESCRIPTION, | |||
install_requires=[ | |||
'MDAnalysis=={0!s}'.format(RELEASE), # same as this release! | |||
'nose>=1.3.7', | |||
'numpy>=1.10.4', |
kain88-de
Jul 17, 2017
Member
Please remove this line when you do the rebase. It's not there in develop right now.
Please remove this line when you do the rebase. It's not there in develop right now.
kain88-de
Jul 17, 2017
Member
yes it's already installed with MDAnalysis anyway.
yes it's already installed with MDAnalysis anyway.
Fix Install docs Update CHANGELOG Cleanup docs
Fixes #884
Changes made in this Pull Request:
PR Checklist