Skip to content

Conversation

@m-reuter
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented Dec 19, 2025

Codecov Report

❌ Patch coverage is 81.15942% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 44.53%. Comparing base (6b0882c) to head (8dd5736).
⚠️ Report is 16 commits behind head on main.

Files with missing lines Patch % Lines
lapy/polygon.py 83.58% 12 Missing and 10 partials ⚠️
lapy/tria_mesh.py 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #99      +/-   ##
==========================================
+ Coverage   42.89%   44.53%   +1.64%     
==========================================
  Files          15       15              
  Lines        2625     2746     +121     
  Branches      324      348      +24     
==========================================
+ Hits         1126     1223      +97     
- Misses       1387     1401      +14     
- Partials      112      122      +10     
Flag Coverage Δ
unittests 44.53% <81.15%> (+1.64%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new Polygon class to replace the previous functional polygon.resample API, providing a more comprehensive object-oriented interface for working with 2D and 3D polygon paths. The class encapsulates polygon data and offers methods for geometric computations, resampling, and smoothing operations.

Key changes:

  • Refactored polygon module from functional to object-oriented design with a Polygon class
  • Added geometric computation methods (length, centroid, area) beyond just resampling
  • Introduced Laplace and Taubin smoothing methods for polygon paths
  • Updated integration point in tria_mesh.py to use the new Polygon API
  • Comprehensive test suite covering initialization, geometric operations, resampling, and smoothing

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 12 comments.

File Description
lapy/polygon.py Complete refactor introducing the Polygon class with methods for geometric computations, resampling, and smoothing operations
lapy/utils/tests/test_polygon.py Extensive test suite rewritten to test the new Polygon class covering all major methods and edge cases
lapy/tria_mesh.py Updated to use new Polygon class API for path resampling in level_path method
lapy/init.py Added Polygon to package-level exports for public API access

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI commented Dec 19, 2025

@m-reuter I've opened a new pull request, #100, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Contributor

Copilot AI commented Dec 19, 2025

@m-reuter I've opened a new pull request, #101, to work on those changes. Once the pull request is ready, I'll request review from you.

m-reuter and others added 11 commits December 19, 2025 07:51
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: m-reuter <8526484+m-reuter@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: m-reuter <8526484+m-reuter@users.noreply.github.com>
Document edge case behavior and add tests for smoothing small polygons
@m-reuter m-reuter merged commit 180c251 into main Dec 19, 2025
28 checks passed
@m-reuter m-reuter deleted the polygon branch December 19, 2025 08:04
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.

2 participants