ebmdatalab / notebook-template

Repository for development of using docker containers to manage virtual environments
1 stars 2 forks source link

Explaining running `pip-compile` etc is hard #13

Open sebbacon opened 4 years ago

sebbacon commented 4 years ago

Telling people to open a bash console etc is not a pleasant route for getting started. Not least because Windows users won't know how to use bash.

Either document this better, or perhaps provide a pip-compile magic?

CarolineMorton commented 4 years ago

We could add least at screenshots into the README.md -- what do you think?

sebbacon commented 4 years ago

Yes it could help. And/or hive off our documentation into a series of separate pages.

We should also pick one recommended way of doing it. I'm leaning towards saying the bang-prefixed-in-cell approach is best (i.e. !pip-compile requirements.txt in a notebook).

There's also the complication of explaining where to do it from. People should be making notebooks in the notebooks/ folder which means they'd have to run !pip-compile ../requirements.txt but sometimes they won't be, and for them to understand what's going on we have to explain what ../ means.

That was why I was thinking about a magic (e.g. %pip-compile) which would find the nearest requirements.txt for you. But then installing magics easily appears to be a bit of a pain, so that might take a while to get round to...

CarolineMorton commented 4 years ago

Yes agreed it would be good to have a set way of doing it. I am cautious about using !pip-compile from inside notebooks, because we had problems previously with people doing !pip-freeze > requirements from notebooks and then ending up with 2 requirements.txt (one in main dir, one in notebooks). Realise that isn't the issue here exactly but the pathing issue is the same. For that reason I think a little bit of magic would be a nice solution, although it seems fiddly

sebbacon commented 4 years ago

Another suggestion:

Another .bat file that windows users can double click