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

Geometries should be immutable and hashable #128 (Sourcery refactored) #178

Conversation

sourcery-ai[bot]
Copy link

@sourcery-ai sourcery-ai bot commented Oct 28, 2023

Pull Request #177 refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

NOTE: As code is pushed to the original Pull Request, Sourcery will
re-run and update (force-push) this Pull Request with new refactorings as
necessary. If Sourcery finds no refactorings at any point, this Pull Request
will be closed automatically.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Review changes via command line

To manually merge these changes, make sure you're on the 128-geometries-should-be-immutable-and-hashable branch, then run:

git fetch origin sourcery/128-geometries-should-be-immutable-and-hashable
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

@sourcery-ai sourcery-ai bot requested a review from cleder October 28, 2023 13:39
@watermelon-copilot-for-code-review

@what-the-diff
Copy link

what-the-diff bot commented Oct 28, 2023

PR Summary

  • Update in Initial Checks and Setup of Geometry
    In the geometry setup file, this PR makes improvements to how it checks and deals with 'holes' in the system. Earlier, there was an ambiguity in understanding how these were being checked. This update ensures that the program only proceeds if there are 'holes' detected.

  • Removal of Unused Variables and Enhancements
    As a measure for code clean up, the PR removes an unused variable that was defined previously. It introduces a more streamlined process to deal with 'holes'. The enhancements make the process of dealing with the system's 'holes' more efficient.

@codecov
Copy link

codecov bot commented Oct 28, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e5e9e04) 100.00% compared to head (731a29e) 100.00%.

Additional details and impacted files
@@                                Coverage Diff                                @@
##           128-geometries-should-be-immutable-and-hashable      #178   +/-   ##
=================================================================================
  Coverage                                           100.00%   100.00%           
=================================================================================
  Files                                                   21        21           
  Lines                                                 2314      2312    -2     
=================================================================================
- Hits                                                  2314      2312    -2     
Files Coverage Δ
pygeoif/geometry.py 100.00% <100.00%> (ø)

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

@ghost
Copy link

ghost commented Oct 28, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@watermelon-copilot-for-code-review

@sourcery-ai sourcery-ai bot force-pushed the sourcery/128-geometries-should-be-immutable-and-hashable branch from 2589d12 to 731a29e Compare October 28, 2023 15:09
interiors: Tuple[LinearRing, ...] = ()
if holes:
interiors = tuple(LinearRing(hole) for hole in holes)
interiors = tuple(LinearRing(hole) for hole in holes) if holes else ()
Copy link
Author

Choose a reason for hiding this comment

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

Function Polygon.__init__ refactored with the following changes:

@watermelon-copilot-for-code-review

Base automatically changed from 128-geometries-should-be-immutable-and-hashable to develop October 28, 2023 15:12
@sourcery-ai sourcery-ai bot closed this Oct 28, 2023
@sourcery-ai sourcery-ai bot deleted the sourcery/128-geometries-should-be-immutable-and-hashable branch October 28, 2023 15:12
@cleder cleder restored the sourcery/128-geometries-should-be-immutable-and-hashable branch October 28, 2023 15:13
@cleder cleder deleted the sourcery/128-geometries-should-be-immutable-and-hashable branch March 20, 2024 12:39
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.

0 participants