pysal / momepy

Urban Morphology Measuring Toolkit
https://docs.momepy.org
BSD 3-Clause "New" or "Revised" License
496 stars 59 forks source link

_describe API refactoring #584

Closed u3ks closed 5 months ago

u3ks commented 6 months ago

Functional blockcount using groupby.

Potentially, it could be reimplemented with two calls to describe_reached:

  1. one with to aggregate the values on the neighbours graph 2.one to aggregate the areas then return 1 / 2

Or it could be left to the user.

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 96.63866% with 4 lines in your changes missing coverage. Please review.

Project coverage is 97.9%. Comparing base (4037c70) to head (74494f0). Report is 84 commits behind head on main.

Files with missing lines Patch % Lines
momepy/functional/_diversity.py 91.5% 4 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/pysal/momepy/pull/584/graphs/tree.svg?width=650&height=150&src=pr&token=VNn0WR5JWT&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal)](https://app.codecov.io/gh/pysal/momepy/pull/584?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal) ```diff @@ Coverage Diff @@ ## main #584 +/- ## ======================================= + Coverage 97.4% 97.9% +0.6% ======================================= Files 26 37 +11 Lines 4328 5869 +1541 ======================================= + Hits 4214 5747 +1533 - Misses 114 122 +8 ``` | [Files with missing lines](https://app.codecov.io/gh/pysal/momepy/pull/584?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal) | Coverage Δ | | |---|---|---| | [momepy/functional/tests/test\_diversity.py](https://app.codecov.io/gh/pysal/momepy/pull/584?src=pr&el=tree&filepath=momepy%2Ffunctional%2Ftests%2Ftest_diversity.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal#diff-bW9tZXB5L2Z1bmN0aW9uYWwvdGVzdHMvdGVzdF9kaXZlcnNpdHkucHk=) | `100.0% <100.0%> (ø)` | | | [momepy/functional/tests/test\_intensity.py](https://app.codecov.io/gh/pysal/momepy/pull/584?src=pr&el=tree&filepath=momepy%2Ffunctional%2Ftests%2Ftest_intensity.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal#diff-bW9tZXB5L2Z1bmN0aW9uYWwvdGVzdHMvdGVzdF9pbnRlbnNpdHkucHk=) | `100.0% <100.0%> (ø)` | | | [momepy/intensity.py](https://app.codecov.io/gh/pysal/momepy/pull/584?src=pr&el=tree&filepath=momepy%2Fintensity.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal#diff-bW9tZXB5L2ludGVuc2l0eS5weQ==) | `99.5% <100.0%> (+<0.1%)` | :arrow_up: | | [momepy/tests/test\_intensity.py](https://app.codecov.io/gh/pysal/momepy/pull/584?src=pr&el=tree&filepath=momepy%2Ftests%2Ftest_intensity.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal#diff-bW9tZXB5L3Rlc3RzL3Rlc3RfaW50ZW5zaXR5LnB5) | `100.0% <100.0%> (ø)` | | | [momepy/functional/\_diversity.py](https://app.codecov.io/gh/pysal/momepy/pull/584?src=pr&el=tree&filepath=momepy%2Ffunctional%2F_diversity.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal#diff-bW9tZXB5L2Z1bmN0aW9uYWwvX2RpdmVyc2l0eS5weQ==) | `96.4% <91.5%> (ø)` | |
martinfleis commented 5 months ago

This will be superseded bylibpysal.Graph.describe, correct?

u3ks commented 5 months ago

yes, i need to add the decorator and fix some of the failing tests though.

jGaboardi commented 5 months ago

Anything blocking this merge?

martinfleis commented 5 months ago

@jGaboardi I was just waiting for CI to finish :)