Merged
Conversation
quaquel
reviewed
Feb 18, 2026
quaquel
reviewed
Feb 19, 2026
quaquel
reviewed
Feb 19, 2026
quaquel
reviewed
Feb 19, 2026
test_gis_examples.py
Outdated
| import pytest | ||
| from mesa import Model | ||
|
|
||
| pytest.importorskip("mesa_geo") |
Contributor
Author
There was a problem hiding this comment.
Sorry for this change it was meant to be local. The local gis tests fail (likely because incomplete migration in mesa-geo). I will raise a PR there to solve that.
quaquel
reviewed
Feb 19, 2026
quaquel
reviewed
Feb 19, 2026
Member
quaquel
left a comment
There was a problem hiding this comment.
A few minor remarks remaining
one overarching request: please keep PRs focussed on a specific fix. There are quite a few other changes here that are not strictly related to removing mesa.space. This makes reviewing for us harder.
Harshini2411
pushed a commit
to Harshini2411/mesa-examples
that referenced
this pull request
Mar 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR removes remaining
mesa.spaceusage in examples so they work with newer Mesa APIs, and updates the Dining Philosophers example to use the new discrete-space API directlyBug / Issue
Fixes #332
mesa.spacehas been deprecated, but several examples still referenced it directly.Implementation
Replaced
mesa.spaceimports/usages with supported APIs:model.pyPropertyLayerimport changed tomesa.discrete_space.PropertyLayerPropertyLayersignatureUpdated Conway fast example:
PropertyLayerimport changed tomesa.discrete_space.PropertyLayerUpdated Dining Philosophers network space usage:
model.pymesa.space.NetworkGridusage with a small compatibility adapter backed bymesa.discrete_space.Networkplace_agent, neighbor lookup, and visualization data accessRemoved
mesa.spacetype annotations in GIS modules and replaced with local or discrete-space-compatible coordinate type aliasesTesting
pytest -q test_examples.pyexamples/andgis/.