babbush / HistoricalFermiLib

This is repo where we developed FermiLib, which then became OpenFermion
Apache License 2.0
1 stars 0 forks source link

Exception handling for wrong scipy version #22

Closed babbush closed 7 years ago

babbush commented 7 years ago

Let's try to raise an clear exception if somebody runs into the problem you had before that is caused by an outdated scipy version. We will make sure that the current scipy version is a requirement of the package so that users that pip install will get it automatically, but some people might instead download the git repo so it will still be good to have a clear error message.

damiansteiger commented 7 years ago

Also if you download the repo from github, you should/will install it via pip locally and hence you get an error from there. I don't think it requires any tests.

damiansteiger commented 7 years ago

You can install ProjectQ from github by downloading the folder and within the folder do pip install . which doesn't require internet connection and access to pypi.org. Same thing we will do for FermiLib so you can choose to install it via pypi or locally via a github clone.

If you are a developer, you can install it locally in development mode using pip: pip install -e . This would install ProjectQ by adding a python path to that folder, so everytime you update the folder via git pull, your installed projectq version would be updated.

babbush commented 7 years ago

This is great. But since Wei is the third person who has informed me of the scipy version issue, I think it's wise to add a several line exception that makes it clear what's going on just in case people somehow get past the installation without having the right version. Keep in mind that since the code is Apache 2, some people are just going to grab snippets of code and not even use this as a single library.

On Sat, Mar 18, 2017 at 1:30 PM, Damian Steiger notifications@github.com wrote:

You can install ProjectQ from github by downloading the folder and within the folder do pip install . which doesn't require internet connection and access to pypi.org. Same thing we will do for FermiLib so you can choose to install it via pypi or locally via a github clone.

If you are a developer, you can install it locally in development mode using pip: pip install -e . This would install ProjectQ by adding a python path to that folder, so everytime you update the folder via git pull, your installed projectq version would be updated.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/babbush/fermilib/issues/22#issuecomment-287565277, or mute the thread https://github.com/notifications/unsubscribe-auth/ANlTf_Gvg_JlN3PVnsc0Q3xk2-phptQtks5rnCKsgaJpZM4Mhfub .

damiansteiger commented 7 years ago

We should not support or add tests for special usage of the library if it is not used as we intended (install via pip). If they want to install it manually, then they are responsible to install all dependencies from requirements.txt. If they forget one of the requirements, bad luck.

Also in the case of just copying code snippets, they would probably not copy the test anyway.

babbush commented 7 years ago

Fine, since you feel so strongly, you can close this issue.

On Mar 18, 2017 13:58, "Damian Steiger" notifications@github.com wrote:

We should not support or add tests for special usage of the library if it is not used as we intended (install via pip). If they want to install it manually, then they are responsible to install all dependencies from requirements.txt. If they forget one of the requirements, bad luck.

Also in the case of just copying code snippets, they would probably not copy the test anyway.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/babbush/fermilib/issues/22#issuecomment-287567028, or mute the thread https://github.com/notifications/unsubscribe-auth/ANlTf6i4kQgN8Sq33AIohhAawss1aPu8ks5rnClDgaJpZM4Mhfub .

thomashaener commented 7 years ago

How about a FAQ entry? That would definitely help :)

damiansteiger commented 7 years ago

Yes sure