-
Notifications
You must be signed in to change notification settings - Fork 661
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 submodule for notebooks folder #14
Comments
Hmmm, so you think you could expand on that à little bit ? I am intrigued but I don't think I get the whole picture! |
The use-case I have in mind are repos that are binder ready (i.e. have an index file, a requirements file, and a pile of notebooks), and that you'd like to provide both as such (e.g., on a jupyterhub), but also separately in this textbook format. Right now, unless I am missing something, you'd have to manage two separate repositories. I think that the auto-generation would also be nice for dealing with legacy repositories that are already set up for binder, but would require some work to get into this format. |
ah ya, that makes more sense...I think the trick is what configuration to expose to people, and what to "automate". E.g., I have this little helper script: that generates the summary file from a folder hierarchy, though it's a bit clunky since it just uses alphanumeric values to sort the files. Maybe that's fine? Would love to chat about how this could be done gracefully |
Related to this idea (I think), but a slightly different approach - because I also had pre-existing repos of notebooks I wanted add a site to, without reformatting the repo, I just copy them from a remote and build from that. This doesn't do all the way in terms of having a submodule (that may well be a better solution, I just know less about it). What I like about this, is that the notebooks can be more flatly organized in a repo, so if you want to scroll through them on Github, you don't have to click through on the textbook version of the repo. The textbook can then be hosted from either a 'gh-pages' branch, or a separate repo. My make file looks something like this:
I bring this up, because it is my main approach on a few repos now, and it might be worth mentioning in docs that it is easy to add a website on top of an existing repo of notebooks, without changing the original (simplest: add gh-page branch). |
Another option would be to convert the |
Yep! You might consider optionally pointing to a requirements file as part of the cookie-cutter process, to pull that in and put it in the right place. |
Or even ask people to specify (one by one?) what their dependencies are and auto-generate the requirements file! |
we've got a CLI to generate new books now! (along with a mild degree of TOC auto-generation), so gonna close this |
Wouldn't it be nice if the notebooks folder was a git submodule? And:
The text was updated successfully, but these errors were encountered: