livepeer / livepeer/livepeer-python-gateway
Align pricing terminology: pixels_per_unit -> pricing_unit_size (track go-livepeer #3942)
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 1
- Fork
- 7
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Summary
Align the SDK's user-facing pricing terminology with go-livepeer, which is renaming the -pixelsPerUnit flag to -pricingUnitSize (see livepeer/go-livepeer#3942).
Background
pixelsPerUnit is really just a pricing scale factor: it is the number of work units that one quoted price covers, so price_per_work_unit = pricePerUnit / pixelsPerUnit. The "pixels" name is transcoding-era legacy and is confusing for non-video / BYOC / general-runner workloads, where there are no pixels.
go-livepeer#3942 introduces -pricingUnitSize as the primary flag and keeps -pixelsPerUnit as a deprecated alias. The wire/proto field (PriceInfo.pixelsPerUnit) is intentionally left unchanged for compatibility.
What to change in this SDK
User-facing terminology only — the generated proto field stays pixelsPerUnit:
examples/get_orchestrator_info.py- JSON dict key
pixels_per_unit->pricing_unit_size(snake_case analog ofpricingUnitSize). - Text output
... wei per N pixel(s)->... wei per N work unit(s). - Keep reading the wire field via
info.price_info.pixelsPerUnit.
- JSON dict key
Out of scope
src/livepeer_gateway/lp_rpc_pb2.pyis generated from the proto and carries the wire fieldpixelsPerUnit; do not hand-edit it.
Related
- go-livepeer#3942 (flag rename)
- In-flight PR #20 (
ja/live-runner) introduced a relatedunit_scaleconcept; it should adopt the samepricing_unit_sizename for consistency.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia da examples/get_orchestrator_info.py e analizza come viene letto info.price_info.pixelsPerUnit. Rinomina la chiave JSON visibile all’utente e la terminologia relativa ai pixel rispettivamente in pricing_unit_size e unità di lavoro, lasciando invariato src/livepeer_gateway/lp_rpc_pb2.py; il lavoro è completato quando l’esempio utilizza la nuova terminologia senza modificare il campo wire.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- api
- Tipo di issue
- Refactoring
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Stato di attività
- Tranquilla
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 68/100