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
Open
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
uv conversion (org runtime standard, standards/02 — CIO decision 2026-08-18)
What changed
pyproject.toml(existed already; no dependency-constraint changes):[project.optional-dependencies] dev→[dependency-groups] dev(same three entries/constraints) souv syncinstalls test tooling by default.[build-system]hatchling block. Hatchling cannot detect a package to ship in this flat Streamlit layout (app.py/pages//src/) —uv syncfailed with abuild_editableerror, 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 viastreamlit run app.pyand is never imported as an installed package (tests usepythonpath=["."]), so dependencies-only install is the behavior that actually works.uv.lock(new): committed lockfile (uv 0.7.12, CPython 3.12).requirements.txtkept, now generated (runtime-only export ofuv.lock): two real consumers install from it — Streamlit Community Cloud (the live app) and the devcontainerupdateContentCommand. Net change for Streamlit Cloud: full pinned closure (62 pins) instead of 8 floating>=ranges. Known gap (disclosed): Dependabot uv PRs updateuv.lockonly — regeneraterequirements.txtwhen merging (command in the file header)..github/dependabot.yml(new):uvecosystem (GA; supports version AND security updates), weekly, grouped minor+patch, majors ignored (alerts unaffected). No github-actions entry — no workflows exist.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)uv run pytest tests/: 109 passeduv run python -m compileall app.py pages src config— cleanuv 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 waverequirements.txton 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.