Closed tonyfast closed 5 years ago
This looks good to me! Any reason not to merge it?
Maybe add some text to the readme about writing notebook entries?
I'll have to change the branches that the travis build is pointing to.
There is a little bit of a procedural question. Github pages deploys on specific branches, we don't want to publish preemptively otherwise an incomplete may be published.
We could either use a specific build branch like publish
, add a _wip
folder, or we could use the jekyll published
flags.
I should probably turn the notebook I used to get this running into an actual document.
[x] Decide on a preferred way to submit new posts and drafts.
The best approach is to start the file name without numeric characters, this is how Jekyll suggests writing drafts.
[ ] Create a pull_request_template with instructions for submitting a new post.
[x] Turn the notebook used to make this into a post.
[x] Add text to the readme
I still have to work on the pull request template with some instructions for making a post.
The build is now pointing at master and updating the blog.
Here is an example blog post. Is there anyway you could take a look at it and see if we want to keep it?
That post looks great! It would be great to be have this. I'll review the PR again
This looks fun!
I would like to put an environment.yml
or something per post so that Binder would pick this up. However Binder only seems to work as an environment per repository, see https://mybinder.readthedocs.io/en/latest/using.html
So I think what we could do is have one folder per notebook blog post. When it is published, we create a commit on a branch that is the name of the blog post. The contents of the repo in that branch are the contents of the folder. Then the binder link for each post points to that branch, so that it picks up any build files in that folder.
If this is merged, I can create a PR to try that out.
We should use environment.yml
instead of requirements.txt
. There could be a postBuild
file that registers environments for each of the specific posts. The environments info could be stored in the notebook metadata.
We should use environment.yml instead of requirements.txt. There could be a postBuild file that registers environments for each of the specific posts. The environments info could be stored in the notebook metadata.
Sorry I don't think I was very explicit above, I meant just specifying build files for Binder to use not for us to use on Travis. For binder to use them, they could be any of their supported files but they have to be in a specific location in the repository (in the root or in the binder
folder). So my suggestion was to make a commit for each post that has only the notebook and the binder config files in it, so that when you launch binder with that commit it picks up the right build information.
That is a cool idea. So each branch has an environment.yml
that can be used explicitly. Maybe master only uses requirements.txt
so it builds faster.
New branches for every notebook, that are created automatically, and have at the root whatever files you put in the folder for that notebook. i.e. in master you have structure: _notebooks/<notebook-name>/notebook.ipynb
and _notebooks/<notebook-name>/<whatever-other-file>
. Where <whatever-other-file>
could be environment.yml
or postBuild
or requirements.txt
, any file that binder recognizes (or just any file in general). Then we do some magic in Travis CI to make a new branch called <notebook-name>
that has the contents of the _notebooks/<notebook-name>
in the root of the repo. So when we tell binder to build that branch it picks up the right files.
So on every travis CI build it makes new commits to all notebook branches with the right files and pushes those.
Note: existing nbconvert in travis would behave the same with what I proposed, this would only be to change launch in binder behavior.
I dig that. Can you have a go at post and we'll use that to set this up the first time?
Is there anything else that we need to do here?
lgtm. hopefully someone could try writing another post.
This pull request adds a github pages deployment to the blog. The pages deployment will convert notebooks in the
_notebooks
to markdown_posts
. The post front matter is constructed from the notebook metadata and git revision histories.This approach allows notebooks to be reused on binder for demonstration and read as blog documents.
Currently, the builds are passing on demo branches.
This is a decent start. I welcome any comments or ideas.