-
Notifications
You must be signed in to change notification settings - Fork 51
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
tests/data don't install #84
Comments
I just reread the The next question is whether we want to copy data over on Here is the line of code that is relevant I believe: https://github.com/mhe/pynrrd/blob/master/setup.py#L27 This would need to be |
I noticed the line of code. Before submitting the issue, I tried your proposed change, didn't work either. I am also partial to the latter option. It does make sense to not copy
Just to bring to your attention, apparently DIPY also has this problem. There is a comment in setup.py in this regard. By the way, we might have to mention this in the README.md. Also, I am a little skeptical about |
Okay, it looks like I found the solution. As I noted before, we need both:
Feel free to test my solution at your convenient time. I can do a PR. |
Okay, that makes sense. I am confused though, we just need to remove line 27 in order to exclude the tests in the package data right? Wouldn't that just remove the tests altogether and then if the user wants to test it, we just require they clone the repo? |
Not sure if you had the chance to look at my latest comment. We are not removing anything, rather modifying as follows:
Upon using the above modification, we no longer need to clone the repo. Rather,
The user might have to to |
Yeah, I read your latest comment and it all makes sense. My confusion was whether we think the best approach is to include the data in the tests or to remove the tests altogether. You said this originally so I was a bit confused about it:
Personally, I don't know if we should include the tests at all. However, I don't know what common practice is for the bigger Python libraries like Numpy, Scipy, scikit-image, etc. My concern with including the tests is that the tests will not be used by a vast majority of the people downloading the library and so that is just a waste of space. On the other hand, the tests and data add up to a whopping 200kB. What are your thoughts? I could go either way with this so if you submit a PR, I'll accept it with either approach. P.S. Yes, I think users would have to upgrade their |
On a different note, is this line required when running tests from cloned repo? |
It is for me. Otherwise I'm unable to import |
Agreed, just checking to make sure. It should be also required when working on cloned repository other than the installed one. |
Let's remove this line: https://github.com/mhe/pynrrd/blob/master/setup.py#L26 and write in Run the following command in the base directory to run the tests:
If this is the fix we agreed upon, I shall submit a patch. |
I agree with removing the tests from the package. As for updating the README, there are two potential ways of doing it:
I'm partial to the first option but I'd accept either method. The reason why I'm not a fan of putting the python test command in the same code block as cloning the repository is primarily so the user understands what is going on. Plus, not everyone will immediately want to run the tests after they clone the repository. |
Remove tests from packaged distributions. Most users won't need to run the tests when they install `pynrrd`, so it is unnecessary files to pass along. In addition, the data was missing in order for the tests to run successfully. Fixes #84
Has there been an issue that
tests/data
don't get installed innrrd/tests/
? I am experiencing this with:pip install pynrrd
pip install .
python setup.py install
However, the python files inside
tests/
get installed. I tried putting on__init__.py
file intests/data
, yet no luck.The text was updated successfully, but these errors were encountered: