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

Implementation of distance on GeoSeries #110

Merged
merged 6 commits into from
Sep 20, 2022

Conversation

mchalecki
Copy link
Contributor

  • Implementation of 1:1 distance on GeoSeries
  • Fix deprecated in ffi acquire_gil
  • Always return python GeoSeries when using getitem
  • Fix typing in test fixture

…e_gil. Always return python GeoSeries when using getitem
@mchalecki
Copy link
Contributor Author

I had all precommit passed

Trim Trailing Whitespace.................................................Passed
Fix End of Files.........................................................Passed
black....................................................................Passed
isort....................................................................Passed
pyupgrade................................................................Passed
flake8...................................................................Passed

@kylebarron
Copy link
Member

kylebarron commented Sep 18, 2022

I had all precommit passed

Yeah pre-commit only runs the python lints at the moment. The rust lints are manual through cargo fmt --all (formatting) and cargo clippy --all --all-features --tests (lints). These should be documented and/or added to pre-commit but I haven't gotten to that yet

Copy link
Member

@kylebarron kylebarron left a comment

Choose a reason for hiding this comment

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

In #42 @stuartlynn put up a proposal for handling both pairwise Series-Series and broadcasted Series-Scalar function handling. In the future we'll want distance to support other being a scalar as well, but I don't think that's a blocker; it's fine to have series-series support only

@mchalecki
Copy link
Contributor Author

In #42 @stuartlynn put up a proposal for handling both pairwise Series-Series and broadcasted Series-Scalar function handling. In the future we'll want distance to support other being a scalar as well, but I don't think that's a blocker; it's fine to have series-series support only

I agree. It didn't have an idea how to implement second behavior so i started with this implemented one in geo, the one that geopandas also uses

@mchalecki
Copy link
Contributor Author

Can I add in black line length 120 instead of default 80?

@kylebarron
Copy link
Member

kylebarron commented Sep 19, 2022

Can I add in black line length 120 instead of default 80?

I'd prefer to stay as close as possible to the code style of upstream py-polars as possible, and they use the default of 88 I believe.

@kylebarron kylebarron merged commit e71001a into geopolars:master Sep 20, 2022
@stuartlynn
Copy link
Collaborator

In #42 @stuartlynn put up a proposal for handling both pairwise Series-Series and broadcasted Series-Scalar function handling. In the future we'll want distance to support other being a scalar as well, but I don't think that's a blocker; it's fine to have series-series support only

I agree. It didn't have an idea how to implement second behavior so i started with this implemented one in geo, the one that geopandas also uses

Hey @mchalecki ! Thanks for this, hoping to finish up that proposal this week and then implement it for each of the functions we already have. Will add this one to the list!

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