Skip to content

Conversation

@ghukill
Copy link
Contributor

@ghukill ghukill commented Aug 13, 2025

Purpose and background context

This PR builds on the python CLI templatet branch IN-1425-uv to scaffold a new click CLI application using uv.

The app is called "launcher" and it will be a CLI that launches a Marimo notebook. Spike code is already complete on that front, but this PR just establishses the base uv + click application.

How can a reviewer manually see the effects of these changes?

Run via uv in local virtual environment:

uv run python -m launcher.cli --verbose

Build a docker container and run that:

make build
docker run marimo-launcher:latest --verbose

Includes new or updated dependencies?

YES

Changes expectations for external applications?

NO

What are the relevant tickets?

Why these changes are being introduced:

This application will use uv, as is sketched out in our python
CLI template under branch IN-1425-uv.

The application is under the launcher folder and is a simple
click CLI.

How this addresses that need:
* Uses changes from python CLI template IN-1425-uv branch
* Renames my_app to launcher
* Small tweaks here and there for uv CLI usage

Side effects of this change:
* None

Relevant ticket(s):
* https://mitlibraries.atlassian.net/browse/IN-1415
Copy link
Contributor Author

@ghukill ghukill Aug 13, 2025

Choose a reason for hiding this comment

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

I'm unsure at this time if this will be a pattern we want to adopt elsewhere? But it seems to work well here. It uses a two-part build process:

  1. FROM python:3.13-slim AS builder establishes the first build layer
  2. We generate a requirements.txt file from the project's pyproject.toml and uv.lock files
  3. We start a new layer FROM python:3.13-slim (the final layer)
  4. We use COPY --from=builder /requirements.txt /requirements.txt to get that important requirements.txt file, but that's the only asset from the previous layer
  5. We use the global python environment and install dependencies
  6. We launch the click CLI in a pretty boring way, no uv scripts involved

@ghukill ghukill marked this pull request as ready for review August 13, 2025 20:20
@ghukill ghukill requested a review from a team August 13, 2025 20:22
@ehanson8 ehanson8 self-assigned this Aug 14, 2025
Copy link

@ehanson8 ehanson8 left a comment

Choose a reason for hiding this comment

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

Looks great!

@ghukill ghukill merged commit 1ac6e0e into main Aug 14, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants