fleettickets/pyproject.toml
david kiania dca2c94c75 fix: address valid findings from 20260618 bug report
Verified each finding against the code (+ profiled the 31k-row CSV sample);
implemented only the genuinely valid fixes:

- import_tickets.py: fold _record_meta into the upsert transaction so rows +
  snapshot meta commit atomically (BUG 2); guard _ts_from_key against
  regex-matching-but-invalid dates so the sort can't crash (BUG 11);
  extract_place now splits glued NW prefixes (~1.7k rows, e.g. NWKIAMBU→KIAMBU)
  and only drops a trailing '-<seg>' when it's a unit/instruction code, keeping
  real-word tails like '-MALL' (BUG 14). Scoped glued-split to NW only —
  CO/NE/SE begin real words (COAST/NEW/SEASONS) per the data.
- Dockerfile + pyproject.toml: install from pyproject (single source of truth)
  instead of mirroring deps; add build-system + py-modules so `pip install .`
  works for the flat-module layout (BUG 9).
- migrations/03_inc_columns.sql: document the eat_ts IMMUTABLE/tzdata footgun
  and the manual-recompute path (BUG 6).
- .gitignore: narrow *.json → *.local.json so real fixtures can be versioned;
  ignore build/ and *.egg-info/ (BUG 10).

Reclassified/skipped as invalid or by-design: BUG 1, 3, 4, 5, 7, 8, 12, 13.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 13:41:38 +03:00

32 lines
886 B
TOML

[build-system]
requires = ["setuptools>=61"]
build-backend = "setuptools.build_meta"
[project]
name = "fleettickets"
version = "0.1.0"
description = "Field-ops INC/CRQ ticket ingestion, geocoding, and read-schema for the FleetOps Tickets map"
requires-python = ">=3.12"
dependencies = [
"psycopg2-binary>=2.9.9", # DB driver
"requests>=2.32.3", # geocoder HTTP
"boto3>=1.34", # S3 (rustfs) access — no aws-CLI dependency
]
[project.optional-dependencies]
dev = [
"ruff>=0.4",
]
# Flat-module project (no package dir) — list the top-level modules explicitly so
# `pip install .` works (the Docker image installs the project to pull its deps).
[tool.setuptools]
py-modules = ["import_tickets", "shared", "run_migrations"]
[tool.uv]
managed = true
[tool.ruff]
target-version = "py312"
line-length = 100
lint.select = ["E", "W", "F", "B", "UP"]