You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pytest is now listed as install_requires in setup.py, and also included as 'run requirement' in the conda recipe. I think it's better to use tests_require (see http://setuptools.readthedocs.io/en/latest/setuptools.html) for setup.py, and not include it in the recipe. In general I don't think test packages should be dependencies, people that want to test will either have this in their environment already, or will read the documentation.
Due to the way the test runner currently works, tests_require is not a workable solution. However, as @astrofrog mentioned, pytest has been removed from install_requires in #6606. With this PR, astropy now uses a testing metapackage called pytest-astropy, and this package is listed in extras_require.
With respect to the conda recipe, it will likely be necessary to keep pytest as a "run requirement" due to the design of the astropy test runner. I hope to address this in future work so that this will no longer be necessary.
I think unless you have reasons to do otherwise, testing on conda-forge doesn't need to be this thorough. It's generally assume that when released, testing has already passed, but you can do light sanity check, such as importing is enough.
If you insist testing, you could also do a os.system('conda install -y pytest') in the run_test.py to avoid having a run requirement.
That should be fixable in the conda recipe, which has a separate section for test requirements (that actually works as opposed to tests_require in setup.py).
Reacted by Dan D'Avella, Brigitta Sipőcz and Maarten Breddels
@drdavella - I don't see this as a reason for us to make a new conda-forge build, especially as we advertise the default channel as the main source of astropy on conda. So, yes, that would be great to have for the 3.0 release.
Any news on this/anything I can do to help? Installing in conda gives the below, and I find it really odd that as a user I should be expected to install a testing library:
The following NEW packages will be INSTALLED:
astropy pkgs/main/osx-64::astropy-3.1.2-py37h1de35cc_0
atomicwrites pkgs/main/osx-64::atomicwrites-1.3.0-py37_1
more-itertools pkgs/main/osx-64::more-itertools-7.0.0-py37_0
pluggy pkgs/main/osx-64::pluggy-0.9.0-py37_0
psutil pkgs/main/osx-64::psutil-5.6.2-py37h1de35cc_0
py pkgs/main/osx-64::py-1.8.0-py37_0
pytest pkgs/main/osx-64::pytest-4.4.1-py37_0
pytest-arraydiff pkgs/main/osx-64::pytest-arraydiff-0.3-py37h39e3cac_0
pytest-astropy pkgs/main/osx-64::pytest-astropy-0.5.0-py37_0
pytest-doctestplus pkgs/main/osx-64::pytest-doctestplus-0.3.0-py37_0
pytest-openfiles pkgs/main/osx-64::pytest-openfiles-0.3.2-py37_0
pytest-remotedata pkgs/main/osx-64::pytest-remotedata-0.3.1-py37_0
I'm not sure this ever got merged into https://github.com/AnacondaRecipes/astropy-feedstock, but did get merged into the conda-forge stock. If I do conda install astropy in a clean environment I get the below, which still includes pytest-astropy:
Hi humans 👋 - this issue was labeled as Close? approximately 7 days ago. If you think this issue should not be closed, a maintainer should remove the Close? label - otherwise, I will close this issue in a month.
If you believe I commented on this issue incorrectly, please report this here
I'm going to close this issue as per my previous message, but if you feel that this issue should stay open, then feel free to re-open and remove the Close? label.
If this is the first time I am commenting on this issue, or if you believe I closed this issue incorrectly, please report this here
Activity
astrofrog commentedon Oct 25, 2017
We'll be removing this dependency shortly - cc @drdavella
bsipocz commentedon Oct 25, 2017
Well, we also need it for the Testrunner class, and I vaguely remember that we had issues with the recipe/building the conda package when it didn't include it in the run requirements: https://travis-ci.org/conda-forge/astropy-feedstock/jobs/251188788
drdavella commentedon Oct 25, 2017
Due to the way the test runner currently works,
tests_requireis not a workable solution. However, as @astrofrog mentioned,pytesthas been removed frominstall_requiresin #6606. With this PR, astropy now uses a testing metapackage calledpytest-astropy, and this package is listed inextras_require.With respect to the conda recipe, it will likely be necessary to keep
pytestas a "run requirement" due to the design of the astropy test runner. I hope to address this in future work so that this will no longer be necessary.maartenbreddels commentedon Oct 25, 2017
Ok great, that PR answers the setup.py question.
I think unless you have reasons to do otherwise, testing on conda-forge doesn't need to be this thorough. It's generally assume that when released, testing has already passed, but you can do light sanity check, such as importing is enough.
If you insist testing, you could also do a
os.system('conda install -y pytest')in the run_test.py to avoid having a run requirement.mwcraig commentedon Oct 25, 2017
That should be fixable in the conda recipe, which has a separate section for test requirements (that actually works as opposed to
tests_requirein setup.py).bsipocz commentedon Oct 25, 2017
@maartenbreddels @mwcraig - I'm happy to hear about these option, we should then definitely switch to use either of those.
drdavella commentedon Oct 25, 2017
@mwcraig, @bsipocz if you're willing to wait until #6606 is merged, then we can simply add
pytest-astropyto the conda recipe test requirements.bsipocz commentedon Oct 25, 2017
@drdavella - I don't see this as a reason for us to make a new conda-forge build, especially as we advertise the default channel as the main source of astropy on conda. So, yes, that would be great to have for the 3.0 release.
dstansby commentedon May 6, 2019
Any news on this/anything I can do to help? Installing in conda gives the below, and I find it really odd that as a user I should be expected to install a testing library:
dstansby commentedon Dec 3, 2019
Bump on this - happy to help, but I'm not sure what needs doing to remove the pytest dependency.
pllim commentedon May 11, 2020
I don't think this is a problem anymore?
dstansby commentedon May 11, 2020
I'm not sure this ever got merged into https://github.com/AnacondaRecipes/astropy-feedstock, but did get merged into the conda-forge stock. If I do
conda install astropyin a clean environment I get the below, which still includespytest-astropy:pllim commentedon May 11, 2020
Oh, okay. Thanks for the clarification!
pllim commentedon May 12, 2020
@dstansby , looks like Anaconda fixed the recipe. Maybe give it a few days to make it into the
defaultschannel and try again?astropy-bot commentedon May 20, 2020
Hi humans 👋 - this issue was labeled as Close? approximately 7 days ago. If you think this issue should not be closed, a maintainer should remove the Close? label - otherwise, I will close this issue in a month.
If you believe I commented on this issue incorrectly, please report this here
astropy-bot commentedon Jun 22, 2020
I'm going to close this issue as per my previous message, but if you feel that this issue should stay open, then feel free to re-open and remove the Close? label.
If this is the first time I am commenting on this issue, or if you believe I closed this issue incorrectly, please report this here