Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

39 changes: 17 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/
Expand All @@ -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

Expand All @@ -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
Expand Down
69 changes: 8 additions & 61 deletions mac
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand All @@ -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 \
Expand All @@ -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=- <<EOF
#tap "thoughtbot/formulae"
tap "homebrew/services"
tap "universal-ctags/universal-ctags"
tap "homebrew/cask"
tap "buo/cask-upgrade"
tap "homebrew/core"
tap "homebrew/bundle"
tap "buo/cask-upgrade"
tap "homebrew/cask-fonts"

# Unix
brew "universal-ctags", args: ["HEAD"]
Expand All @@ -139,12 +103,11 @@ brew "xz"
brew "libxt"
brew "cairo"
brew "rlwrap"
#brew "pandoc"
#brew "pandoc"
brew "tree"
brew "jq"
brew "wget"
brew "rclone"
brew "tree"

# GitHub
brew "gh"
Expand All @@ -156,18 +119,20 @@ 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"
cask "iterm2"
#cask "firefox"
#cask "google-chrome"
cask "docker"
brew "docker"
cask "docker-desktop"
cask "rstudio"
cask "vscodium"
cask "quarto"
EOF

#fancy_echo "Updating Brew Casks"
Expand All @@ -177,27 +142,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
Expand Down
Loading