refactor(db): extract shared DB module from duplicated patterns

Create tooling/db/common.py with resolve_db_path(), load_config(),
get_connection(), and ensure_venv(). Update ticket, sprint,
sqlite_connector.py, and decisions_sync.py to import from common
instead of duplicating. Fixes pre-existing NameError in
decisions_sync.py (missing import os). Add pyproject.toml with
ruff config (ruff==0.15.9, CVE-clean) and dev dependencies.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-05 09:39:46 +02:00
co-authored by Claude Opus 4.6
parent 4dd866c9ad
commit d86ebada8d
6 changed files with 130 additions and 94 deletions
+26
View File
@@ -0,0 +1,26 @@
[project]
name = "settled-reach-tooling"
version = "0.1.0"
requires-python = ">=3.11"
dependencies = [
"PyYAML",
"jsonschema",
"numpy",
]
[project.optional-dependencies]
dev = [
# ruff 0.15.9 — checked clean against NVD + OSV, no CVEs on record (2026-04-05)
"ruff==0.15.9",
]
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
# E9xx: Runtime syntax/encoding errors
# F401: Unused imports
# F811: Redefinition of unused name
# F821: Undefined name (catches missing imports like bare `os`)
select = ["E9", "F401", "F811", "F821"]