Skip to content

Draw fixed shapes#56

Merged
zoccoler merged 16 commits intoBiAPoL:mainfrom
zoccoler:draw_fixed_shapes
Oct 23, 2025
Merged

Draw fixed shapes#56
zoccoler merged 16 commits intoBiAPoL:mainfrom
zoccoler:draw_fixed_shapes

Conversation

@zoccoler
Copy link
Contributor

This pull request introduces a new functionality for drawing fixed-size shapes at specified coordinates, improvements to the cropping workflow, and modernization of the project configuration. The plugin now supports drawing rectangles and ellipses of fixed dimensions at points, and adopts the latest standards for napari plugin packaging and distribution.

New features and functionality:

  • Added draw_fixed_shapes function and widget, allowing users to draw rectangles or ellipses of fixed size at points layer coordinates. This includes both the implementation (draw_fixed_shapes in napari_crop/_function.py) and comprehensive tests for 2D and 3D cases. [1] [2]
  • Registered the new widget and function in the napari manifest (napari.yaml), making it available in the napari UI.

Enhancements to cropping workflow:

  • Updated crop_region to support returning cropped data as numpy arrays (as_numpy parameter) and optionally applying translation (translate parameter). Improved the function docstring for clarity. [1] [2] [3]

Project configuration modernization:

  • Migrated project metadata and configuration from setup.cfg and setup.py to a modern pyproject.toml, supporting dynamic versioning and improved packaging standards. [1] [2] [3]
  • Updated test environments in tox.ini to support Python 3.10, 3.11, and 3.12, dropping older Python versions.

Documentation improvements:

  • Updated the README to announce a call for maintainers, clarify usage instructions, and showcase the new fixed-shape drawing feature with an animated demo. [1] [2]

Codebase cleanup and refactoring:

  • Removed legacy napari plugin registration code and refactored imports in napari_crop/_dock_widgets.py and napari_crop/__init__.py to streamline widget and function exposure. [1] [2]

@codecov
Copy link

codecov bot commented Oct 22, 2025

Codecov Report

❌ Patch coverage is 93.84615% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.21%. Comparing base (85c3a4f) to head (c43d6d3).

Files with missing lines Patch % Lines
napari_crop/__init__.py 66.66% 2 Missing ⚠️
napari_crop/_function.py 91.30% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #56      +/-   ##
==========================================
+ Coverage   87.00%   88.21%   +1.21%     
==========================================
  Files           6        6              
  Lines         331      382      +51     
==========================================
+ Hits          288      337      +49     
- Misses         43       45       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Replaces explicit dependencies with 'testing' extras in tox.ini and enables isolated builds.
Adds Windows OpenGL installation, updates test and deploy steps to use newer actions and tools, removes unnecessary test dependencies, and switches to 'python -m build' for packaging.
@zoccoler zoccoler merged commit d6b0ba8 into BiAPoL:main Oct 23, 2025
10 checks passed
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