Skip to content

Convert to uv (runtime standard): lockfile, fix broken editable install, generated requirements.txt for Streamlit Cloud - #1

Open
krishagel wants to merge 1 commit into
mainfrom
psd/uv-conversion
Open

Convert to uv (runtime standard): lockfile, fix broken editable install, generated requirements.txt for Streamlit Cloud#1
krishagel wants to merge 1 commit into
mainfrom
psd/uv-conversion

Conversation

@krishagel

Copy link
Copy Markdown
Member

uv conversion (org runtime standard, standards/02 — CIO decision 2026-08-18)

What changed

  • pyproject.toml (existed already; no dependency-constraint changes):
    1. [project.optional-dependencies] dev[dependency-groups] dev (same three entries/constraints) so uv sync installs test tooling by default.
    2. Removed the broken [build-system] hatchling block. Hatchling cannot detect a package to ship in this flat Streamlit layout (app.py/pages//src/) — uv sync failed with a build_editable error, and the README's own documented install (pip install -e ".[dev]") fails identically on main (reproduced with plain pip before removing it). The app runs via streamlit run app.py and is never imported as an installed package (tests use pythonpath=["."]), so dependencies-only install is the behavior that actually works.
  • uv.lock (new): committed lockfile (uv 0.7.12, CPython 3.12).
  • requirements.txt kept, now generated (runtime-only export of uv.lock): two real consumers install from it — Streamlit Community Cloud (the live app) and the devcontainer updateContentCommand. Net change for Streamlit Cloud: full pinned closure (62 pins) instead of 8 floating >= ranges. Known gap (disclosed): Dependabot uv PRs update uv.lock only — regenerate requirements.txt when merging (command in the file header).
  • .github/dependabot.yml (new): uv ecosystem (GA; supports version AND security updates), weekly, grouped minor+patch, majors ignored (alerts unaffected). No github-actions entry — no workflows exist.
  • README: install/run/test commands updated to uv.

Version deltas

None against pins — the old requirements used >= lower bounds only; the lock resolves within those ranges.

Verification evidence (local, from this branch, fresh venv)

  • uv sync --frozen — clean from scratch (71 packages)
  • Full suite uv run pytest tests/: 109 passed
  • uv run python -m compileall app.py pages src config — clean
  • uv run ruff check .: 65 pre-existing findings in files this PR does not touch (ruff was configured but never CI-enforced); left as-is — lint cleanup is out of scope for the wave
  • Streamlit Cloud redeploy: not locally verifiable — the platform will pick up the generated requirements.txt on next deploy; worth watching the first redeploy after merge.

AI disclosure

Prepared with Claude Code (agentic conversion wave, sequential per-repo with local verification). Human review + merge required.

- pyproject.toml already existed; three changes, no constraint changes:
  1. [project.optional-dependencies] dev -> [dependency-groups] dev
     (same three entries, same constraints) so 'uv sync' installs test
     tooling by default.
  2. REMOVED the [build-system] hatchling block: it was broken on main -
     hatchling cannot detect any package to ship in this flat Streamlit
     layout (app.py/pages/src), so both 'uv sync' and the README's own
     documented install ('pip install -e ".[dev]"') fail with a
     build_editable error (reproduced with plain pip before removal).
     The app is run with 'streamlit run app.py', never imported as an
     installed package (tests use pythonpath=["."]), so it is a
     non-packaged app; without a build-system uv installs dependencies
     only, which is the behavior that actually works.
  3. Runtime dependency list untouched.
- uv.lock: NEW committed lockfile (uv 0.7.12 / CPython 3.12).
- requirements.txt: now a GENERATED runtime-only export of uv.lock
  ('uv export --format requirements-txt --no-dev --no-hashes') because
  two real consumers install from it: Streamlit Community Cloud (the
  live app at psd401-school-compare.streamlit.app) and the devcontainer
  updateContentCommand. Header documents regeneration. Net change for
  Streamlit Cloud: full pinned closure (62 pins) instead of 8 floating
  >= ranges.
- .github/dependabot.yml: NEW - uv ecosystem (GA, version + security
  updates), weekly, grouped minor+patch, majors ignored per org
  standard. Regenerate requirements.txt when merging uv update PRs
  (noted in the file). No github-actions entry: repo has no workflows.
- README.md: install -> 'uv sync --frozen'; run -> 'uv run streamlit
  run app.py'; tests -> 'uv run pytest tests/ -v'.

Verification (local, from this branch, fresh venv):
- 'uv sync --frozen' clean from scratch (71 packages)
- full suite 'uv run pytest tests/': 109 passed
- 'uv run python -m compileall app.py pages src config': clean
- 'uv run ruff check .': 65 pre-existing findings in files this change
  does not touch (ruff config existed but no CI ever enforced it);
  left as-is - lint cleanup is out of scope for the conversion wave
Copilot AI lite review requested due to automatic review settings August 21, 2026 18:11
@krishagel krishagel added the runtime-standard-wave Org runtime-standard conversion wave (bun/uv) label Aug 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

runtime-standard-wave Org runtime-standard conversion wave (bun/uv)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants