Mesa 3.1.0.dev0__tar.gz → 3.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of Mesa might be problematic. Click here for more details.

Files changed (195) hide show
  1. {mesa-3.1.0.dev0 → mesa-3.1.2}/.codespellignore +1 -0
  2. {mesa-3.1.0.dev0 → mesa-3.1.2}/.github/PULL_REQUEST_TEMPLATE/bug.md +5 -5
  3. {mesa-3.1.0.dev0 → mesa-3.1.2}/.github/PULL_REQUEST_TEMPLATE/feature.md +5 -5
  4. {mesa-3.1.0.dev0 → mesa-3.1.2}/.github/workflows/build_lint.yml +1 -1
  5. {mesa-3.1.0.dev0 → mesa-3.1.2}/.pre-commit-config.yaml +1 -1
  6. {mesa-3.1.0.dev0 → mesa-3.1.2}/Dockerfile +8 -9
  7. {mesa-3.1.0.dev0 → mesa-3.1.2}/HISTORY.md +124 -0
  8. {mesa-3.1.0.dev0 → mesa-3.1.2}/PKG-INFO +4 -2
  9. {mesa-3.1.0.dev0 → mesa-3.1.2}/benchmarks/configurations.py +2 -2
  10. {mesa-3.1.0.dev0 → mesa-3.1.2}/codecov.yaml +0 -1
  11. {mesa-3.1.0.dev0 → mesa-3.1.2}/docker-compose.yml +1 -1
  12. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/apis/api_main.md +1 -0
  13. mesa-3.1.2/docs/apis/mesa_logging.md +7 -0
  14. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/getting_started.md +10 -0
  15. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/index.md +4 -0
  16. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/migration_guide.md +11 -0
  17. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/tutorials/MoneyModel.py +6 -5
  18. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/tutorials/intro_tutorial.ipynb +129 -135
  19. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/tutorials/visualization_tutorial.ipynb +72 -66
  20. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/__init__.py +3 -3
  21. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/agent.py +48 -0
  22. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/batchrunner.py +14 -1
  23. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/datacollection.py +1 -6
  24. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/advanced/epstein_civil_violence/app.py +5 -0
  25. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/advanced/pd_grid/agents.py +2 -1
  26. mesa-3.1.2/mesa/examples/advanced/pd_grid/analysis.ipynb +183 -0
  27. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/advanced/pd_grid/app.py +5 -0
  28. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/advanced/pd_grid/model.py +3 -5
  29. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/advanced/sugarscape_g1mt/agents.py +12 -65
  30. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/advanced/sugarscape_g1mt/app.py +24 -19
  31. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/advanced/sugarscape_g1mt/model.py +45 -52
  32. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/advanced/wolf_sheep/agents.py +36 -2
  33. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/advanced/wolf_sheep/model.py +17 -16
  34. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/basic/boid_flockers/app.py +5 -0
  35. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/basic/boltzmann_wealth_model/app.py +8 -5
  36. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/basic/boltzmann_wealth_model/st_app.py +1 -1
  37. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/basic/conways_game_of_life/app.py +5 -0
  38. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/basic/conways_game_of_life/st_app.py +2 -2
  39. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/basic/schelling/agents.py +11 -5
  40. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/basic/schelling/analysis.ipynb +42 -36
  41. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/basic/schelling/app.py +6 -1
  42. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/basic/schelling/model.py +3 -3
  43. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/basic/virus_on_network/app.py +5 -0
  44. mesa-3.1.2/mesa/experimental/__init__.py +20 -0
  45. mesa-3.1.2/mesa/experimental/cell_space/__init__.py +50 -0
  46. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/experimental/cell_space/cell.py +22 -37
  47. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/experimental/cell_space/cell_agent.py +12 -1
  48. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/experimental/cell_space/cell_collection.py +18 -3
  49. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/experimental/cell_space/discrete_space.py +15 -64
  50. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/experimental/cell_space/grid.py +74 -4
  51. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/experimental/cell_space/network.py +13 -1
  52. mesa-3.1.2/mesa/experimental/cell_space/property_layer.py +444 -0
  53. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/experimental/cell_space/voronoi.py +13 -1
  54. mesa-3.1.2/mesa/experimental/devs/__init__.py +24 -0
  55. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/experimental/devs/eventlist.py +19 -1
  56. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/experimental/devs/simulator.py +24 -8
  57. mesa-3.1.2/mesa/experimental/mesa_signals/__init__.py +23 -0
  58. mesa-3.1.2/mesa/experimental/mesa_signals/mesa_signal.py +485 -0
  59. mesa-3.1.2/mesa/experimental/mesa_signals/observable_collections.py +133 -0
  60. mesa-3.1.2/mesa/experimental/mesa_signals/signals_util.py +52 -0
  61. mesa-3.1.2/mesa/mesa_logging.py +190 -0
  62. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/model.py +17 -23
  63. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/visualization/mpl_space_drawing.py +8 -6
  64. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/visualization/solara_viz.py +49 -11
  65. {mesa-3.1.0.dev0 → mesa-3.1.2}/tests/test_agent.py +24 -0
  66. {mesa-3.1.0.dev0 → mesa-3.1.2}/tests/test_batch_run.py +31 -0
  67. {mesa-3.1.0.dev0 → mesa-3.1.2}/tests/test_cell_space.py +271 -59
  68. {mesa-3.1.0.dev0 → mesa-3.1.2}/tests/test_components_matplotlib.py +1 -1
  69. mesa-3.1.2/tests/test_mesa_logging.py +47 -0
  70. mesa-3.1.2/tests/test_mesa_signals.py +290 -0
  71. {mesa-3.1.0.dev0 → mesa-3.1.2}/tests/test_solara_viz.py +17 -0
  72. mesa-3.1.0.dev0/mesa/examples/advanced/pd_grid/analysis.ipynb +0 -228
  73. mesa-3.1.0.dev0/mesa/experimental/UserParam.py +0 -67
  74. mesa-3.1.0.dev0/mesa/experimental/__init__.py +0 -13
  75. mesa-3.1.0.dev0/mesa/experimental/cell_space/__init__.py +0 -38
  76. mesa-3.1.0.dev0/mesa/experimental/components/altair.py +0 -81
  77. mesa-3.1.0.dev0/mesa/experimental/components/matplotlib.py +0 -242
  78. mesa-3.1.0.dev0/mesa/experimental/devs/__init__.py +0 -6
  79. mesa-3.1.0.dev0/mesa/experimental/devs/examples/epstein_civil_violence.py +0 -305
  80. mesa-3.1.0.dev0/mesa/experimental/devs/examples/wolf_sheep.py +0 -250
  81. mesa-3.1.0.dev0/mesa/experimental/solara_viz.py +0 -453
  82. {mesa-3.1.0.dev0 → mesa-3.1.2}/.coveragerc +0 -0
  83. {mesa-3.1.0.dev0 → mesa-3.1.2}/.github/ISSUE_TEMPLATE/bug-report.md +0 -0
  84. {mesa-3.1.0.dev0 → mesa-3.1.2}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  85. {mesa-3.1.0.dev0 → mesa-3.1.2}/.github/ISSUE_TEMPLATE/feature-request.md +0 -0
  86. {mesa-3.1.0.dev0 → mesa-3.1.2}/.github/dependabot.yml +0 -0
  87. {mesa-3.1.0.dev0 → mesa-3.1.2}/.github/pull_request_template.md +0 -0
  88. {mesa-3.1.0.dev0 → mesa-3.1.2}/.github/release.yml +0 -0
  89. {mesa-3.1.0.dev0 → mesa-3.1.2}/.github/workflows/benchmarks.yml +0 -0
  90. {mesa-3.1.0.dev0 → mesa-3.1.2}/.github/workflows/release.yml +0 -0
  91. {mesa-3.1.0.dev0 → mesa-3.1.2}/.gitignore +0 -0
  92. {mesa-3.1.0.dev0 → mesa-3.1.2}/.readthedocs.yml +0 -0
  93. {mesa-3.1.0.dev0 → mesa-3.1.2}/CITATION.bib +0 -0
  94. {mesa-3.1.0.dev0 → mesa-3.1.2}/CODE_OF_CONDUCT.md +0 -0
  95. {mesa-3.1.0.dev0 → mesa-3.1.2}/CONTRIBUTING.md +0 -0
  96. {mesa-3.1.0.dev0 → mesa-3.1.2}/LICENSE +0 -0
  97. {mesa-3.1.0.dev0 → mesa-3.1.2}/NOTICE +0 -0
  98. {mesa-3.1.0.dev0 → mesa-3.1.2}/README.md +0 -0
  99. {mesa-3.1.0.dev0 → mesa-3.1.2}/benchmarks/compare_timings.py +0 -0
  100. {mesa-3.1.0.dev0 → mesa-3.1.2}/benchmarks/global_benchmark.py +4 -4
  101. {mesa-3.1.0.dev0 → mesa-3.1.2}/binder/environment.yml +0 -0
  102. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/Makefile +0 -0
  103. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/README.md +0 -0
  104. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/_static/switcher.json +0 -0
  105. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/apis/agent.md +0 -0
  106. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/apis/batchrunner.md +0 -0
  107. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/apis/datacollection.md +0 -0
  108. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/apis/experimental.md +0 -0
  109. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/apis/model.md +0 -0
  110. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/apis/space.md +0 -0
  111. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/apis/visualization.md +0 -0
  112. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/best-practices.md +0 -0
  113. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/conf.py +0 -0
  114. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/example_template.txt +0 -0
  115. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/examples_overview_template.txt +0 -0
  116. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/images/mesa_logo.ico +0 -0
  117. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/images/mesa_logo.png +0 -0
  118. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/images/tutorial/br_ginis.png +0 -0
  119. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/images/tutorial/dc_endwealth.png +0 -0
  120. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/images/tutorial/dc_gini.png +0 -0
  121. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/images/tutorial/dc_oneagent.png +0 -0
  122. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/images/tutorial/first_hist.png +0 -0
  123. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/images/tutorial/multirun_hist.png +0 -0
  124. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/images/tutorial/numpy_grid.png +0 -0
  125. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/images/tutorial/viz_chart.png +0 -0
  126. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/images/tutorial/viz_empty.png +0 -0
  127. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/images/tutorial/viz_greycircles.png +0 -0
  128. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/images/tutorial/viz_histogram.png +0 -0
  129. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/images/tutorial/viz_redcircles.png +0 -0
  130. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/images/wolf_sheep.png +0 -0
  131. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/make.bat +0 -0
  132. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/mesa.md +0 -0
  133. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/tutorials/files/viz_chart.png +0 -0
  134. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/tutorials/files/viz_empty.png +0 -0
  135. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/tutorials/files/viz_greycircles.png +0 -0
  136. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/tutorials/files/viz_histogram.png +0 -0
  137. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/tutorials/files/viz_redcircles.png +0 -0
  138. {mesa-3.1.0.dev0 → mesa-3.1.2}/docs/tutorials/files/viz_slider.png +0 -0
  139. {mesa-3.1.0.dev0 → mesa-3.1.2}/maintenance/fetch_unlabeled_prs.py +0 -0
  140. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/README.md +0 -0
  141. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/__init__.py +2 -2
  142. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/advanced/__init__.py +0 -0
  143. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/advanced/epstein_civil_violence/Epstein Civil Violence.ipynb +0 -0
  144. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/advanced/epstein_civil_violence/Readme.md +0 -0
  145. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/advanced/epstein_civil_violence/__init__.py +0 -0
  146. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/advanced/epstein_civil_violence/agents.py +0 -0
  147. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/advanced/epstein_civil_violence/model.py +0 -0
  148. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/advanced/pd_grid/Readme.md +0 -0
  149. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/advanced/pd_grid/__init__.py +0 -0
  150. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/advanced/sugarscape_g1mt/Readme.md +0 -0
  151. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/advanced/sugarscape_g1mt/__init__.py +0 -0
  152. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/advanced/sugarscape_g1mt/sugar-map.txt +0 -0
  153. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/advanced/sugarscape_g1mt/tests.py +0 -0
  154. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/advanced/wolf_sheep/Readme.md +0 -0
  155. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/advanced/wolf_sheep/__init__.py +0 -0
  156. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/advanced/wolf_sheep/app.py +0 -0
  157. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/basic/__init__.py +0 -0
  158. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/basic/boid_flockers/Readme.md +0 -0
  159. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/basic/boid_flockers/__init__.py +0 -0
  160. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/basic/boid_flockers/agents.py +0 -0
  161. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/basic/boid_flockers/model.py +0 -0
  162. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/basic/boltzmann_wealth_model/Readme.md +0 -0
  163. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/basic/boltzmann_wealth_model/__init__.py +0 -0
  164. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/basic/boltzmann_wealth_model/agents.py +0 -0
  165. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/basic/boltzmann_wealth_model/model.py +0 -0
  166. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/basic/conways_game_of_life/Readme.md +0 -0
  167. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/basic/conways_game_of_life/__init__.py +0 -0
  168. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/basic/conways_game_of_life/agents.py +0 -0
  169. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/basic/conways_game_of_life/model.py +0 -0
  170. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/basic/schelling/Readme.md +0 -0
  171. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/basic/schelling/__init__.py +0 -0
  172. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/basic/virus_on_network/Readme.md +0 -0
  173. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/basic/virus_on_network/__init__.py +0 -0
  174. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/basic/virus_on_network/agents.py +0 -0
  175. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/examples/basic/virus_on_network/model.py +0 -0
  176. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/space.py +0 -0
  177. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/visualization/__init__.py +2 -2
  178. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/visualization/components/__init__.py +0 -0
  179. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/visualization/components/altair_components.py +0 -0
  180. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/visualization/components/matplotlib_components.py +0 -0
  181. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/visualization/user_param.py +0 -0
  182. {mesa-3.1.0.dev0 → mesa-3.1.2}/mesa/visualization/utils.py +0 -0
  183. {mesa-3.1.0.dev0 → mesa-3.1.2}/mypy.ini +0 -0
  184. {mesa-3.1.0.dev0 → mesa-3.1.2}/pyproject.toml +0 -0
  185. {mesa-3.1.0.dev0 → mesa-3.1.2}/tests/__init__.py +0 -0
  186. {mesa-3.1.0.dev0 → mesa-3.1.2}/tests/read_requirements.py +0 -0
  187. {mesa-3.1.0.dev0 → mesa-3.1.2}/tests/test_datacollector.py +0 -0
  188. {mesa-3.1.0.dev0 → mesa-3.1.2}/tests/test_devs.py +0 -0
  189. {mesa-3.1.0.dev0 → mesa-3.1.2}/tests/test_end_to_end_viz.sh +0 -0
  190. {mesa-3.1.0.dev0 → mesa-3.1.2}/tests/test_examples.py +0 -0
  191. {mesa-3.1.0.dev0 → mesa-3.1.2}/tests/test_grid.py +0 -0
  192. {mesa-3.1.0.dev0 → mesa-3.1.2}/tests/test_import_namespace.py +0 -0
  193. {mesa-3.1.0.dev0 → mesa-3.1.2}/tests/test_lifespan.py +0 -0
  194. {mesa-3.1.0.dev0 → mesa-3.1.2}/tests/test_model.py +0 -0
  195. {mesa-3.1.0.dev0 → mesa-3.1.2}/tests/test_space.py +0 -0
@@ -7,3 +7,4 @@ ue
7
7
  fpr
8
8
  falsy
9
9
  assertIn
10
+ nD
@@ -1,16 +1,16 @@
1
- ## Summary
1
+ ### Summary
2
2
  <!-- Provide a brief summary of the bug and its impact. -->
3
3
 
4
- ## Bug / Issue
4
+ ### Bug / Issue
5
5
  <!-- Link to the related issue(s) and describe the bug. Include details like the context, what was expected, and what actually happened. -->
6
6
 
7
- ## Implementation
7
+ ### Implementation
8
8
  <!-- Describe the changes made to resolve the issue. Highlight any important parts of the code that were modified. -->
9
9
 
10
- ## Testing
10
+ ### Testing
11
11
  <!-- Detail the testing performed to verify the fix. Include information on test cases, steps taken, and any relevant results.
12
12
 
13
13
  If you're fixing the visualisation, add before/after screenshots. -->
14
14
 
15
- ## Additional Notes
15
+ ### Additional Notes
16
16
  <!-- Add any additional information that may be relevant for the reviewers, such as potential side effects, dependencies, or related work.
@@ -1,16 +1,16 @@
1
- ## Summary
1
+ ### Summary
2
2
  <!-- Provide a concise summary of the feature and its purpose. -->
3
3
 
4
- ## Motive
4
+ ### Motive
5
5
  <!-- Explain the reasoning behind this feature. Include details on the problem it addresses or the enhancement it provides. -->
6
6
 
7
- ## Implementation
7
+ ### Implementation
8
8
  <!-- Describe how the feature was implemented. Include details on the approach taken, important decisions made, and code changes. -->
9
9
 
10
- ## Usage Examples
10
+ ### Usage Examples
11
11
  <!-- Provide code snippets or examples demonstrating how to use the new feature. Highlight key scenarios where this feature will be beneficial.
12
12
 
13
13
  If you're modifying the visualisation, add before/after screenshots. -->
14
14
 
15
- ## Additional Notes
15
+ ### Additional Notes
16
16
  <!-- Add any additional information that may be relevant for the reviewers, such as potential side effects, dependencies, or related work. -->
@@ -57,7 +57,7 @@ jobs:
57
57
  run: pytest --durations=10 --cov=mesa tests/ --cov-report=xml
58
58
  - if: matrix.os == 'ubuntu'
59
59
  name: Codecov
60
- uses: codecov/codecov-action@v4
60
+ uses: codecov/codecov-action@v5
61
61
  with:
62
62
  fail_ci_if_error: true
63
63
  token: ${{ secrets.CODECOV_TOKEN }}
