uv hygiene: build-system, uv.toml, version pins, auto-recovery hook
## [build-system] + drop uv pip install -e . (#58) Add `[build-system] requires=["uv_build"] build-backend="uv_build"` so `uv sync --dev` installs the project editably in one step. Remove `uv pip install -e .` and `uv python pin 3.13.11` from CI. ## uv.toml with link-mode=copy (#60) Create project-level `uv.toml` with `link-mode = "copy"` and `python-preference = "managed"`. Prevents .venv symlinks from pointing to /root/ when uv runs under different users. ## Align python version (#59) `.python-version` pinned to `3.13` (minor, let patch float) instead of platform-specific `cpython-3.13.12-linux-x86_64-gnu`. Removed the CI step that downgraded to 3.13.11. ## Pre-commit auto-recovery (#61) Hook now checks `uv run python -c 'import sys'` at the top — if the venv is broken, it runs `uv sync --dev` automatically before checks. ## .gitignore Add `.venv/` to prevent accidental venv commits. fix #58, fix #59, fix #60, fix #61
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +1,6 @@
|
||||
# Virtual environment
|
||||
.venv/
|
||||
|
||||
# Data directories (user data, not tracked)
|
||||
data/
|
||||
zotero/data/
|
||||
|
||||
@@ -1 +1 @@
|
||||
cpython-3.13.12-linux-x86_64-gnu
|
||||
3.13
|
||||
|
||||
@@ -13,9 +13,7 @@ steps:
|
||||
UV_LINK_MODE: copy
|
||||
UV_PROJECT_ENVIRONMENT: .venv
|
||||
commands:
|
||||
- uv python pin 3.13.11
|
||||
- uv sync --dev
|
||||
- uv pip install -e .
|
||||
- uv run ruff check src/ tests/ --output-format=concise
|
||||
- uv run ruff format --check src/ tests/
|
||||
|
||||
|
||||
@@ -38,6 +38,10 @@ dev = [
|
||||
"altair>=6.0.0",
|
||||
"pandas>=3.0.1",
|
||||
]
|
||||
[build-system]
|
||||
requires = ["uv_build>=0.7,<1"]
|
||||
build-backend = "uv_build"
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 88
|
||||
|
||||
|
||||
2
uv.lock
generated
2
uv.lock
generated
@@ -2040,7 +2040,7 @@ wheels = [
|
||||
[[package]]
|
||||
name = "stack"
|
||||
version = "0.1.0"
|
||||
source = { virtual = "." }
|
||||
source = { editable = "." }
|
||||
dependencies = [
|
||||
{ name = "databricks-cli" },
|
||||
{ name = "databricks-sdk" },
|
||||
|
||||
Reference in New Issue
Block a user