api.scripts.u3000_price_grid¶
UltiMate 3000 buy-back price grid, scraped from the Google Sheet “Offre de reprise U3000 Rewake”.
Triggered by the sheet itself (Apps Script onChange -> POST /webhooks/u3000-price-grid, debounced) or on demand from app.rewake.fr. The accepted grid is this script’s run snapshot, which api/services/ultimate3000/pricing.py reads; a sheet that doesn’t parse is a failed run and the previous grid stays live.
- Sheet format (first sheet; only the first two grids, everything after is ignored):
a header row with a “Module” cell and two price cells (”…fonctionnel”, “…sinon”), then module rows, 5 zones separated by empty filled (gray) rows, in pricing.CATEGORIES order: the zone decides the category, the “Catégorie” column is ignored. The first empty unfilled (white) row ends the grid. Grid 1 = post 2013, grid 2 = pre 2013.
Attributes¶
Classes¶
Functions¶
|
Returns ({grid: {category: {model: [price ok, price otherwise]}}}, errors). Rows are 1-based |
|
Human-readable changes between two parsed grids. |
|
Module Contents¶
- api.scripts.u3000_price_grid.Cell¶
- api.scripts.u3000_price_grid.GRIDS = ('post_2013', 'pre_2013')¶
- api.scripts.u3000_price_grid.GRID_LABELS¶
- api.scripts.u3000_price_grid.SHEET_RANGE = 'A1:J300'¶
- api.scripts.u3000_price_grid.parse(rows: list[list[Cell]]) tuple[dict[str, Any], list[str]]¶
Returns ({grid: {category: {model: [price ok, price otherwise]}}}, errors). Rows are 1-based in the messages, as in the sheet.
- api.scripts.u3000_price_grid.diff(old: dict[str, Any], new: dict[str, Any]) list[str]¶
Human-readable changes between two parsed grids.
- class api.scripts.u3000_price_grid.U3000PriceGrid¶
- name = 'u3000_price_grid'¶
- schedule = None¶
- is_configured() bool¶
- run(previous_snapshot: dict[str, Any] | None = None, report_stage: api.scripts.base.StageReporter = lambda stage: ..., **kwargs: Any) tuple[api.scripts.base.ScriptResult, dict[str, Any] | None]¶