@@ -4,7 +4,7 @@ ci:
4
4
  repos:
5
5
  - repo: https://github.com/astral-sh/ruff-pre-commit
6
6
  # Ruff version.
7
- rev: v0.7.2
7
+ rev: v0.8.1
8
8
  hooks:
9
9
  # Run the linter.
10
10
  - id: ruff
@@ -1,14 +1,12 @@
1
1
  # We can't use slim because we need either git/wget/curl to
2
2
  # download mesa-examples, and so installing them requires
3
3
  # updating the system anyway.
4
- # We can't use alpine because NumPy doesn't support musllinux yet.
5
- # But it's in the RC version https://github.com/numpy/numpy/issues/20089.
6
4
  FROM python:bookworm
7
- LABEL maintainer="rht <rhtbot@protonmail.com>"
5
+ LABEL maintainer="projectmesa maintainers@projectmesa.dev"
8
6
 
9
7
  # To use this Dockerfile:
10
- # 1. `docker build . -t mymesa_image`
11
- # 2. `docker run --name mymesa_instance -p 8765:8765 -it mymesa_image`
8
+ # 1. `docker build . -t mesa_image`
9
+ # 2. `docker run --name mesa_instance -p 8765:8765 -it mesa_image`
12
10
  # 3. In your browser, visit http://127.0.0.1:8765
