make raster layer backward compatible#305
Conversation
for more information, see https://pre-commit.ci
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #305 +/- ##
==========================================
- Coverage 78.08% 77.67% -0.42%
==========================================
Files 10 10
Lines 940 954 +14
Branches 144 146 +2
==========================================
+ Hits 734 741 +7
- Misses 169 174 +5
- Partials 37 39 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
EwoutH
left a comment
There was a problem hiding this comment.
Didn't review line by line, but sounds good!
|
Thanks @EwoutH ! Merging now. |
This is an attempt trying to make #299 less breaking.
Previously in our gis examples, we demonstrated how to subclass
Cell:But this will result in an error
TypeError: LakeCell.__init__() got an unexpected keyword argument 'rowcol'with the changes in #299.Therefore in mesa/mesa-examples#320 we update our gis example to update
Cellsubclass to:To make it less breaking, in this PR we update the
_initialize_cellsmethod in RasterLayer so that it works with both the old and the new ways of subclassingCell.In addition, we also removed the deprecation warning for
cell.possince it inherits Mesa.Agent and itsposis set toNoneby default, trigging the warning (see mesa/mesa-examples#320 (comment)).