Use uv internally for spa venv bootstrap (keep spa venv / .venv contract)

Open
#83 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
52/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python, shell

Research direction

Start by tracing the current bootstrap behavior in bin/spa_venv.sh and install.sh, then read tests/test_spa_venv.py and the spa doctor and install documentation. Preserve the spa venv, .venv layout, launcher, resolution, and option contracts while adding pinned uv handling, fallback behavior, and the documented upgrade path. Confirm existing environments remain valid and ansible-galaxy collection installation stays unchanged.

Written by the indexing model from the issue text.

Description

enhancement

Summary

Use uv inside spa_venv.sh / install.sh to create the existing .venv and install requirements.txt. Keep the public contract: spa venv, shared SPA_HOME/.venv vs env .venv vs tests/.venv, launcher execs .venv/bin/python. Do not make uv an operator prerequisite (brew install uv would be more host software, not less).

Today bootstrap is stdlib python3 -m venv plus pip in the venv, then ansible-galaxy for requirements.yml. Host need is Python 3.9+ with the venv module (often python3-venv on Debian). Ansible/Pydantic already must not come from Homebrew.

Why

  • Faster create/reinstall/rebuild (CI and spa venv --rebuild).
  • Optional uv python install so a controller without a usable Python / venv module can still get SPA — only if install.sh downloads or vendors a pinned uv binary.
  • Optional lockfile (uv.lock or equivalent) for reproducible Ansible/Pydantic; requirements.txt is loosely ranged today.

Ship

  • install.sh / bin/spa_venv.sh: prefer a pinned uv (download to prefix or vendor); uv venv + uv pip install -r requirements.txt (and --upgrade on spa venv --upgrade). Same resolution order and --python / --dir / --environment behavior.
  • Do not document uv as something operators install. Doctor/docs: either “Python 3.9+ with venv” or “installer brings uv+Python”; extract-anywhere without network still needs a fallback (python3 -m venv + pip) or a vendored uv.
  • ansible-galaxy for collections stays; uv does not replace Galaxy.
  • Tests (tests/test_spa_venv.py), spa doctor, skills, docs/install.md, migrate notes. Existing venvs remain valid (same .venv layout).
  • Air-gap / enterprise: pin uv version; no extra curl of latest; PyPI still required unless the operator already has a package index.

Out of scope

  • Replacing .venv with a uv-only workflow operators must learn.
  • Dropping spa venv.
  • Homebrew Ansible/Pydantic (already forbidden).

Related

  • M1 spa_venv.sh, M3 install.sh
  • Optional later Homebrew tap (ROADMAP): still a SPA venv, not brew Ansible
Dominant language
Python
Stars
137
Forks
51
Avg merge
7h 44m
Merged PRs (30d)
14

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from splunk/splunk-platform-automator

All issues in splunk/splunk-platform-automator

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.