Skip to content

🐛 Fix Invalid Geometry in JSON Outputs#1057

Merged
shaneahmed merged 8 commits into
developfrom
bug-fix-json-output
Apr 29, 2026
Merged

🐛 Fix Invalid Geometry in JSON Outputs#1057
shaneahmed merged 8 commits into
developfrom
bug-fix-json-output

Conversation

@shaneahmed
Copy link
Copy Markdown
Member

@shaneahmed shaneahmed commented Apr 24, 2026

  • Replace direct Polygon construction with validated geometry via feature2geometry and make_valid_poly.
  • Ensure all shapes are repaired and valid before JSON export.
  • Prevents malformed or invalid polygons from breaking QuPath JSON outputs.

- Validate Shapely objects before saving to JSON based outputs.
@shaneahmed shaneahmed requested a review from Jiaqi-Lv April 24, 2026 15:40
@shaneahmed shaneahmed added the bug Something isn't working label Apr 24, 2026
@shaneahmed shaneahmed added this to the Release 2.0.2 milestone Apr 24, 2026
@shaneahmed shaneahmed assigned shaneahmed and unassigned shaneahmed Apr 24, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.88%. Comparing base (36ecfa6) to head (f6107f7).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1057      +/-   ##
===========================================
- Coverage    99.88%   99.88%   -0.01%     
===========================================
  Files           85       85              
  Lines        11576    11572       -4     
  Branches      1513     1513              
===========================================
- Hits         11563    11559       -4     
  Misses           6        6              
  Partials         7        7              

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

@shaneahmed
Copy link
Copy Markdown
Member Author

I have checked the outputs on QuPath. The bug is fixed now.

@shaneahmed shaneahmed changed the title 🐛 Fix JSON Outputs 🐛 Fix Invalid Geometry in JSON Outputs Apr 28, 2026
Copy link
Copy Markdown
Collaborator

@Jiaqi-Lv Jiaqi-Lv left a comment

Choose a reason for hiding this comment

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

I have tried it and it works.

@shaneahmed shaneahmed merged commit 6fc8a2e into develop Apr 29, 2026
17 checks passed
@shaneahmed shaneahmed deleted the bug-fix-json-output branch April 29, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants