Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add area endpoint support #49

Merged
merged 24 commits into from
Nov 4, 2024

Conversation

mpiannucci
Copy link
Contributor

  • Add area endpoint
  • Move selection logic to its own module
  • add tests for selection

xpublish_edr/select.py Outdated Show resolved Hide resolved
xpublish_edr/select.py Outdated Show resolved Hide resolved
xpublish_edr/select.py Outdated Show resolved Hide resolved
@mpiannucci
Copy link
Contributor Author

pre-commit.ci autofix

xpublish_edr/select.py Outdated Show resolved Hide resolved
@mpiannucci
Copy link
Contributor Author

pre-commit.ci autofix

Copy link

codecov bot commented Oct 24, 2024

Codecov Report

Attention: Patch coverage is 74.22680% with 25 lines in your changes missing coverage. Please review.

Project coverage is 81.64%. Comparing base (434d6b9) to head (83458f3).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
xpublish_edr/select.py 72.30% 18 Missing ⚠️
xpublish_edr/plugin.py 77.41% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #49      +/-   ##
==========================================
+ Coverage   79.02%   81.64%   +2.62%     
==========================================
  Files           6        7       +1     
  Lines         205      267      +62     
==========================================
+ Hits          162      218      +56     
- Misses         43       49       +6     

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

@mpiannucci
Copy link
Contributor Author

mpiannucci commented Oct 24, 2024

Love when code coverage goes down from adding more tests lol

Copy link
Member

@abkfenris abkfenris left a comment

Choose a reason for hiding this comment

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

I think this generally looks good, but select.py and it's functions are a little more complicated to follow than it feels like it should be for the length of the file (especially thinking ahead if we add other geometry types).

I think it would be easier to follow if each geometry had it's own file, partially because you could more easily compare between geometries, and it would separate geometry specific logic from common shared logic.

- select_common.py
- area.py
- position.py
- query_params.py

Some tweaks of names might help as well.

xpublish_edr/plugin.py Outdated Show resolved Hide resolved
xpublish_edr/plugin.py Outdated Show resolved Hide resolved
xpublish_edr/plugin.py Outdated Show resolved Hide resolved
@mpiannucci
Copy link
Contributor Author

mpiannucci commented Nov 3, 2024

Agree with this feedback, especially because I want to add multipoint support next which further complicates things

I'll do some cleaning before merging :)

@mpiannucci
Copy link
Contributor Author

@abkfenris Let me know how you feel about this reorg

@abkfenris
Copy link
Member

@mpiannucci Much easier to follow, thank you.

@mpiannucci mpiannucci merged commit 701ef4d into xpublish-community:main Nov 4, 2024
21 checks passed
@mpiannucci mpiannucci deleted the matt/polygon branch November 4, 2024 14:43
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.

3 participants