-
Notifications
You must be signed in to change notification settings - Fork 0
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
Display the updated notebook after each gh-workflow run #4
Conversation
I really like the idea with the label! |
Thanks! Also, if you do And - of course - this can be used as a workaround if someone intentionally wants to make a push that doesn't trigger the ci. But I'll come back to this later and see if I find a better way do achieve that. |
I expected to see |
It got stored successfully as an artifact during an earlier successful run of the workflow: https://github.com/mbruns91/graphathon/actions/runs/9565869540 What would be cool next is to auto-generate a comment in the PR that links to some render of the same notebook. I thought at first we could just pass it to nbviewer, but the notebook is zipped so passing the artifact straight to the nbviewer site fails with a 404. Still, there is a possible attack route here where we automate the download of the artifact, push it somewhere we can see it unzipped, pass that link to nbviewer, and then post the nbviewer link in the PR. Maybe we can find a more direct solution though. |
Yeah, I did not figure out the correct way to do the push yet...
I really like the idea of posting a reference to a rendered version of the notebook in the pr! I'll figure out a way to have something coming as close as possible to seeing it directly in a posting. |
Ok, now you can see the updated notebook in-browser by navigating to One important note: to avoid divergent branches on local and remote, one now has to wait for the action to terminate and then do a |
@mbruns91, awesome! I think I know how to get the workflow to post a comment in the PR containing the URL to the executed notebook so it's just a click away. Before merging here, please let me play with that on one of my repos. I'll either post a snippet for you to past into the workflow or let you know if I've failed 😂 |
🚀 🚀 Working A-OK in my trials over on pyiron_snippets! Try appending this step after the
I am super happy how fast this was. Just to share the magic sauce here, the github API available via We could think about being more sophisticated, e.g. there's no need to re-post the link on each run of the workflow and currently we do, but it's not an expensive call so I'm not stressed about that sort of fine polish atm. |
So now we are talking about the links to the artefacts? I think it's good that the final notebook is uploaded directly to the repository, no? At least as long as we don't have conflicts. |
No, it's a link to the uploaded artifact in the ci output folder |
That's not the same thing? |
The artifact is a zipped notebook and a link to it probably triggers a download, while the artifact uploaded to the branch is a file and a link to it takes you to the repo page for that file, which renders it nicely in your browser like any other notebook in the repo. Go look at the snippets pr I linked to see a demo |
No never mind, the snippets demo is broken because I already closed the pr and deleted the branch. Just add the code I gave here and see how it works 😝 |
…thon into display_updated_notebook divergent local branch on my side...
…thon into display_updated_notebook the same procedure as every year, james.
…ll-requests: write'
🤖 Here is the workflow output notebook on this branch |
Ok, now all of our basic ideas are working! Thank you for the suggestion (and the corresponding snippet) for posting a comment with a link to the artifact "directory", @liamhuber ! I had to grant permissions |
No description provided.