fix: add missing app.py entrypoints for el_farol, shape_example, caching_and_replay#428
Open
Vanya-kapoor wants to merge 2 commits intomesa:mainfrom
Open
fix: add missing app.py entrypoints for el_farol, shape_example, caching_and_replay#428Vanya-kapoor wants to merge 2 commits intomesa:mainfrom
Vanya-kapoor wants to merge 2 commits intomesa:mainfrom
Conversation
for more information, see https://pre-commit.ci
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
Adds missing
app.pyentrypoints to three examples that could not belaunched with
solara run app.py. Also fixes a relative import inel_faroluncovered during the same audit.Examples fixed:
el_farol— addedapp.py+ fixedfrom .agents→from agentsshape_example— addedapp.pycaching_and_replay— addedapp.pyNot included:
mmc_queue— usesmesa.experimental.scenarioswhichrequires Mesa 4.x. Needs a separate PR targeting the
mainbranch.Verified (Mesa 3.3.1, Python 3.11)
What each app.py does
el_farol —
SolaraVizwith a line chart of attendance over time.Sliders for
num_agents,crowd_threshold,num_strategies,memory_size. No space component — this model has no grid.shape_example —
SolaraVizwith space component showing agentsas arrowheads. Slider for
num_agents.caching_and_replay —
SolaraVizwith space component (two agenttypes in different colours) and happy-agent line chart. Sliders for
homophily,density,minority_pc,radius.GSoC contributor checklist
Context & motivation
In my audit, I found that these four examples had no app.py. And I looked at each model to understand what visualization it needed before writing anything.
What I learned
I learnt the difference between a model with a grid vs without (el_farol has no space component so the app.py is just a plot), and that mmc_queue is actually a Mesa 4.x example which I only discovered when the import failed when I tried to run it.
Learning repo
🔗 My learning repo: https://github.com/Vanya-kapoor/GSoC-learning-space
🔗 Relevant model(s): https://github.com/Vanya-kapoor/GSoC-learning-space/tree/main/models
Readiness checks
identified in systematic audit of all 21 examples on Mesa 3.3.1)
ruff checkclean)