Skip to content

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
Vanya-kapoor:fix/add-missing-entrypoints
Open

fix: add missing app.py entrypoints for el_farol, shape_example, caching_and_replay#428
Vanya-kapoor wants to merge 2 commits intomesa:mainfrom
Vanya-kapoor:fix/add-missing-entrypoints

Conversation

@Vanya-kapoor
Copy link

Summary

Adds missing app.py entrypoints to three examples that could not be
launched with solara run app.py. Also fixes a relative import in
el_farol uncovered during the same audit.

Examples fixed:

  • el_farol — added app.py + fixed from .agentsfrom agents
  • shape_example — added app.py
  • caching_and_replay — added app.py

Not included: mmc_queue — uses mesa.experimental.scenarios which
requires Mesa 4.x. Needs a separate PR targeting the main branch.

Verified (Mesa 3.3.1, Python 3.11)

el_farol       ✓ model initializes, app.py present
shape_example  ✓ model initializes, app.py present
caching_and_replay ✓ model initializes, app.py present

What each app.py does

el_farolSolaraViz with 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_exampleSolaraViz with space component showing agents
as arrowheads. Slider for num_agents.

caching_and_replaySolaraViz with space component (two agent
types 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

  • This PR addresses an agreed-upon problem (missing entrypoints
    identified in systematic audit of all 21 examples on Mesa 3.3.1)
  • I have read the contributing guide
  • I have performed a self-review
  • Another GSoC contributor has reviewed this PR: @
  • Models verified locally (import + init checks pass)
  • Code formatted (ruff check clean)
  • No tests required — entrypoint additions only

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant