-
-
Notifications
You must be signed in to change notification settings - Fork 373
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
Trouble running tests with provided conda env #724
Comments
I think examples/environment.yml is probably out of date - the dependencies are quite different from the current ones (see https://github.com/pyviz/datashader/blob/master/setup.py#L32, which is the basis for the conda package). In the short term, maybe you could The plan for datashader was to specify the dependencies in one place, and generate both the conda package recipe and examples/environment.yml from that (by filtering/pinning/combining groups as necessary for each one, since they have different purposes). I think we've managed to start doing that in some other pyviz projects (e.g. pyviz itself), but we're not there yet. |
Sounds about right. I think @jsignell can fix environment.yml to be generated from the actual dependencies, so that it matches what we use for testing. But I don't think any removing is needed; I just do |
Thanks for the advice! I'm still having trouble though. Here's what I've run so far:
At this point, pytest isn't in the environment, so I've manually added the test requirements from the
Running pytest at this point throws a tornado error: Call & traceback
Output of `conda list`
|
Progress! I got rid of the tornado error by downgrading tornado. Now pytest runs, but for some reason it's not finding all the tests. Here's the full set of commands to get to my current environment:
However, not all the tests are running. I think a similar issue is happening with the travis builds. In the build for my PR (#725) I noticed travis was passing while appveyor wasn't. Neither should pass, since there are two test which are failing, since I think those tests have a bug. Travis just isn't running those tests (travis logs don't show tests from Looking into this a little further, Running conda env collected tests
pytest 4.3.0 collected tests
|
I did:
I was getting 12 skips from having a broken version of skimage: >>> import skimage
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/jsignell/conda/envs/ds-14/lib/python3.7/site-packages/skimage/__init__.py", line 167, in <module>
from .util.dtype import (img_as_float32,
File "/Users/jsignell/conda/envs/ds-14/lib/python3.7/site-packages/skimage/util/__init__.py", line 8, in <module>
from .arraycrop import crop
File "/Users/jsignell/conda/envs/ds-14/lib/python3.7/site-packages/skimage/util/arraycrop.py", line 8, in <module>
from numpy.lib.arraypad import _validate_lengths
ImportError: cannot import name '_validate_lengths' from 'numpy.lib.arraypad' (/Users/jsignell/conda/envs/ds-14/lib/python3.7/site-packages/numpy/lib/arraypad.py) I upgraded scikit-image to 0.14.2 from conda-forge (
|
Just an aside: I see above in a few places using ( |
Right; I always conda-install the released package first, then run |
The |
Does pyctdev do better than the conda + pip -e solution? |
It is not intrinsically any better, but in practice it is better because it uses the |
Sorry. I didn't mean conda+environment.yml + pip -e, I meant just It's true that my method won't always install the latest dependencies, if those have been updated in git master but not yet released, but I haven't noticed that to be a problem in practice. We rarely add new dependencies, and when we do they are typically for specific examples, not the core library itself. We can of course tell people to use pyctdev like the CI does to avoid that problem, but my question is whether using pyctdev provides benefits that are worth the extra cognitive load of learning about it. I'm not sure it does, but am open to learning about some benefit it provides for a developer that is worthwhile. |
I understand now! I think your approach is absolutely fine now. My default approach is even simpler, just a OK, so plan A is to remove the |
I'm having trouble running the tests locally using the provided conda environment. The environment was created following the instructions in the readme:
conda env create --name datashader --file ./examples/environment.yml conda activate datashader pip install -e . pytest
pytest
immediately fails with the following traceback:I was able to get tests partially running under a different environment which doesn't have
pytest-benchmark
installed.This is using the latest master (3171d88) with macOS v10.14.3.
Output of `conda list`
Thanks for any help!
The text was updated successfully, but these errors were encountered: