rename node to dora-image-view
The repository, the Python package, the entrypoint and the manifest name all now agree. `plot` was carried over from the upstream opencv-plot node and no longer described anything here, so the module, the class and the environment variables follow the node: dora_plot/ -> dora_image_view/ dora_plot/plot.py -> dora_image_view/view.py Plot -> View PLOT_WIDTH/HEIGHT -> VIEW_WIDTH/HEIGHT --plot-width/-height -> --view-width/-height Breaking for anyone wiring `path: dora-plot` or setting PLOT_WIDTH; nothing is tagged yet.
This commit is contained in:
@@ -7,8 +7,8 @@ import numpy as np
|
||||
import pytest
|
||||
from PIL import Image
|
||||
|
||||
from dora_plot import bbox, decode
|
||||
from dora_plot.plot import Bboxes, Plot
|
||||
from dora_image_view import bbox, decode
|
||||
from dora_image_view.view import Bboxes, View
|
||||
|
||||
WIDTH, HEIGHT = 12, 8
|
||||
|
||||
@@ -123,13 +123,13 @@ def test_xywh_is_converted_to_corners():
|
||||
|
||||
|
||||
def test_headless_show_draws_without_a_window():
|
||||
plot = Plot(headless=True, text="hello")
|
||||
plot.bboxes = Bboxes(
|
||||
view = View(headless=True, text="hello")
|
||||
view.bboxes = Bboxes(
|
||||
corners=np.array([[1.0, 1.0, 5.0, 5.0]]),
|
||||
conf=np.array([0.9]),
|
||||
labels=np.array(["cat"]),
|
||||
)
|
||||
frame = np.zeros((32, 32, 3), dtype=np.uint8)
|
||||
|
||||
assert plot.show(frame) is False
|
||||
assert view.show(frame) is False
|
||||
assert frame.any(), "the overlays should have marked the frame"
|
||||
Reference in New Issue
Block a user