Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get install --no-install-recommends libyaml-dev libegl1-mesa libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-shape0 libxcb-cursor0 xserver-xephyr
sudo apt-get install --no-install-recommends libyaml-dev libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-shape0 libxcb-cursor0 xserver-xephyr
python -m pip install --upgrade pip
pip install flake8 pytest pytest-cov pytest-qt pytest-xvfb ipython anyio
- name: Lint with flake8
Expand Down
4 changes: 2 additions & 2 deletions plantcv/annotate/napari_label_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def napari_label_classes(img, classes=False, size=10,
for x in classes:
if x not in keys:
viewer.add_points(np.array([]), name=x, symbol='square',
edge_color=random.choice(color),
border_color=random.choice(color),
face_color=random.choice(color), size=size)
keys = napari_classes(viewer)

Expand All @@ -95,7 +95,7 @@ def napari_label_classes(img, classes=False, size=10,
else:
viewer.add_points(importdata[key], name=key,
symbol='square',
edge_color=random.choice(color),
border_color=random.choice(color),
face_color=random.choice(color),
size=size)

Expand Down
7 changes: 3 additions & 4 deletions tests/test_napari_classes.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import numpy as np
from plantcv.annotate import napari_classes
from plantcv.annotate import napari_classes, napari_open


def test_napari_classes(make_napari_viewer):
def test_napari_classes():
"""Test for PlantCV.Annotate"""
# Read in test data
viewer = make_napari_viewer(show=False)
img = np.zeros((100, 100))
coor = [(25, 25), (50, 50)]
viewer.add_image(img)
viewer = napari_open(img, show=False)
viewer.add_points(np.array(coor), symbol="square", name="total",
face_color="red", size=30)
viewer.add_points(np.array(coor), symbol="square", name="test",
Expand Down