Skip to content
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

Makefile in template? #23

Open
rowanc1 opened this issue Nov 25, 2020 · 4 comments
Open

Makefile in template? #23

rowanc1 opened this issue Nov 25, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@rowanc1
Copy link
Member

rowanc1 commented Nov 25, 2020

Wondering if including a Makefile might be a good idea? To me this is very helpful in onboarding to repositories as I can look to see what the commands are, and my previous relationships with sphinx always had Makefiles I believe?!

Even if they are small wrappers on the jupyter-book CLI make build/html/docs/serve

@rowanc1 rowanc1 added the enhancement New feature or request label Nov 25, 2020
@welcome
Copy link

welcome bot commented Nov 25, 2020

Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.

If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).

Welcome to the EBP community! 🎉

@TomasBeuzen
Copy link
Collaborator

TomasBeuzen commented Nov 25, 2020

Hi @rowanc1 - thanks for the comment! Could you expand more on what you'd like to see (based on your use cases). At least for me, the jupyter-book CLI takes care of mostly everything. My simple workflow is pretty much as follows:

  1. jupyter-book clean (clean files, not necessary but I like to start from a clean slate)
  2. jupyter-book build (this is really what I would have used make for in the past I suppose)
  3. A git push would trigger the online deployment for me (but that depends on having GH Actions set up and if you actually want to deploy online)

I usually speed up the build by caching executed notebooks.

But if others are using the CLI in a different way that would benefit from a Makefile I'd be interested to hear.

@rowanc1
Copy link
Member Author

rowanc1 commented Nov 25, 2020

The make file that I just created is below. :)

I completely agree that it is a bit redundant, my reflex, I suppose, is to reach for make commands over various CLIs because I move between a lot of projects and am forgetful.

The watch and serve commands below are nice to have when I am writing and I hit save, then the book rebuilds! Some of the integrations that I am building to jupyter-book also require the book to be run locally on a web server rather than off the file system.

.PHONY: build serve watch

build:
	jupyter-book build .

watch:
	nodemon -w './**' -e yml,md,ipynb --exec jupyter-book build .

serve:
	cd _build/html; python -m http.server 9000

@TomasBeuzen
Copy link
Collaborator

Awesome thanks! That's helpful (and interesting to know how you're using JB). I'm going to leave this issue open for a bit to see if there's any other interest :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants