Closed msimet closed 8 years ago
I should say--it requests an email as part of the setup package, so I just put mine--if anyone has a better suggestion let me know.
And how about this PR? It's pretty short, shouldn't take too long.
Should we have it try to import the dependencies like treecorr, and throw an exception to tell people they need to install them? Otherwise, this could run without complaint but then when people try to import Stile they might get errors due to lack of dependencies.
We can do a requires keyword to this script (and even put in version numbers I think). Then we have a decision to make--do we want to force people to install TreeCorr in order to use eg the whisker plot features?
We could also do a try-except import block to warn users (rather than failing out), which I think would be a little nonstandard for a setup.py installer, but would work.
The other thing is that since this is a pure Python module, they could theoretically install TreeCorr after Stile and everything should work just fine. That doesn't help them know they need to, though.
How about just checking for Treecorr and using warnings.warn() to emit a message if it�s not there? The warning could say something like �You don�t have Treecorr installed. You can use Stile without it, but will be limited in functionality to tests that do not involve two-point correlation functions.�
Tried adding this (as well as doing the check in sys_tests.py
so we're telling the truth that you can run Stile without it): 7d03213. I also added the numpy dependency, without a version number since I'm not sure what it would be.
Great! Um sorry, I didn't notice that I didn't reply to this until now. I'm happy with it - want to merge?
Here's a quick installer (which uses the standard
python setup.py install
format). Look okay to everyone?Sorry for the git weirdness, I accidentally committed this to master, reverted that commit, then made this new branch to revert the revert! For one commit that seemed easier and cleaner than rebasing.