Closed sjspielman closed 1 year ago
My main comment here is that if you already checked out both repos, why use
curl
?
🤦♀️ is my answer I think...!
After my first round of excitingly using a different strategy from exercise notebooks, and then almost impressively forgetting I was taking that strategy half-way through writing 🤪, here is round 2!
Again, this was tested in a separate private repo of mine to save us all from spam, hence the single commit (which to be clear I just taught a workshop about how this was a bad practice, but here we are!).
I directly incorporated suggestions myself, including main
-> website
(thanks, good call), bumping the action to @5
, etc. I also did simplify the code, but I decided in the end to use a case
statement for this; I think this is much easier to read than the if
statements. So, we still get notebooks for a given workshop only (including bulk).
Let me know what you think now, but again, no rush on re-reviewing this today if that's not good for your schedule!
Semi-related thought: As we are doing all this rejiggering, is it time to update the default branch to main for these repos?
I had thought about this at one point, but got nervous about finding all the links in all the places since it's spread across several repos. As long as we don't delete master
(which I don't think you're suggesting anyways!), then previously-used links should work just fine I suppose. I might call this a "nice to have but let's circle back towards the end of this epic and see what the mess looks like."
Semi-related thought: As we are doing all this rejiggering, is it time to update the default branch to main for these repos?
I had thought about this at one point, but got nervous about finding all the links in all the places since it's spread across several repos. As long as we don't delete
master
(which I don't think you're suggesting anyways!), then previously-used links should work just fine I suppose. I might call this a "nice to have but let's circle back towards the end of this epic and see what the mess looks like."
Yeah, I guess I was thinking that this repo might be the one to start with? Nothing should link back to it that I am aware of...
@jashapiro was there anything else here? I think this was pretty much set?
⚠️ Stacked on #129 Closes #111
This PR adds a github action that will copy completed notebooks from a given tag of
training-modules
into this template repository (presumably after someone has copied the template!). All repos involved are public, so no special security things here, which is important since we might expect folks running external workshops to use this action.I developed this workflow in one of my personal repositories so I could spam myself to my heart's content, hence only one commit here. I confirmed it worked for any of the three workshops, but we should still do a final.final round of testing here as well. I figure we may want to get any conceptual reviews implemented first though, so this action currently only runs manually. Once we're confident that this is how the GHA should actually look, I can add a PR target so it will run here.
I made a variety of choices along the way which we can discuss during review if there are strongly differing opinions. Here's what I did!
training-modules
repo tag of interest, which defaults tomaster
.training-modules
and this one. You have to be a little careful with paths here, but it seems to work ok! I opted for this approach to find the files to copy rather than maintaining something analogous to anexercise_list
like we do for the exercise copying action.main
, which seemed like a good generic name for the repo we are PRing into (it won't always betraining-specific-template
, since this action will generally be run in a differently-named repo created from this template).--global
flags for all thegit config
settings.cd main
and then set local username/email if that is preferred.completed-notebooks/
.nb.html
files, but we have one.html
(not a notebook) living in intro scRNA-seq, so I went more permissive to just.html
.One key question for reviewers: Would we rather see the bash code pulled out into it's own script to live in
scripts/
? I was on the fence at the beginning, but now I'm trending towards "yes".