Repository navigation
Add a GitHub Actions workflow publishing prebuilt desktop app bundles (ShinyApps store) - #124
Open
fentouxungui wants to merge 1 commit into
Open
fentouxungui wants to merge 1 commit into
fentouxungui wants to merge 1 commit into
Conversation
5 of 7 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR title
Add a GitHub Actions workflow publishing prebuilt desktop app bundles (ShinyApps store)
PR body
Summary
This PR adds one GitHub Actions workflow —
.github/workflows/spatiallibd-build-app-bundle.yml— that packages spatialLIBD into a prebuilt, self-contained desktop app bundle for Windows and macOS and attaches it to a GitHub Release. Those bundles let people run thespatialLIBDShiny app as a desktop application with no R/Bioconductor installation and noinstall.packages(), through an open-source desktop app store called ShinyApps.It is a CI-only addition: no package code,
DESCRIPTION,NAMESPACE,R/,man/,data/,inst/, tests, or vignettes are changed. There is no effect on the Bioconductor build,R CMD check, orBiocCheck.What is ShinyApps?
ShinyApps is an open-source desktop app store for R/Shiny apps (built on
shinyelectron, AGPL-3.0). A lightweight Electron shell ships once with a pinned R 4.6.1 runtime; users then install, run, update, and uninstall individual Shiny apps on demand from an online catalog. Users get a real desktop app without any R/Bioconductor setup, and app authors distribute updates without reshipping the shell.What this workflow does
release: published, or manualworkflow_dispatch(with an optional tag).windows-latest→win-x64,macos-14→mac-arm64, on R 4.6.1 (matching the store's runtime).R CMD build --no-build-vignettes --no-manual, then resolves the dependency closure fromDESCRIPTION(Depends/Imports/LinkingTo) against CRAN + Bioconductor (BiocManager::repositories()) and installs the binaries into the bundle.app/app.Rand amanifest.json, then zips and computes asha256.<id>-<version>-<platform>.zipto the Release.Artifact produced (per platform):
Contract compliance
spatialLIBDalready satisfies the store's entry contract:run_app()returns ashiny.appobjand does not callshiny::runApp(). It ends withgolem::with_golem_options(app = shinyApp(app_ui, app_server), golem_opts = ...), and the man page documents@return A shiny.appobj that contains the input data— so the shell can host it directly. (Same pattern as the iSEE and UCSCXenaShiny apps already in the store.)NeedsCompilation: no).run_app()'s defaultdocs_path = system.file("app", "www", package = "spatialLIBD")resolves inside the installed bundle (inst/app/www/shipsdocumentation_spe.md,documentation_sce_layer.md,favicon.ico,footer.html,README.md), so the app's own documentation renders.Why the closure is resolved explicitly (spatialLIBD-specific)
Most dependencies are declared in
DESCRIPTIONand resolve cleanly from CRAN + Bioconductor. ScanningR/*.Rfor runtimepkg::references surfaced three packages the app uses but does not declare, so the workflow installs them explicitly (all CRAN) to make the bundle self-contained:Polychrome— the palette backend behindpaletteer::paletteer_d("Polychrome::palette36", ...)(app_ui.R,app_server.R,get_colors.R);RColorBrewer— default colour scales inlayer_stat_cor_plot()/gene_set_enrichment_plot()(it is inSuggests, notImports);markdown— rendering the in-app docs viashiny::includeMarkdown().Reference to
HDF5Array,lobstr,scran, andvisiumStitchedappear only inside roxygen examples, so they are not runtime dependencies. The workflow excludes only R base-priority packages and keeps recommended ones, so the bundle launches offline.Testing
I integrated a fork into ShinyApps and built the bundles end-to-end:
(
spatiallibd-0.1.0-win-x64.zip~300 MB,spatiallibd-0.1.0-mac-arm64.zip~281 MB)spatiallibd).shiny.appobjand never callsrunApp();.githubis already ignored by.Rbuildignore.One honest note on first run: exactly like the package locally, the default
run_app()downloads the LIBD Visium objects (spe,sce_layer,modeling_results) from ExperimentHub (Dropbox fallback) viaBiocFileCachebefore the server starts listening (~GBs, one time, cached afterwards). The desktop shell ships a configurable startup timeout for this; after the first successful download, subsequent launches are fast.How maintainers can test it
.exe/ macOS.dmg).The store catalog is public: https://fentouxungui.github.io/ShinyApps/catalog.json.
Impact and maintenance
.github/are added, and.githubis already listed in.Rbuildignore, so the Bioconductor source tarball,R CMD check, andBiocCheckare unchanged.workflow_dispatchonly, or upload the bundles as workflow artifacts instead of Release assets, so nothing is ever attached to your Releases automatically.concurrencyguard to match your policy.Licensing
If this PR is accepted
As the ShinyApps maintainer, I will update the store catalog entry to point at the official
LieberInstitute/spatialLIBDreleases, so every release of the package becomes installable in the store — an additional, zero-maintenance distribution channel that lowers the setup barrier for wet-lab and clinical users who want to browse the DLPFC Visium data without managing an R/Bioconductor environment.Beyond convenience, this is aligned with the
spatialLIBDproject's own goal of letting people interactively explore spatially-resolved transcriptomics data: the samerun_app()you already ship, runnable from a one-click desktop installer, on Windows and macOS.Thanks for considering this — I am glad to adjust the workflow (naming, gating, SHA-pinning, or dropping the Release-asset behavior) to fit your preferences.
Checklist
.github/already ignored by.RbuildignoreshinyAppobject and does not callrunApp()Polychrome,RColorBrewer,markdown) handled explicitly