13
11
  #
14
12
  # Currently, this Dockerfile defaults to running the Schelling model, as an
@@ -19,7 +17,7 @@ LABEL maintainer="rht <rhtbot@protonmail.com>"
19
17
  # `docker run --name mymesa_instance -p 8765:8765 -e MODEL_DIR=/mesa-examples/examples/sugarscape_cg -it mymesa_image`
20
18
  # Note: the model directory MUST contain an app.py file.
21
19
 
22
- ENV MODEL_DIR=/mesa-examples/examples/schelling_experimental
20
+ ENV MODEL_DIR=/opt/mesa/mesa/examples/basic/schelling
23
21
 
24
22
  # Don't buffer output:
25
23
  # https://docs.python.org/3.10/using/cmdline.html?highlight=pythonunbuffered#envvar-PYTHONUNBUFFERED
@@ -29,10 +27,11 @@ WORKDIR /opt/mesa
29
27
 
30
28
  COPY . /opt/mesa
31
29
 
32
- RUN cd / && git clone https://github.com/projectmesa/mesa-examples.git
33
-
34
30
  EXPOSE 8765/tcp
35
31
 
36
- RUN pip3 install -e /opt/mesa
32
+ RUN pip3 install -e /opt/mesa[rec]
37
33
 
38
34
  CMD ["sh", "-c", "cd $MODEL_DIR && solara run app.py --host=0.0.0.0"]
35
+
36
+ # To check file system:
37
+ # docker exec -it mesa_instance bash
@@ -1,6 +1,130 @@
1
1
  ---
2
2
  title: Release History
3
3
  ---
