jze9 069ea848e2 Add SQLite results storage with a resilient multiprocess writer (Stage 5)
- storage/schema.py: `runs` table recording every evaluated configuration,
  feasible or not, with an honest infeasible_reason instead of dropping
  failures
- storage/database.py: WAL-mode SQLite, single-writer-over-a-queue pattern
  for safe concurrent writes from many sweep worker processes
- Testing with real multiprocessing.Process (not mocks) caught a genuine
  bug: a duplicate run_id raised inside the writer loop and killed the
  writer process, silently halting queue drainage for the rest of a
  sweep. Fixed by catching the insert error per-record and logging to
  stderr instead of crashing; added a regression test for it.
- Verified locally and inside the Docker image (43/43 tests both ways)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-06 20:21:21 +05:00

gausse

Симулятор и оптимизатор многоступенчатого электромагнитного ускорителя (coilgun) на реальных, доступных в рознице компонентах.

Полный план и чек-лист этапов — в PLAN.md.

Установка (Docker — основной способ)

docker compose build
docker compose run --rm --entrypoint pytest gausse -q   # тесты
docker compose run --rm gausse sweep --n 1000            # CLI (после реализации Этапа 6)

Результаты (SQLite, отчёты) должны сохраняться в ./results, примонтированный в контейнер как /app/results (см. docker-compose.yml), чтобы переживать пересборку образа.

Установка без Docker (локальная разработка)

python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest
Description
No description provided
Readme 730 KiB
v0.1.0 Latest
2026-07-13 01:38:07 +05:00
Languages
Python 98.9%
Shell 0.9%
Dockerfile 0.2%