Skip to content

Conversation

@TimMonko
Copy link
Member

@TimMonko TimMonko commented Dec 7, 2025

Description

Add sample data to ndevio, and use nImage.get_layer_data_tuples as a way to show it in action. A double-win, documentating API and sample data :)

files <100kb are placed in the git history
other files are distributed via zenodo and managed with pooch

Copilot Overview

This pull request introduces a comprehensive sample data module for the ndevio napari plugin, enabling the loading and testing of example datasets both locally and via remote download.

Sample Data Integration and Testing

  • Added a new src/ndevio/sampledata module implementing napari's sample data specification, with functions to load various example datasets (logo, neocortex, neuron labels, scratch assay, etc.), supporting both local and remote (Zenodo) sources via pooch. (src/ndevio/sampledata/__init__.py, src/ndevio/sampledata/_sample_data.py) [1] [2]
  • Added thorough tests for all sample data functions, including network-dependent tests marked with pytest.mark.network for remote datasets. (tests/test_sampledata.py)
  • Registered sample data commands and metadata in the plugin manifest, enabling sample datasets to appear in napari's sample data menu. (src/ndevio/napari.yaml) [1] [2]

Plugin Metadata and Dependency Updates

  • Updated plugin categories in napari.yaml to reflect new sample data and IO capabilities. (src/ndevio/napari.yaml)
  • Added pooch as a required dependency for remote sample data downloads. (pyproject.toml)
  • Added a network pytest marker for tests requiring network access. (pyproject.toml)

Logic and Formatting Improvements

  • Improved blending logic in _build_single_layer_tuple to set blending mode based on channel index and count. (src/ndevio/nimage.py)
  • Standardized time formatting in status/result messages throughout the utilities widget code for consistency. (src/ndevio/widgets/_utilities_container.py) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]

@codecov
Copy link

codecov bot commented Dec 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@TimMonko TimMonko merged commit ebf74a1 into ndev-kit:main Dec 7, 2025
12 checks passed
@TimMonko TimMonko deleted the feat/sampledata branch December 7, 2025 06:23
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.

1 participant