chore: add mise environment for Python 3.14
Pin Python 3.14 and uv, auto-create .venv, and expose install/test/validate/download tasks.
This commit is contained in:
1 parent
6f889d9ef1
commit
1f9bc4f44b
4 files changed
+66
-4
No files matched your search
@@ -0,0 +1 @@
|
||||
3.14
|
||||
+5
-4
@@ -94,12 +94,13 @@ In 03: AsylbLG, Unterbringung, Nettofiscal.
|
||||
|
||||
```bash
|
||||
cd /Volumes/SSD2TB/work/migranten
|
||||
source .venv/bin/activate # oder: python3 -m venv .venv && pip install -r requirements.txt
|
||||
python -m pytest tests -v
|
||||
python scripts/validate_kb.py
|
||||
python scripts/ingest/download_manifest.py --dry-run
|
||||
mise install # Python 3.14, uv, .venv, requirements.txt
|
||||
mise run check # Tests + Validator
|
||||
mise run download # Manifest-Dry-Run
|
||||
```
|
||||
|
||||
Ohne mise: `source .venv/bin/activate` bzw. `python3 -m venv .venv && pip install -r requirements.txt`, dann `python -m pytest tests -v` / `python scripts/validate_kb.py`.
|
||||
|
||||
Abhängigkeiten: pydantic, pyyaml, pytest, httpx, python-frontmatter, openpyxl, pdfplumber.
|
||||
|
||||
---
|
||||
|
||||
@@ -38,6 +38,17 @@ Faktenbasierte, hierarchische Knowledgebase. Jede Zahlenaussage trägt Quelle un
|
||||
|
||||
## Werkzeuge
|
||||
|
||||
Runtime und Tasks steuert [mise](https://mise.jdx.dev/) (`mise.toml`). Einmalig im Repo-Root:
|
||||
|
||||
```bash
|
||||
mise install # Python 3.14, uv, .venv, requirements.txt
|
||||
mise run check # Tests + Validator
|
||||
```
|
||||
|
||||
Weitere Tasks: `mise run test`, `mise run validate`, `mise run download` (Dry-Run), `mise run download-raw`.
|
||||
|
||||
Ohne mise:
|
||||
|
||||
```bash
|
||||
python -m venv .venv
|
||||
source .venv/bin/activate
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
min_version = "2024.9.5"
|
||||
|
||||
[tools]
|
||||
python = "3.14"
|
||||
uv = "0.11"
|
||||
|
||||
[env]
|
||||
PROJECT_NAME = "{{ config_root | basename }}"
|
||||
# Repo liegt auf einem anderen Volume als der uv-Cache → Copy statt Hardlink
|
||||
UV_LINK_MODE = "copy"
|
||||
# Virtualenv automatisch anlegen und beim Betreten des Projektordners aktivieren
|
||||
_.python.venv = { path = ".venv", create = true }
|
||||
|
||||
[hooks]
|
||||
postinstall = "mise run install"
|
||||
|
||||
[tasks.install]
|
||||
description = "Python-Abhängigkeiten aus requirements.txt installieren"
|
||||
alias = "i"
|
||||
run = """
|
||||
if command -v uv >/dev/null 2>&1; then
|
||||
uv pip install -r requirements.txt
|
||||
else
|
||||
python -m ensurepip --upgrade 2>/dev/null || true
|
||||
python -m pip install -r requirements.txt
|
||||
fi
|
||||
"""
|
||||
|
||||
[tasks.test]
|
||||
description = "pytest-Suite"
|
||||
alias = "t"
|
||||
run = "python -m pytest tests -v"
|
||||
|
||||
[tasks.validate]
|
||||
description = "KB-Frontmatter, Series, Quellen und ID-Refs prüfen"
|
||||
alias = "v"
|
||||
run = "python scripts/validate_kb.py"
|
||||
|
||||
[tasks.download]
|
||||
description = "Rohdateien aus raw/MANIFEST.yaml prüfen (Dry-Run)"
|
||||
run = "python scripts/ingest/download_manifest.py --dry-run"
|
||||
|
||||
[tasks.download-raw]
|
||||
description = "Rohdateien aus raw/MANIFEST.yaml nach raw/ laden"
|
||||
run = "python scripts/ingest/download_manifest.py"
|
||||
|
||||
[tasks.check]
|
||||
description = "Tests + KB-Validator"
|
||||
depends = ["test", "validate"]
|
||||
Reference in new issue
Block a user