Skip to content

Build system designed to streamline data projects on macOS.

License

Notifications You must be signed in to change notification settings

ablange/macos-workspace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

macos-workspace

Build system designed to streamline data projects on macOS.

Features

  • Bash Shell Manager
    • Programmatically manage your local shell with Makefile commands.
    • Store your dotfiles (e.g., .bashrc) in version control.
    • Reproduce 100% of your terminal setup any macOS machine.
    • Display your system context in real-time with custom PS1 prompt (e.g., path, git branch)
  • Data Project Templates
    • Rapidly generate data project scaffolding with a suite of interoperable copier project templates.
    • Each template provides a layer of abstraction over an open-source data tool (e.g., Python) and incorporates relevant best practices and patterns.
    • All projects run in isolated Docker containers which helps avoid dependency conflicts and ensures cross-platform compatibility (i.e., Linux, Windows).
    • Python template includes...
      • Lint with ruff and pre-commit.
      • Documentation with sphinx.
      • Manage dependencies with pdm, pip-tools and pyenv.
      • Run tests and measure coverage with pytest and coverage.

Prerequisites

⚠️Recommended macOS version is Sequoia 15.0> or later.

  1. Install Docker Desktop: https://docs.docker.com/desktop/install/mac-install/

  2. Install core macOS developer utilities:

xcode-select --install
  1. Change your default macOS shell from zsh to bash:
chsh -s /bin/bash
  1. Install Homebrew package manager:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  1. Install GitHub CLI and authenticate.
brew install gh
gh auth

Installation

Clone macos-workspace into a new repos/ directory.

(mkdir -p ~/repos/
gh repo clone ablange/macos-workspace ~/repos/macos-workspace)

Build your workspace.

cd ~/repos/macos-workspace/
make setup

Restart shell for changes to take effect.

exec bash

Usage

To get started using your workspace, build the projects you need inside repos/ and use them interdependently as needed.

Here is a list of templates available to build inside macos-workspace.

  • python
  • duckdb

Python

Let's walk through building a Python 3.11.9 project called some_project.

cd ~/repos/macos-workspace/
make python project_name=some_project

After you complete questionnaire, a project directory will be created in repos/.

Setup your Python project development environment.

cd ~/repos/some_project
make setup

Now when you cd into foo/ your development environment is automatically activated.

Finally, push your new project to GitHub and start working on a new branch.

Change into your new project directory and push to GitHub.

git init
git push origin main
git checkout -B feature

DuckDB

TODO