From 5f2059d0579ee4ade84ecb7761a3dc2daa95947b Mon Sep 17 00:00:00 2001 From: Tim Dennis Date: Thu, 16 Jul 2026 17:58:32 -0700 Subject: [PATCH 1/4] Modernize toolchain: drop Anaconda, add VSCodium/Miniforge/Node/Quarto Aligns the script with The Carpentries' March 2025 lesson setup task force recommendations (Miniforge over Anaconda, VSCodium as default editor) and adds the tooling DSC/OSPO actually use day to day. - mac: swap cask "anaconda" -> cask "miniforge" (Carpentries recommendation, avoids Anaconda's 2024 ToS enforcement issues); add cask "vscodium"; add brew "node" for Astro/Jekyll/Hugo site work; add cask "quarto" for DSC reports/slides; drop the redundant brew "docker" formula (keeping the Docker Desktop cask); remove dead Anaconda curl-installer cruft and a no-op RStudio volume-mount conditional - README.md: fix issue-tracker and wiki links that pointed at thoughtbot/laptop instead of UCLA-DataSquad/laptop; drop tool descriptions for things the script doesn't actually install (pandoc, awscli, Postgres, Redis); document the new tools Verified with shellcheck (no new warnings vs. the pre-existing bash-isms in untouched code) and `brew bundle check` (all formula/cask names resolve). Closes #3, closes #5 --- README.md | 39 +++++++++++++++++---------------------- mac | 28 ++++++---------------------- 2 files changed, 23 insertions(+), 44 deletions(-) diff --git a/README.md b/README.md index 253f8ca94..0c0e3f3d4 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ Debugging Your last Laptop run will be saved to `~/laptop.log`. Read through it to see if you can debug the issue yourself. If not, copy the lines where the script failed into a -[new GitHub Issue](https://github.com/thoughtbot/laptop/issues/new) for us. +[new GitHub Issue](https://github.com/UCLA-DataSquad/laptop/issues/new) for us. Or, attach the whole log file as an attachment. What it sets up @@ -93,13 +93,11 @@ Unix tools: * [Watchman] for watching for filesystem events * [Zsh] as your shell * [rlwrap] readline wrapper -* [pandoc] markup converter * [tree] lists contents of directory in a tree like structure * [jq] JSON parser * [wget] network downloader * [rclone] cloud storage data synch -* [awscli] amazon command line -* [docker] cli for containers +* [docker] container runtime (Docker Desktop, includes CLI + GUI) [Universal Ctags]: https://ctags.io/ [Git]: https://git-scm.com/ @@ -109,13 +107,11 @@ Unix tools: [Tmux]: http://tmux.github.io/ [Watchman]: https://facebook.github.io/watchman/ [rlwrap]: https://linux.die.net/man/1/rlwrap -[pandoc]: https://pandoc.org [tree]: https://linux.die.net/man/1/tree [jq]: https://stedolan.github.io/jq/ [wget]: https://www.geeksforgeeks.org/wget-command-in-linux-unix/ [rclone]: https://rclone.org -[awscli]: https://aws.amazon.com/cli/ -[docker]: https://docs.docker.com/engine/reference/commandline/cli/ +[docker]: https://www.docker.com/products/docker-desktop/ * [GitHub CLI] for interacting with the GitHub API @@ -125,26 +121,25 @@ Image tools: * [ImageMagick] for cropping and resizing images -Languages: - -* [R] - Base r installed via homebrew -* [Anaconda Python] - Python distribution for scientific computing, this is installed using the bash installer - -Databases: - -* [Postgres] for storing relational data -* [Redis] for storing key-value data - -[Postgres]: http://www.postgresql.org/ -[Redis]: http://redis.io/ +Languages and editors: +* [R] - Base R installed via Homebrew +* [RStudio] - R IDE +* [Miniforge] - conda-forge-based Python/conda distribution (follows [The Carpentries' 2025 setup recommendation](https://carpentries.org/blog/2025/03/lesson-setup-instructions-task-force-recommendations/) to move off Anaconda) +* [VSCodium] - Python/shell/git editor (VS Code without Microsoft branding/telemetry), also per The Carpentries' 2025 recommendation +* [Node.js] - JavaScript runtime + npm, for working in the Astro/Jekyll/Hugo site repos across DSC (Astro/Jekyll/Hugo themselves are scaffolded per-project via `npm`/`bundler`, not installed globally) +* [Quarto] - scientific and technical publishing system used for DSC reports, slides, and stats +[R]: https://www.r-project.org/ +[RStudio]: https://posit.co/products/open-source/rstudio/ +[Miniforge]: https://github.com/conda-forge/miniforge +[VSCodium]: https://vscodium.com/ +[Node.js]: https://nodejs.org/ +[Quarto]: https://quarto.org/ It should take less than 15 minutes to install (depends on your machine). - - -See the [wiki](https://github.com/thoughtbot/laptop/wiki) +See the [wiki](https://github.com/UCLA-DataSquad/laptop/wiki) for more customization examples. Contributing diff --git a/mac b/mac index 562493982..0f6a7d027 100644 --- a/mac +++ b/mac @@ -156,9 +156,10 @@ brew "imagemagick" brew "libyaml" # should come after openssl brew "coreutils" -#Programming languages +#Programming languages brew "r" -cask "anaconda" +brew "node" # provides node + npm; Astro/Jekyll/Hugo site tooling is scaffolded per-project via npm/bundler, not installed globally +cask "miniforge" #apps cask "openrefine" @@ -166,8 +167,9 @@ cask "iterm2" #cask "firefox" #cask "google-chrome" cask "docker" -brew "docker" cask "rstudio" +cask "vscodium" +cask "quarto" EOF #fancy_echo "Updating Brew Casks" @@ -177,27 +179,9 @@ EOF fancy_echo "Cleaning up old Homebrew formulae ..." brew cleanup -## Install anaconda if not already installed -#if ! command -v conda >/dev/null; then -# -# curl -s https://repo.anaconda.com/archive/Anaconda3-2020.11-MacOSX-x86_64.sh -o anaconda3.sh -# #use -b to say yes to all interaction & -p prefix to put anaconda3 install in /volumne -# bash anaconda3.sh -b -# #need to add path to .zshrc.local so conda will be available on boot -# append_to_zshrc 'export PATH="~/anaconda3/bin:$PATH"' -# export PATH="~/anaconda3/bin:$PATH" -#fi - -#conda install -y csvkit +fancy_echo "Setting up Miniforge conda ..." conda init "$(basename "${SHELL}")" conda update -y conda -#conda update -y anaconda - -if [ -d "/Volumes/Macintosh HD/Applications/RStudio.app" ]; then - #install RStudio & use tool to mount and move .app to /Volumes/Macintosh HD/Applications/ - # install nightly build to match brew path - echo "yes" -fi # uncomment if you want to create and run your own local additions to this script #if [ -f ".laptop.local" ]; then From 4db69a7ebaab3f727e9ca1c28915a1393b15f1da Mon Sep 17 00:00:00 2001 From: Tim Dennis Date: Thu, 16 Jul 2026 18:09:53 -0700 Subject: [PATCH 2/4] Fix script-breaking dead taps and unnecessary sudo prompt brew bundle currently fails every run, silently: 4 of the 6 taps in the Brewfile are deprecated/no-longer-needed in modern Homebrew (homebrew/services, homebrew/cask, homebrew/core, homebrew/bundle are all now built into brew core or emptied), plus homebrew/cask-fonts was retired outright in 2023 (repo 404s). brew bundle keeps processing remaining lines after a tap failure, but returns exit 1 at the end -- and since `mac` runs under `set -e` with no guard on that call, every run has been silently skipping brew cleanup, conda init, and conda update since whichever of these taps broke first. Verified live: attempting to tap all six failed on four of them (services, cask, core, bundle) with the same exit-1 behavior; only universal-ctags/universal-ctags and buo/cask-upgrade still work and are kept. Also: - Fix update_shell firing (and prompting for sudo) on every run on Apple Silicon: the guard compared `command -v zsh` against a hardcoded Intel Homebrew path that can never match on arm64, so it always evaluated true. Simplified to skip entirely when $SHELL is already zsh, which is the actual condition being tested for. - Remove gem_install_or_update: defined, never called - Remove the commented-out Apple Silicon /opt permissions block: dead since Homebrew already handles this on install - Remove the brew-cask uninstall check: brew-cask was merged into Homebrew core in ~2016, this package hasn't existed in years - Remove a literal duplicate `brew "tree"` line Re-verified with shellcheck (same pre-existing warning set, nothing new) and `brew bundle check` against the full Brewfile block (all formula/cask/tap names now resolve cleanly, zero failures). --- mac | 39 +-------------------------------------- 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/mac b/mac index 0f6a7d027..8e09f1b86 100644 --- a/mac +++ b/mac @@ -46,19 +46,6 @@ fi # shellcheck disable=SC2016 append_to_zshrc 'export PATH="$HOME/.bin:$PATH"' -#brew installs in /opt in apple silicon which is already available/writable by user -#HOMEBREW_PREFIX="/opt" -# -#if [ -d "$HOMEBREW_PREFIX" ]; then -# if ! [ -r "$HOMEBREW_PREFIX" ]; then -# sudo chown -R "$LOGNAME:admin" /opt -# fi -#else -# sudo mkdir "$HOMEBREW_PREFIX" -# sudo chflags norestricted "$HOMEBREW_PREFIX" -# sudo chown -R "$LOGNAME:admin" "$HOMEBREW_PREFIX" -#fi - update_shell() { local shell_path; shell_path="$(command -v zsh)" @@ -73,23 +60,12 @@ update_shell() { case "$SHELL" in */zsh) - if [ "$(command -v zsh)" != '/usr/local/bin/zsh' ] ; then - update_shell - fi ;; *) update_shell ;; esac -gem_install_or_update() { - if gem list "$1" --installed > /dev/null; then - gem update "$@" - else - gem install "$@" - fi -} - if ! command -v brew >/dev/null; then fancy_echo "Installing Homebrew ..." /bin/bash -c \ @@ -105,23 +81,11 @@ if ! command -v brew >/dev/null; then source ~/.zshrc fi -if brew list | grep -Fq brew-cask; then - fancy_echo "Uninstalling old Homebrew-Cask ..." - brew uninstall --force brew-cask -fi - fancy_echo "Updating Homebrew formulae ..." brew update --force # https://github.com/Homebrew/brew/issues/1151 brew bundle --file=- < Date: Thu, 16 Jul 2026 18:15:05 -0700 Subject: [PATCH 3/4] CI: fix false-positive smoke test results, update checkout action The smoke test badge has been meaningless: `sh mac 2>&1 | tee ~/laptop.log` has no set -o pipefail, so the step's exit code is tee's (which basically always succeeds), not sh mac's. Confirmed directly from a real run's log on this branch's first commit (before the tap fixes): sh mac printed multiple "has failed!" lines and a final "failed" from its own trap, exited 1 internally -- and the job still reported "success". Also bumps actions/checkout from v1, deprecated for years and running on an EOL Node runtime, to v4. --- .github/workflows/smoke.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index 711c4a351..3b1c98617 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -6,9 +6,12 @@ jobs: build: runs-on: macOS-latest - + steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: Execute full install - run: sh mac 2>&1 | tee ~/laptop.log + shell: bash + run: | + set -o pipefail + sh mac 2>&1 | tee ~/laptop.log From 0e6b39f8feb0747420c4e4807ed01574027489e1 Mon Sep 17 00:00:00 2001 From: Tim Dennis Date: Thu, 16 Jul 2026 18:23:10 -0700 Subject: [PATCH 4/4] mac: use docker-desktop cask name, not the deprecated docker alias Surfaced as a CI annotation on the first real green run: "Cask docker was renamed to docker-desktop." Still resolves today via alias, but using the deprecated name risks breaking on a future Homebrew release. --- mac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mac b/mac index 8e09f1b86..ccd775c71 100644 --- a/mac +++ b/mac @@ -129,7 +129,7 @@ cask "openrefine" cask "iterm2" #cask "firefox" #cask "google-chrome" -cask "docker" +cask "docker-desktop" cask "rstudio" cask "vscodium" cask "quarto"