feat(ops): render_html draws any carrier from its adapter and coordinates, and DimArray gets _repr_html_
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- jupyter, python
- Domain
- developer-experience
Research direction
Read pipekit_ops/carriers/_adapters.py and the referenced docs/design/coordax_carriers.md pattern 6, then check the DimArray implementation and existing display tests. Implement the renderer in pipekit_ops/carriers/_display.py using the adapter and coordinates, and connect DimArray._repr_html_ to it. Done means the NumPy and JAX snapshots pass, traced carriers are identified without reading values, and lint and type checks pass.
Written by the indexing model from the issue text.
Description
Problem / Request
Add pipekit_ops.carriers.render_html(x), which draws any registered carrier as an HTML table (dims with sizes, dtype, backend, then one row per coordinate), and give DimArray a _repr_html_ that calls it.
Motivation
The prototype found no _repr_html_, __treescope_repr__ or _repr_mimebundle_ on any of the three carriers; Jupyter shows only DimArray[band x](3, 4), labels=['band']. coordax renders its Field through treescope (CP-D7). One renderer that reads only the adapter and the coordinates keeps the three carriers consistent.
Proposed API
# proposed (CP-D7)
# any carrier → an HTML string; imports nothing
def render_html(x: Any) -> str: ...
class DimArray:
def _repr_html_(self) -> str:
return render_html(self)
A coordinate may add a _repr_row_() -> str for its own row; otherwise its repr is used.
Reuse
- The adapter registry in
pipekit_ops/carriers/_adapters.pyfor dims, data and labels.
References & Existing Code
- Design:
docs/design/coordax_carriers.mdin jejjohnson/geostack (merged in jejjohnson/geostack#368), pattern 6 and question CP-O3.
Implementation Steps
-
pipekit_ops/carriers/_display.py. -
DimArray._repr_html_.
Definition of Done
- A snapshot test of the HTML for a labelled
DimArrayon NumPy and on JAX data. - Rendering a traced carrier says so instead of reading values.
- The module imports nothing beyond the standard library.
- Lint, type check and tests green.
Relationships
- Parent: jejjohnson/geostack#369
- Blocked by: #406
- Blocks: jejjohnson/geotoolz#852, jejjohnson/gridax#630
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- Avg merge
- 3h 50m
- Merged PRs (30d)
- 143
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from jejjohnson/pipekit
-
area:code layer:0-primitives priority:p2 type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
jejjohnson/pipekit#296 ·
Maintainers usually reply within 1 day
-
area:code type:feature
Difficulty 3/5 1-2 days Newbie friendliness 57/100
jejjohnson/pipekit#411 ·
Maintainers usually reply within 1 day
-
area:code type:feature
Difficulty 5/5 Over a week Newbie friendliness 38/100
jejjohnson/pipekit#409 ·
Maintainers usually reply within 1 day
-
area:code type:feature
Difficulty 3/5 1-2 days Newbie friendliness 75/100
jejjohnson/pipekit#408 ·
Maintainers usually reply within 1 day
-
area:code type:feature
Difficulty 4/5 3-5 days Newbie friendliness 48/100
jejjohnson/pipekit#407 ·
Maintainers usually reply within 1 day
All issues in jejjohnson/pipekit
Similar issues
-
bug(operator): VolterraOperator built inside jax.jit with a concrete decay raises TracerBoolConversionErrorPossibly taken @jejjohnson claimed this today. Opentype:bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
jejjohnson/integrix#144 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
finos/ai-governance-framework#459 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
autowarefoundation/autoware_carla_scenario#2963 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
freelawproject/litigant-portal#1307 ·
Maintainers usually reply within 2 days
-
type/bug
Difficulty 1/5 Under an hour Newbie friendliness 86/100
h2oai/h2o-llmstudio#1163 ·
Maintainers usually reply within 1 day