CellProfiler / tutorials

CellProfiler tutorial pipelines and images
https://tutorials.cellprofiler.org/
BSD 3-Clause "New" or "Revised" License
83 stars 86 forks source link

How to deal with downloads... #41

Open rsenft1 opened 2 years ago

rsenft1 commented 2 years ago

Previously, we used downgit for handling downloads of the folders in the repo. Sometimes downGit experienced issues and was unavailable, meaning users couldn't download files.

In response to this, I made zip folders in each folder repo and pointed the download link directly at these folders. This works for smaller tutorials, but for larger ones, we can't store the zip on GitHub because it's too big.

@bethac07 suggested zipping and releasing the tutorials folders so they appear under 'Releases' where there isn't a size limit. Those archives could be linked to the download buttons on the website BUT the issue is that when the files are re-zipped, a version no. changes in the URL, meaning it's not possible to use a static link for these. I do not currently know of a way to automatically update the links in the README file. Maybe an action that does a find/replace for the version # in the readme (if that's possible?).

Another possibility is hosting the largest tutorials on google where there isn't a limit for the zip folder size and then linking directly to these for users to download.

Any thoughts on these options?

rsenft1 commented 2 years ago

Here's a find/replace GitHub action https://github.com/marketplace/actions/find-and-replace

rsenft1 commented 2 years ago

Here's an example download link from Releases of CellProfiler:

'https://github.com/CellProfiler/CellProfiler/releases/download/v4.2.4/CellProfiler-macOS-4.2.4.zip'

We could use regex to match the "v4.2.4" part of the string and update it. The trick would be 1) how will the action know the current release version? and 2) Can we use an action to automatically deploy new releases when commits happen (ideally, only when that subfolder changes... not all commits)? Related: is the version # just incremented automatically?

rsenft1 commented 2 years ago

Notes from meeting with Beth earlier:

name create-release

uses: to source a github action

GitHub Action

$tag is already an environment variable

Pasted Graphic 4

Run this and set this to new tag. Identify place to replace with regex?

OR have a Source copy of README that gets edited and push these changes to a GitHub action to


Goals for now: 1) Create GH action to zip and release folders 2) Change the README download links to refer to the release archive for each tutorial folder. 3) use regex to identify where the version string is in the archive download link in the README and automatically modify this every time a new release is pushed, thus updating the download links