4
+ # 3.1.2 (2025-01-04)
5
+ ## Highlights
6
+ Mesa v3.1.2 is a patch release containing updates to our wolf-sheep, shelling and prisoner's dilemma example models and improving documentation in the tutorials and visualisation docstring. No functional changes to the core library were made.
7
+
8
+ ## What's Changed
9
+ ### 🔍 Examples updated
10
+ * examples/wolf_sheep: Don't allow dumb moves by @EwoutH in https://github.com/projectmesa/mesa/pull/2503
11
+ * Added homophily ratio in basic schelling example by @vbv-shm in https://github.com/projectmesa/mesa/pull/2520
12
+ * examples: Update pd_grid analysis.ipynb to use new spaces by @quaquel in https://github.com/projectmesa/mesa/pull/2553
13
+ ### 📜 Documentation improvements
14
+ * Corrected a few errors in Intro tutorial by @sanika-n in https://github.com/projectmesa/mesa/pull/2583
15
+ * Small draw_space docstring fix by @quaquel in https://github.com/projectmesa/mesa/pull/2554
16
+ * fix: model name in visualization tutorial by @Sahil-Chhoker in https://github.com/projectmesa/mesa/pull/2591
17
+
18
+ ## New Contributors
19
+ * @vbv-shm made their first contribution in https://github.com/projectmesa/mesa/pull/2520
20
+ * @sanika-n made their first contribution in https://github.com/projectmesa/mesa/pull/2583
21
+
22
+ **Full Changelog**: https://github.com/projectmesa/mesa/compare/v3.1.1...v3.1.2
23
+
24
+ # 3.1.1 (2024-12-14)
25
+ ## Highlights
26
+ Mesa 3.1.1 is a maintenance release that includes visualization improvements and documentation updates. The key enhancement is the addition of an interactive play interval control to the visualization interface, allowing users to dynamically adjust simulation speed between 1ms and 500ms through a slider in the Controls panel.
27
+
28
+ Several example models were updated to use Mesa 3.1's recommended practices, particularly the `create_agents()` method for more efficient agent creation and NumPy's `rng.integers()` for random number generation. The Sugarscape example was modernized to use PropertyLayers.
29
+
30
+ Bug fixes include improvements to PropertyLayer visualization and a correction to the Schelling model's neighbor similarity calculation. The tutorials were also updated to reflect current best practices in Mesa 3.1.
31
+
32
+ ## What's Changed
33
+ ### 🎉 New features added
34
+ * Add Interactive Play Interval Control to Mesa Visualization by @AdamZh0u in https://github.com/projectmesa/mesa/pull/2540
35
+ ### 🐛 Bugs fixed
36
+ * bug fixes for draw_property_layers by @quaquel in https://github.com/projectmesa/mesa/pull/2548
37
+ ### 🔍 Examples updated
38
+ * Wolf-sheep to use `create_agent` by @quaquel in https://github.com/projectmesa/mesa/pull/2543
39
+ * Shift sugarscape example to using create_agent by @quaquel in https://github.com/projectmesa/mesa/pull/2544
40
+ * Fix: Schelling Model Neighbor Similarity Calculation by @Sahil-Chhoker in https://github.com/projectmesa/mesa/pull/2518
41
+ * Change pd_grid example to use create_agents by @quaquel in https://github.com/projectmesa/mesa/pull/2545
42
+ * Switch sugarscape to using property layers by @quaquel in https://github.com/projectmesa/mesa/pull/2546
43
+ ### 📜 Documentation improvements
44
+ * Updated docs and check_model param by @nissu99 in https://github.com/projectmesa/mesa/pull/2510
45
+ * Update tutorials to use `create_agents` and `rng.integers` by @DarshPareek in https://github.com/projectmesa/mesa/pull/2541
46
+
47
+ ## New Contributors
48
+ * @nissu99 made their first contribution in https://github.com/projectmesa/mesa/pull/2510
49
+ * @DarshPareek made their first contribution in https://github.com/projectmesa/mesa/pull/2541
50
+
51
+ **Full Changelog**: https://github.com/projectmesa/mesa/compare/v3.1.0...3.1.1
52
+
53
+ # 3.1.0 (2024-12-04)
54
+ ## Highlights
55
+ With Mesa 3.1.0 we're back on our regular release schedule after the big Mesa 3.0 release, with some exciting new features.
56
+
57
+ This release adds experimental support for Observables and Computed, enabling a more reactive and responsive programming model for agent-based simulations. The new `Observable` and `Computable` classes allow developers to declaratively define attributes that automatically emit signals when their values change, and compute derived values that update dynamically. This lays the groundwork for more advanced event handling and data visualization features in future releases (#2291).
58
+
59
+ The experimental cell space module has been updated with full support for n-dimensional property layers. These allow agents to easily interact with and modify spatial properties of the environment, such as terrain, resources, or environmental conditions. The new implementation provides a more intuitive attribute-based API and ensures tight integration with the cell space architecture (#2512).
60
+
61
+ Mesa now includes built-in support for logging using the standard Python `logging` module. This provides developers with a flexible and powerful way to add structured diagnostic and debug output to their simulations, without the need for custom logging solutions. The logging system is integrated throughout the library, including the new SolaraViz visualization system (#2506).
62
+
63
+ Creating multiple agents with varying initialization parameters is now significantly easier with the new `Agent.create_agents` class method. This factory function supports both uniform and per-agent parameters, simplifying the code required to set up a simulation with a large number of heterogeneous agents (#2351).
64
+
65
+ In addition to the major new features, this release includes a number of smaller enhancements and bug fixes that improve the overall developer experience. These include removing deprecated functionality, cleaning up examples, and addressing various edge cases reported by the community. Mesa 3.1 requires Python 3.11 or higher.
66
+
67
+ ## What's Changed
68
+ ### 🧪 Experimental features
69
+ * Add support for Observables to MESA by @quaquel in https://github.com/projectmesa/mesa/pull/2291
70
+ * Add full support for property layers to cell spaces by @quaquel in https://github.com/projectmesa/mesa/pull/2512
71
+ ### 🎉 New features added
72
+ * Add logging to MESA by @quaquel in https://github.com/projectmesa/mesa/pull/2506
73
+ * Add `create_agents` factory method to Agent by @quaquel in https://github.com/projectmesa/mesa/pull/2351
74
+ ### 🔍 Examples updated
75
+ * Add seed control to all examples by @quaquel in https://github.com/projectmesa/mesa/pull/2496
76
+ ### 📜 Documentation improvements
77
+ * doc fix for pip install error on mac by @quaquel in https://github.com/projectmesa/mesa/pull/2508
78
+ * Refactored docs for Introductory Tutorial by @Spartan-71 in https://github.com/projectmesa/mesa/pull/2511
79
+ * Add module-level docstring to experimental features by @EwoutH in https://github.com/projectmesa/mesa/pull/2532
80
+ ### 🔧 Maintenance
81
+ * Remove deprecated time module by @EwoutH in https://github.com/projectmesa/mesa/pull/2476
82
+ * Drop support for Python 3.10, require Python >= 3.11 by @EwoutH in https://github.com/projectmesa/mesa/pull/2474
83
+ * Remove deprecated functionality by @EwoutH in https://github.com/projectmesa/mesa/pull/2483
84
+ * Remove visualization modules from `mesa.experimental` by @quaquel in https://github.com/projectmesa/mesa/pull/2495
85
+ * Cleanup two occurrences of removed scheduler by @EwoutH in https://github.com/projectmesa/mesa/pull/2499
86
+ * move _setup_agent_registration into `Model.__init__` by @quaquel in https://github.com/projectmesa/mesa/pull/2501
87
+ * remove devs related examples from devs/examples by @quaquel in https://github.com/projectmesa/mesa/pull/2507
88
+ * added empty iterable checks and updated tests by @Sahil-Chhoker in https://github.com/projectmesa/mesa/pull/2523
89
+ * Fix: running Mesa in Docker with Schelling model by @AdamZh0u in https://github.com/projectmesa/mesa/pull/2524
90
+
91
+ ## New Contributors
92
+ * @Spartan-71 made their first contribution in https://github.com/projectmesa/mesa/pull/2511
93
+ * @Sahil-Chhoker made their first contribution in https://github.com/projectmesa/mesa/pull/2523
94
+ * @AdamZh0u made their first contribution in https://github.com/projectmesa/mesa/pull/2524
95
+
96
+ **Full Changelog**: https://github.com/projectmesa/mesa/compare/v3.0.3...v3.1.0
97
+
98
+ # 3.0.3 (2024-11-14)
99
+ ## Highlights
100
+ A small bugfix release that fixes two bugs.
101
+
102
+ ## What's Changed
103
+ ### 🧪 Experimental features
104
+ * cell_space: Allow CellCollection to be empty by @EwoutH in https://github.com/projectmesa/mesa/pull/2502
105
+ ### 🐛 Bugs fixed
106
+ * Only set model_parameters once by @Corvince in https://github.com/projectmesa/mesa/pull/2505
107
+
108
+ **Full Changelog**: https://github.com/projectmesa/mesa/compare/v3.0.2...v3.0.3
109
+
110
+ # 3.0.2 (2024-11-11)
111
+ ## Highlighst
112
+ Mesa 3.0.2 is a small follow-up patch release, in which we fixed a lot of small bugs in the example models their visualisation, and improved their testing.
113
+
114
+ ## What's Changed
115
+ ### 🐛 Bugs fixed
116
+ * allow components as a positional argument again by @Corvince in https://github.com/projectmesa/mesa/pull/2488
117
+ ### 🔍 Examples updated
118
+ * examples: Add required components keyword by @EwoutH in https://github.com/projectmesa/mesa/pull/2485
119
+ * examples: Fix boid_flockers viz by @EwoutH in https://github.com/projectmesa/mesa/pull/2492
120
+ * examples: Fix schelling viz by @EwoutH in https://github.com/projectmesa/mesa/pull/2490
121
+ * example: Add input sliders to Sugerscape viz by @EwoutH in https://github.com/projectmesa/mesa/pull/2487
122
+ * examples/gol: Add initial fraction alive, add sliders to viz by @EwoutH in https://github.com/projectmesa/mesa/pull/2489
123
+ ### 🔧 Maintenance
124
+ * test app init of examples by @Corvince in https://github.com/projectmesa/mesa/pull/2491
125
+
126
+ **Full Changelog**: https://github.com/projectmesa/mesa/compare/v3.0.1...v3.0.2
127
+
4
128
  # 3.0.1 (2024-11-11)
5
129
  ## Highlights
6
130
  After our huge [3.0.0 release](https://github.com/projectmesa/mesa/releases/tag/v3.0.0), Mesa 3.0.1 follows up with two improvements to experimental features, examples and docs.
@@ -1,11 +1,13 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: Mesa
3
- Version: 3.1.0.dev0
3
+ Version: 3.1.2
4
4
  Summary: Agent-based modeling (ABM) in Python
5
5
  Project-URL: homepage, https://github.com/projectmesa/mesa
6
6
  Project-URL: repository, https://github.com/projectmesa/mesa
7
7
  Author-email: Project Mesa Team <projectmesa@googlegroups.com>
8
8
  License: Apache 2.0
9
+ License-File: LICENSE
10
+ License-File: NOTICE
9
11
  Keywords: ABM,agent,based,model,modeling,multi-agent,simulation
10
12
  Classifier: Development Status :: 3 - Alpha
11
13
  Classifier: Intended Audience :: Science/Research
@@ -35,7 +35,7 @@ configurations = {
35
35
  "parameters": {
36
36
  "height": 40,
37
37
  "width": 40,
38
- "homophily": 3,
38
+ "homophily": 0.4,
39
39
  "radius": 1,
40
40
  "density": 0.625,
41
41
  },
@@ -47,7 +47,7 @@ configurations = {
47
47
  "parameters": {
48
48
  "height": 100,
49
49
  "width": 100,
50
- "homophily": 8,
50
+ "homophily": 1,
51
51
  "radius": 2,
52
52
  "density": 0.8,
53
53
  },
@@ -7,7 +7,6 @@ coverage:
7
7
 
8
8
  ignore:
9
9
  - "benchmarks/**"
10
- - "mesa/experimental/**"
11
10
  - "mesa/visualization/**"
12
11
 
13
12
  comment: off
@@ -16,6 +16,6 @@ services:
16
16
  # within the current directory.
17
17
  # E.g. if it is at my-model, then you specify it as
18
18
  # /opt/mesa/my-model.
19
- MODEL_DIR: /mesa-examples/examples/schelling_experimental
19
+ MODEL_DIR: /opt/mesa/mesa/examples/basic/schelling
20
20
  ports:
21
21
  - 8765:8765
@@ -10,5 +10,6 @@ space
10
10
  datacollection
11
11
  batchrunner
12
12
  visualization
13
+ logging
13
14
  experimental
14
15
  ```
@@ -0,0 +1,7 @@
1
+ # logging
2
+
3
+ ```{eval-rst}
4
+ .. automodule:: mesa.mesa_logging
5
+ :members:
6
+ :inherited-members:
7
+ ```
@@ -180,6 +180,16 @@ Mesa now uses a new browser-based visualization system called SolaraViz. This al
180
180
 
181
181
  > **Note:** SolaraViz is experimental and still in active development for Mesa 3.0. While we attempt to minimize them, there might be API breaking changes between Mesa 3.0 and 3.1. There won't be breaking changes between Mesa 3.0.x patch releases.
182
182
 
183
+ > **Note:** SolaraViz instantiates new models using `**model_parameters.value`, so all model inputs must be keyword arguments.
184
+
185
+ Ensure your model's `__init__` method accepts keyword arguments matching the `model_params` keys.
186
+
187
+ ```python
188
+ class MyModel(Model):
189
+ def __init__(self, n_agents=10, seed=None):
190
+ super().__init__(seed=seed)
191
+ # Initialize the model with N agents
192
+
183
193
  The core functionality for building your own visualizations resides in the [`mesa.visualization`](apis/visualization) namespace
184
194
 
185
195
  Here's a basic example of how to set up a visualization:
@@ -43,6 +43,10 @@ To also install our recommended dependencies:
43
43
  pip install -U mesa[rec]
44
44
  ```
45
45
 
46
+ On a Mac, this command might cause an error stating `zsh: no matches found: mesa[all]`.
47
+ In that case, change the command to `pip install -U "mesa[rec]"`.
48
+
49
+
46
50
  To install our latest pre-release:
47
51
 
48
52
  ```bash
@@ -259,6 +259,17 @@ the import from mesa.experimental. Otherwise here is a list of things you need t
259
259
 
260
260
  Previously SolaraViz was initialized by providing a `model_cls` and a `model_params`. This has changed to expect a model instance `model`. You can still provide (user-settable) `model_params`, but only if users should be able to change them. It is now also possible to pass in a "reactive model" by first calling `model = solara.reactive(model)`. This is useful for notebook environments. It allows you to pass the model to the SolaraViz Module, but continue to use the model. For example calling `model.value.step()` (notice the extra .value) will automatically update the plots. This currently only automatically works for the step method, you can force visualization updates by calling `model.value.force_update()`.
261
261
 
262
+ ### Model Initialization with Keyword Arguments
263
+
264
+ With the introduction of SolaraViz in Mesa 3.0, models are now instantiated using `**model_parameters.value`. This means all inputs for initializing a new model must be keyword arguments. Ensure your model's `__init__` method accepts keyword arguments matching the keys in `model_params`.
265
+
266
+ ```python
267
+ class MyModel(mesa.Model):
268
+ def __init__(self, n_agents=10, seed=None):
269
+ super().__init__(seed=seed)
270
+ # Initialize the model with N agents
271
+ ```
272
+
262
273
  #### Default space visualization
263
274
 
264
275
  Previously we included a default space drawer that you could configure with an `agent_portrayal` function. You now have to explicitly create a space drawer with the `agent_portrayal` function
@@ -62,12 +62,13 @@ class MoneyModel(mesa.Model):
62
62
  self.grid = mesa.space.MultiGrid(width, height, True)
63
63
 
64
64
  # Create agents
65
- for _ in range(self.num_agents):
66
- a = MoneyAgent(self)
65
+ agents = MoneyAgent.create_agents(model=self, n=n)
66
+ # Create x and y positions for agents
67
+ x = self.rng.integers(0, self.grid.width, size=(n,))
68
+ y = self.rng.integers(0, self.grid.height, size=(n,))
69
+ for a, i, j in zip(agents, x, y):
67
70
  # Add the agent to a random grid cell
68
- x = self.random.randrange(self.grid.width)
69
- y = self.random.randrange(self.grid.height)
70
- self.grid.place_agent(a, (x, y))
71
+ self.grid.place_agent(a, (i, j))
71
72
 
72
73
  self.datacollector = mesa.DataCollector(
73
74
  model_reporters={"Gini": compute_gini}, agent_reporters={"Wealth": "wealth"}