docs: document diff CLI and FastAPI backend in README
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
23
README.md
23
README.md
@@ -48,6 +48,29 @@ analyzeHeadless <projDir> <projName> -process PIKLIB8.dll \
|
|||||||
-postScript extract_engine_surface.py "$(pwd)/snapshots/PIKLIB8.snapshot.json"
|
-postScript extract_engine_surface.py "$(pwd)/snapshots/PIKLIB8.snapshot.json"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Diff engine (CLI)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python -m ams OLD.snapshot.json NEW.snapshot.json [--owner CMC_Animo] \
|
||||||
|
[--only types,methods,events,fields,layout] [--json]
|
||||||
|
```
|
||||||
|
Porównuje dwa snapshoty po 4 osiach (added/removed/changed) + wykrywa metody przeniesione
|
||||||
|
w hierarchii. Oś `struct_layout` jest sensowna tylko między wersjami tego samego kompilatora.
|
||||||
|
|
||||||
|
## Backend (FastAPI + katalog)
|
||||||
|
|
||||||
|
Modularny monolit nad SQLAlchemy — domyślnie SQLite (zero setupu), gotowy pod Postgres
|
||||||
|
przez `DATABASE_URL`. Pełny snapshot trzymany jest w bazie verbatim; diff czyta go z powrotem
|
||||||
|
przez `ams.diff`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pip install -e ".[api,dev]" # zależności
|
||||||
|
python -m ams.api.importer --game "Reksio i UFO" snapshots/PIKLIB8.dll.snapshot.json
|
||||||
|
uvicorn ams.api.app:create_app --factory --reload # serwer
|
||||||
|
```
|
||||||
|
Endpointy: `POST/GET /games`, `POST/GET /snapshots` (import deduplikowany po sha256),
|
||||||
|
`GET /diff?old=&new=[&owner=]`, `GET /health`. Testy: `pytest` (11, w tym integracyjne na golden pair).
|
||||||
|
|
||||||
## Format snapshotu
|
## Format snapshotu
|
||||||
|
|
||||||
`schema_version`, `binary{name,sha256,engine,compiler,factory_addr}`, oraz listy
|
`schema_version`, `binary{name,sha256,engine,compiler,factory_addr}`, oraz listy
|
||||||
|
|||||||
Reference in New Issue
Block a user