-
Notifications
You must be signed in to change notification settings - Fork 674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use a Python CLI instead of Make #42
Comments
Do you have an idea of the level of your users? I would have guessed that they would in general have to be at the level where they had no problem installing make. It's much easier to add little one-liner targets, if its make. Maybe fuse the two - put stuff into a CLI, and add tiny Make targets? |
@matthew-brett that's a good point. I think that in general if we organize the python code to be used like a CLI (even if it's still called with make), it'll make things more modular and easier to test (e.g. that's how we now run the tests in |
I'm partial to The downside as you mention is that |
yeah - that's basically where we are now. Sounds like folks generally agree that a thin layer of |
just a note that in #53 I added a mini python module in the scripts folder. Hopefully this will make it easier to add new functions etc in a more modular way rather than wrapping it all in one big script. https://github.com/choldgraf/jupyter-book/tree/master/scripts/jupyterbook It's a bit janky how we import stuff (basically the I'll leave this issue open since it's not quite a fix yet |
now that the CLI is there, I think we can close this. There's still a small amount of |
fixing first page index bug
What do people think about using a Python CLI instead of a Makefile for simple commands? We could define the cli in
scripts/
as a mini Python module calledjupyter-book
. Then, we could use Python to parse args and do stuff.Right now, to build the book you run
make book
which callspython/generate_book.py
.Howeever, instead of this, we could instead tell people to first install the CLI with
pip
(e.g.pip install -e scripts/cli
). Then they could run things likeWhat do folks think? The main reasons for this is that
make
is fairly annoying to use, and isn't always installed on people's machines, whereas we can probably more easily get people to install Python. Also Python has a much more powerful set of tools for parsing arguments and making a CLI.Anyone have thoughts on this? Maybe @SamLau95 or @matthew-brett or @TomDonoghue ?
The text was updated successfully, but these errors were encountered: