Skip to content

ledmatrix-stocks: the safety harness never renders any content for this plugin #395

Description

@ChuckBuilds

What

check_plugin.py reports 8/8 PASS for ledmatrix-stocks, but every one carries the same warning:

[PASS]   64x32  stocks (empty warn: drew nothing but display() returned None, so the mode is not skipped)
[PASS]  128x32  stocks (empty warn: drew nothing ...)
[PASS]   64x64  stocks (fill warn: extent 0%x0%) (empty warn: drew nothing ...)
...

Every panel is blank, so the crash and overflow checks are running against an empty frame. Nothing about the actual ticker layout — fonts, colours, the inline chart, symbol widths — is being tested.

Why

Two reasons compound:

  1. No test/harness.json. The plugin ships none, so the harness has no quote data and self.stock_data stays empty.
  2. Frame 0 of a scroll is blank. Even with data, the ticker starts off-panel and slides in, so a single display() call renders nothing. I hit this while making the README screenshots — my first render was empty, and only advancing ~60 frames brought the text into view.

Suggested fix

A test/harness.json with a small recorded quote would fix (1). For (2), the harness would need to call display() more than once for scrolling plugins — the documentation renderer added exactly that in #369 as a frames option, and the same idea would apply here.

Both are worth having: this plugin has an inline chart renderer, five font choices and eight colour keys, none of which the harness currently sees.

I have a working fixture in docs/assets/ledmatrix-stocks/mock.json from #394 that could be reused as the harness fixture if that is the direction you want.

Scope

Likely affects any other scrolling plugin without harness data — worth a sweep once the approach is settled.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions