whiskyechobravo / kerkoapp

A web application that provides a faceted search interface for bibliographies managed with Zotero.
https://whiskyechobravo.github.io/kerko/
BSD 3-Clause "New" or "Revised" License
68 stars 24 forks source link

Running KerkoApp on Windows #5

Closed Trivy closed 5 years ago

Trivy commented 5 years ago

Thank you for this contribution, it is very appreciated!

FYI, I am running KerkoApp locally on a Windows platform. I had a couple of issues, not directly related to KerkoApp. I write them down here, in case this experience can be useful to someone else:

  1. Regarding requirements: eventually, I had to create the virtual environment from Conda and make minor changes to run.txt before running pip install -r requirements/run.txt.
  2. I had to pass the command set FLASK_APP=kerkoapp.py to cmd.exe before running flask kerko index.

With these slight changes, my bibliography is now available at http://127.0.0.1:5000/ in my browser! Thanks!

davidlesieur commented 5 years ago

Great to hear that you had it working on Windows! Could you detail the changes you had to make to run.txt? Perhaps I could integrate these changes to the master version.

Trivy commented 5 years ago

Sure, however the changes seem very specific to my own configuration. Here are the two lines I have changed:

certifi>=2019.3.9         # via requests

and

wrapt>=1.11.1             # via kerko

(in both case, changing from == to >=)

davidlesieur commented 5 years ago

Ah, yes, I have pinned precise versions in run.txt by using pip-tools. That's a way to ensure reproducible results, but that is a bit too strict when distributing software. I'll think about it. Suggestions are welcome.

davidlesieur commented 5 years ago

Perhaps the README should suggest installing from run.in instead of run.txt. I could set minimal requirements (with >=) in run.in. Then run.txt would serve only to those who wish to reproduce the last verified combination of packages.

Trivy commented 5 years ago

Quite frankly, I don't think any change in the README is required: the problem I faced had more to do with pip and my specific computer configuration than with KerkoApp.

However, perhaps a FAQ section with the following piece of advice could be useful:

When running flask kerko index in the shell, if you get an error:

No such command "kerko"

you can try using: export FLASK_APP=kerkoapp.py (or set FLASK_APP=kerkoapp.py on Windows).

davidlesieur commented 5 years ago

Good idea, I should add that to the docs. I wonder why FLASK_APP was not picked up from the .env file in your case though. I expect the .env file to be read from the current directory when running flask (per python-dotenv).