Skip to content

refactor(examples): rename pixels_per_unit to pricing_unit_size#28

Open
rickstaa wants to merge 1 commit into
mainfrom
rs/rename-pixels-per-unit
Open

refactor(examples): rename pixels_per_unit to pricing_unit_size#28
rickstaa wants to merge 1 commit into
mainfrom
rs/rename-pixels-per-unit

Conversation

@rickstaa

@rickstaa rickstaa commented Jun 15, 2026

Copy link
Copy Markdown
Member

What

Renames the user-facing pricing term pixels_per_unit to pricing_unit_size in examples/get_orchestrator_info.py, aligning the SDK with go-livepeer's flag rename (-pixelsPerUnit -> -pricingUnitSize, livepeer/go-livepeer#3942).

pixelsPerUnit is really just a pricing scale factor: the number of work units one quoted price covers (price_per_work_unit = pricePerUnit / pixelsPerUnit). "pixels" is transcoding-era legacy and is misleading for non-video / BYOC / general-runner workloads.

Changes

  • JSON output key pixels_per_unit -> pricing_unit_size (general + capability-specific pricing).
  • Text output ... wei per N pixel(s) -> ... wei per N work unit(s).

Compatibility

No wire changes. The generated proto field (PriceInfo.pixelsPerUnit) is read as-is and left unchanged; only the example's display labels and output dict key change.

Related

Summary by CodeRabbit

  • Bug Fixes
    • Updated pricing output formatting to standardize field names and unit labels across JSON and text display modes for consistency.

Align user-facing pricing terminology with go-livepeer, which renames the
-pixelsPerUnit flag to -pricingUnitSize. The value is the size of one
pricing unit in work units, not pixels; "pixels" is transcoding-era
legacy that confuses non-video / BYOC / general-runner workloads.

Output dict key pixels_per_unit -> pricing_unit_size and text "per N
pixel(s)" -> "per N work unit(s)". The wire/proto field
(PriceInfo.pixelsPerUnit) is read as-is and left unchanged.

Refs livepeer/go-livepeer#3942
Closes #27

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rickstaa rickstaa requested a review from j0sh as a code owner June 15, 2026 11:43
@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f9677d26-b790-41c8-92a7-5a9046d3587d

📥 Commits

Reviewing files that changed from the base of the PR and between cc31b56 and 3b87c22.

📒 Files selected for processing (1)
  • examples/get_orchestrator_info.py

📝 Walkthrough

Walkthrough

In examples/get_orchestrator_info.py, the pricing unit field key is renamed from pixels_per_unit to pricing_unit_size in the JSON output for both general and capability-specific pricing. The text output unit label changes from "pixel(s)" to "work unit(s)" and the local variable is renamed accordingly. The underlying wire field pixelsPerUnit is unchanged.

Changes

Pricing terminology rename

Layer / File(s) Summary
Rename pricing_unit_size in JSON and text output
examples/get_orchestrator_info.py
JSON keys pixels_per_unitpricing_unit_size in _orch_info_summary (general and capability-specific pricing). Text output variable renamed and unit label changed from "pixel(s)" to "work unit(s)" in _print_text_info for both general and capability-specific pricing lines.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐇 No more pixels in my warren,
Work units hop along the warren trail,
A name that fits the non-video tale,
pricing_unit_size now leads the way —
Renamed and ready, hip-hip-hooray! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: renaming pixels_per_unit to pricing_unit_size in the examples directory, which is the core focus of this pull request.
Linked Issues check ✅ Passed All coding requirements from issue #27 are met: JSON key renamed from pixels_per_unit to pricing_unit_size, text output changed from 'pixel(s)' to 'work unit(s)', and wire field pixelsPerUnit is read unchanged.
Out of Scope Changes check ✅ Passed All changes are within scope and directly address the linked issue #27 requirements; no hand-edits to generated proto files or unrelated changes detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rs/rename-pixels-per-unit

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Align pricing terminology: pixels_per_unit -> pricing_unit_size (track go-livepeer #3942)

1 participant