breaking: NetworkGrid: modify get_neighbors and create get_neighborhood#1542
breaking: NetworkGrid: modify get_neighbors and create get_neighborhood#1542
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1542 +/- ##
===========================================
+ Coverage 80.52% 91.30% +10.77%
===========================================
Files 18 15 -3
Lines 1248 1311 +63
Branches 240 229 -11
===========================================
+ Hits 1005 1197 +192
+ Misses 205 80 -125
+ Partials 38 34 -4
☔ View full report in Codecov by Sentry. |
|
It would be less confusing to do this all at once for 2.0, instead of defining a new temporary API |
|
ok @rht, not it should be ready to be merged in 2.0 |
|
I have rebased the PR, resolving the merge conflicts, and create mesa/mesa-examples#40 for the examples update. Merging; thank you @Tortar. |
NetworkGrid didn't have a get_neighbors function which returns the adjacent agents before this PR, but I think it's an important part of the API, unfortunately it has already a get_neighbors function which returns ids, but clearly changing it would be a breaking change.
I think if we want to break it in 2.0 we could rename get_neighbors to get_neighborhood and rename this function to get_neighbors. Is it better to include this PR now as it is and make a separate PR with the breaking change or modify this one with the proposed changes?