msimet / Stile

Stile: the Systematics Tests In Lensing pipeline
BSD 3-Clause "New" or "Revised" License
9 stars 6 forks source link

#57 installer #59

Closed msimet closed 8 years ago

msimet commented 9 years ago

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.

msimet commented 9 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.

msimet commented 8 years ago

And how about this PR? It's pretty short, shouldn't take too long.

rmandelb commented 8 years ago

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.

msimet commented 8 years ago

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.

msimet commented 8 years ago

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.

rmandelb commented 8 years ago

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.�

msimet commented 8 years ago

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.

rmandelb commented 8 years ago

Great! Um sorry, I didn't notice that I didn't reply to this until now. I'm happy with it - want to merge?