Skip to content

Move README "setup" commands into Flox "activate" hook#801

Merged
forstmeier merged 5 commits intomasterfrom
consolidate-setup-commands
Mar 25, 2026
Merged

Move README "setup" commands into Flox "activate" hook#801
forstmeier merged 5 commits intomasterfrom
consolidate-setup-commands

Conversation

@forstmeier
Copy link
Copy Markdown
Collaborator

@forstmeier forstmeier commented Mar 22, 2026

Overview

Changes

  • update hook with checks/commands
  • update README instructions for development setup

Context

Minor quality of life thing for new developers.

Summary by CodeRabbit

  • New Features

    • Automated local development activation: creating/activating a local Python virtual environment, initializing a pre-commit hook if missing, and installing development dependencies when activating locally (does not run in CI).
  • Documentation

    • Streamlined setup instructions: shorter, clearer onboarding commands with fewer manual steps.

Copilot AI review requested due to automatic review settings March 22, 2026 02:41
@github-project-automation github-project-automation Bot moved this to In Progress in Overview Mar 22, 2026
@github-actions github-actions Bot requested a review from chrisaddy March 22, 2026 02:41
@github-actions github-actions Bot added the markdown Markdown code updates label Mar 22, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 22, 2026

📝 Walkthrough

Walkthrough

Activation hook now auto-creates and activates a local Python virtualenv, installs the git pre-commit hook if missing, and runs mask development python install when not running under CI; README setup instructions were shortened to reflect this automation.

Changes

Cohort / File(s) Summary
Manifest Hook Enhancement
/.flox/env/manifest.toml
Added CI-gated logic: if CI is empty, ensure .venv exists (uv venv), source .venv/bin/activate, install pre-commit hook when missing, and run mask development python install.
Documentation Simplification
README.md
Removed explicit local environment/tooling commands (uv venv, .venv activation, pre-commit install, mask development python install) and condensed setup snippet to higher-level steps (brew install flox, flox activate, mask setup, mask --help).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main change: moving setup commands from the README into the Flox activation hook script.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch consolidate-setup-commands

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Mar 22, 2026

Greptile Summary

This PR automates the local development setup by moving manual README steps into the Flox on-activate hook, reducing onboarding from 8 commands to 4. The hook creates/activates a Python venv, installs pre-commit hooks, and runs mask development python install — all guarded behind if [[ -z "${CI}" ]] so CI environments are unaffected.

  • Both manifest.toml and manifest.lock are updated consistently with the CI guard — the prior review concern about the lock file is resolved.
  • The .venv creation check (if [[ ! -d .venv ]]) and the pre-commit check (if [[ ! -f .git/hooks/pre-commit ]]) correctly avoid re-running expensive steps on subsequent activations.
  • mask development python install (i.e. uv sync) runs on every non-CI activation; the developer has explicitly acknowledged this trade-off.
  • README.md cleanly reflects the new shortened workflow.

Confidence Score: 5/5

  • This PR is safe to merge — the changes are low-risk developer-experience improvements with no production impact.
  • The hook logic is straightforward and correct, the CI guard is consistently present in both the toml and lock file (resolving the only prior blocking concern), and the README accurately reflects the new workflow. No new issues were identified.
  • No files require special attention.

Important Files Changed

Filename Overview
.flox/env/manifest.toml Adds an on-activate hook block with a CI guard that creates/activates the Python venv, installs pre-commit, and runs mask development python install. Logic is sound and matches the lock file.
.flox/env/manifest.lock Lock file on-activate hook is updated to match manifest.toml, including the if [[ -z "${CI}" ]] guard — addressing the prior review concern.
README.md Setup section simplified from 8 manual steps to 4, correctly reflecting that flox activate now handles venv creation, pre-commit install, and dependency installation automatically.

Reviews (4): Last reviewed commit: "Merge branch 'master' into consolidate-s..." | Re-trigger Greptile

Comment thread .flox/env/manifest.lock Outdated
coderabbitai[bot]
coderabbitai Bot previously approved these changes Mar 22, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR moves the manual development setup steps from the README into Flox’s on-activate hook so that entering the Flox environment performs initial repo setup automatically for local developers.

Changes:

  • Simplifies README setup instructions to a short flox activate + Mask workflow.
  • Expands Flox on-activate hook to create/activate a Python venv, install pre-commit hooks, and install Python deps.
  • Updates Flox lockfile hook content to reflect the new activation behavior.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 5 comments.

File Description
README.md Updates dev setup instructions to rely on Flox activation + Mask tasks.
.flox/env/manifest.toml Adds local-only activation steps (venv creation, pre-commit install, python deps install).
.flox/env/manifest.lock Updates the serialized on-activate hook stored in the lockfile.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .flox/env/manifest.lock Outdated
Comment thread .flox/env/manifest.toml
Comment thread .flox/env/manifest.toml
Comment thread .flox/env/manifest.toml
Comment thread README.md Outdated
coderabbitai[bot]
coderabbitai Bot previously approved these changes Mar 22, 2026
Comment thread .flox/env/manifest.toml
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.

Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.

👉 Steps to fix this

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@README.md`:
- Line 23: The README currently suggests a macOS-only command "brew install
flox"; update the setup step around that line to add a cross-platform note
telling non-macOS users to follow Flox's official installer docs (e.g., "on
Linux/other platforms, see https://flox.dev/docs/install or the official
installer instructions") so contributors who aren’t on macOS know where to
install Flox; keep the original brew line for macOS but append the fallback
sentence and a link for clarity.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c18fe7b9-2e4f-4f6c-8763-01e911ae5d91

📥 Commits

Reviewing files that changed from the base of the PR and between 9c4a893 and cffc99e.

⛔ Files ignored due to path filters (1)
  • .flox/env/manifest.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • README.md

Comment thread README.md
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 3 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@forstmeier forstmeier merged commit 7c963e6 into master Mar 25, 2026
12 checks passed
@forstmeier forstmeier deleted the consolidate-setup-commands branch March 25, 2026 01:29
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Overview Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

markdown Markdown code updates

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants