Mesa 3.0.3__tar.gz → 3.1.0.dev0__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 (185) hide show
  1. {mesa-3.0.3 → mesa-3.1.0.dev0}/.github/workflows/build_lint.yml +0 -2
  2. {mesa-3.0.3 → mesa-3.1.0.dev0}/.pre-commit-config.yaml +1 -1
  3. {mesa-3.0.3 → mesa-3.1.0.dev0}/HISTORY.md +0 -18
  4. {mesa-3.0.3 → mesa-3.1.0.dev0}/PKG-INFO +3 -4
  5. {mesa-3.0.3 → mesa-3.1.0.dev0}/README.md +1 -1
  6. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/mesa.md +0 -10
  7. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/tutorials/intro_tutorial.ipynb +1 -1
  8. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/__init__.py +2 -4
  9. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/agent.py +0 -25
  10. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/experimental/cell_space/cell_collection.py +2 -4
  11. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/model.py +0 -51
  12. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/visualization/solara_viz.py +5 -11
  13. {mesa-3.0.3 → mesa-3.1.0.dev0}/pyproject.toml +3 -4
  14. {mesa-3.0.3 → mesa-3.1.0.dev0}/tests/test_cell_space.py +0 -34
  15. {mesa-3.0.3 → mesa-3.1.0.dev0}/tests/test_import_namespace.py +0 -5
  16. mesa-3.0.3/docs/apis/time.md +0 -7
  17. mesa-3.0.3/mesa/time.py +0 -391
  18. mesa-3.0.3/tests/test_time.py +0 -317
  19. {mesa-3.0.3 → mesa-3.1.0.dev0}/.codespellignore +0 -0
  20. {mesa-3.0.3 → mesa-3.1.0.dev0}/.coveragerc +0 -0
  21. {mesa-3.0.3 → mesa-3.1.0.dev0}/.github/ISSUE_TEMPLATE/bug-report.md +0 -0
  22. {mesa-3.0.3 → mesa-3.1.0.dev0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  23. {mesa-3.0.3 → mesa-3.1.0.dev0}/.github/ISSUE_TEMPLATE/feature-request.md +0 -0
  24. {mesa-3.0.3 → mesa-3.1.0.dev0}/.github/PULL_REQUEST_TEMPLATE/bug.md +0 -0
  25. {mesa-3.0.3 → mesa-3.1.0.dev0}/.github/PULL_REQUEST_TEMPLATE/feature.md +0 -0
  26. {mesa-3.0.3 → mesa-3.1.0.dev0}/.github/dependabot.yml +0 -0
  27. {mesa-3.0.3 → mesa-3.1.0.dev0}/.github/pull_request_template.md +0 -0
  28. {mesa-3.0.3 → mesa-3.1.0.dev0}/.github/release.yml +0 -0
  29. {mesa-3.0.3 → mesa-3.1.0.dev0}/.github/workflows/benchmarks.yml +0 -0
  30. {mesa-3.0.3 → mesa-3.1.0.dev0}/.github/workflows/release.yml +0 -0
  31. {mesa-3.0.3 → mesa-3.1.0.dev0}/.gitignore +0 -0
  32. {mesa-3.0.3 → mesa-3.1.0.dev0}/.readthedocs.yml +0 -0
  33. {mesa-3.0.3 → mesa-3.1.0.dev0}/CITATION.bib +0 -0
  34. {mesa-3.0.3 → mesa-3.1.0.dev0}/CODE_OF_CONDUCT.md +0 -0
  35. {mesa-3.0.3 → mesa-3.1.0.dev0}/CONTRIBUTING.md +0 -0
  36. {mesa-3.0.3 → mesa-3.1.0.dev0}/Dockerfile +0 -0
  37. {mesa-3.0.3 → mesa-3.1.0.dev0}/LICENSE +0 -0
  38. {mesa-3.0.3 → mesa-3.1.0.dev0}/NOTICE +0 -0
  39. {mesa-3.0.3 → mesa-3.1.0.dev0}/benchmarks/compare_timings.py +0 -0
  40. {mesa-3.0.3 → mesa-3.1.0.dev0}/benchmarks/configurations.py +0 -0
  41. {mesa-3.0.3 → mesa-3.1.0.dev0}/benchmarks/global_benchmark.py +0 -0
  42. {mesa-3.0.3 → mesa-3.1.0.dev0}/binder/environment.yml +0 -0
  43. {mesa-3.0.3 → mesa-3.1.0.dev0}/codecov.yaml +0 -0
  44. {mesa-3.0.3 → mesa-3.1.0.dev0}/docker-compose.yml +0 -0
  45. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/Makefile +0 -0
  46. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/README.md +0 -0
  47. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/_static/switcher.json +0 -0
  48. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/apis/agent.md +0 -0
  49. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/apis/api_main.md +0 -0
  50. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/apis/batchrunner.md +0 -0
  51. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/apis/datacollection.md +0 -0
  52. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/apis/experimental.md +0 -0
  53. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/apis/model.md +0 -0
  54. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/apis/space.md +0 -0
  55. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/apis/visualization.md +0 -0
  56. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/best-practices.md +0 -0
  57. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/conf.py +0 -0
  58. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/example_template.txt +0 -0
  59. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/examples_overview_template.txt +0 -0
  60. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/getting_started.md +0 -0
  61. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/images/mesa_logo.ico +0 -0
  62. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/images/mesa_logo.png +0 -0
  63. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/images/tutorial/br_ginis.png +0 -0
  64. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/images/tutorial/dc_endwealth.png +0 -0
  65. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/images/tutorial/dc_gini.png +0 -0
  66. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/images/tutorial/dc_oneagent.png +0 -0
  67. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/images/tutorial/first_hist.png +0 -0
  68. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/images/tutorial/multirun_hist.png +0 -0
  69. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/images/tutorial/numpy_grid.png +0 -0
  70. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/images/tutorial/viz_chart.png +0 -0
  71. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/images/tutorial/viz_empty.png +0 -0
  72. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/images/tutorial/viz_greycircles.png +0 -0
  73. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/images/tutorial/viz_histogram.png +0 -0
  74. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/images/tutorial/viz_redcircles.png +0 -0
  75. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/images/wolf_sheep.png +0 -0
  76. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/index.md +0 -0
  77. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/make.bat +0 -0
  78. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/migration_guide.md +0 -0
  79. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/tutorials/MoneyModel.py +0 -0
  80. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/tutorials/files/viz_chart.png +0 -0
  81. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/tutorials/files/viz_empty.png +0 -0
  82. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/tutorials/files/viz_greycircles.png +0 -0
  83. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/tutorials/files/viz_histogram.png +0 -0
  84. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/tutorials/files/viz_redcircles.png +0 -0
  85. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/tutorials/files/viz_slider.png +0 -0
  86. {mesa-3.0.3 → mesa-3.1.0.dev0}/docs/tutorials/visualization_tutorial.ipynb +0 -0
  87. {mesa-3.0.3 → mesa-3.1.0.dev0}/maintenance/fetch_unlabeled_prs.py +0 -0
  88. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/batchrunner.py +0 -0
  89. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/datacollection.py +0 -0
  90. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/README.md +0 -0
  91. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/__init__.py +0 -0
  92. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/advanced/__init__.py +0 -0
  93. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/advanced/epstein_civil_violence/Epstein Civil Violence.ipynb +0 -0
  94. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/advanced/epstein_civil_violence/Readme.md +0 -0
  95. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/advanced/epstein_civil_violence/__init__.py +0 -0
  96. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/advanced/epstein_civil_violence/agents.py +0 -0
  97. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/advanced/epstein_civil_violence/app.py +0 -0
  98. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/advanced/epstein_civil_violence/model.py +0 -0
  99. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/advanced/pd_grid/Readme.md +0 -0
  100. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/advanced/pd_grid/__init__.py +0 -0
  101. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/advanced/pd_grid/agents.py +0 -0
  102. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/advanced/pd_grid/analysis.ipynb +0 -0
  103. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/advanced/pd_grid/app.py +0 -0
  104. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/advanced/pd_grid/model.py +0 -0
  105. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/advanced/sugarscape_g1mt/Readme.md +0 -0
  106. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/advanced/sugarscape_g1mt/__init__.py +0 -0
  107. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/advanced/sugarscape_g1mt/agents.py +0 -0
  108. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/advanced/sugarscape_g1mt/app.py +0 -0
  109. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/advanced/sugarscape_g1mt/model.py +0 -0
  110. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/advanced/sugarscape_g1mt/sugar-map.txt +0 -0
  111. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/advanced/sugarscape_g1mt/tests.py +0 -0
  112. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/advanced/wolf_sheep/Readme.md +0 -0
  113. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/advanced/wolf_sheep/__init__.py +0 -0
  114. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/advanced/wolf_sheep/agents.py +0 -0
  115. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/advanced/wolf_sheep/app.py +0 -0
  116. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/advanced/wolf_sheep/model.py +0 -0
  117. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/basic/__init__.py +0 -0
  118. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/basic/boid_flockers/Readme.md +0 -0
  119. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/basic/boid_flockers/__init__.py +0 -0
  120. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/basic/boid_flockers/agents.py +0 -0
  121. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/basic/boid_flockers/app.py +0 -0
  122. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/basic/boid_flockers/model.py +0 -0
  123. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/basic/boltzmann_wealth_model/Readme.md +0 -0
  124. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/basic/boltzmann_wealth_model/__init__.py +0 -0
  125. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/basic/boltzmann_wealth_model/agents.py +0 -0
  126. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/basic/boltzmann_wealth_model/app.py +0 -0
  127. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/basic/boltzmann_wealth_model/model.py +0 -0
  128. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/basic/boltzmann_wealth_model/st_app.py +0 -0
  129. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/basic/conways_game_of_life/Readme.md +0 -0
  130. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/basic/conways_game_of_life/__init__.py +0 -0
  131. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/basic/conways_game_of_life/agents.py +0 -0
  132. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/basic/conways_game_of_life/app.py +0 -0
  133. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/basic/conways_game_of_life/model.py +0 -0
  134. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/basic/conways_game_of_life/st_app.py +0 -0
  135. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/basic/schelling/Readme.md +0 -0
  136. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/basic/schelling/__init__.py +0 -0
  137. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/basic/schelling/agents.py +0 -0
  138. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/basic/schelling/analysis.ipynb +0 -0
  139. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/basic/schelling/app.py +0 -0
  140. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/basic/schelling/model.py +0 -0
  141. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/basic/virus_on_network/Readme.md +0 -0
  142. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/basic/virus_on_network/__init__.py +0 -0
  143. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/basic/virus_on_network/agents.py +0 -0
  144. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/basic/virus_on_network/app.py +0 -0
  145. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/examples/basic/virus_on_network/model.py +0 -0
  146. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/experimental/UserParam.py +0 -0
  147. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/experimental/__init__.py +0 -0
  148. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/experimental/cell_space/__init__.py +0 -0
  149. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/experimental/cell_space/cell.py +0 -0
  150. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/experimental/cell_space/cell_agent.py +0 -0
  151. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/experimental/cell_space/discrete_space.py +0 -0
  152. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/experimental/cell_space/grid.py +0 -0
  153. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/experimental/cell_space/network.py +0 -0
  154. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/experimental/cell_space/voronoi.py +0 -0
  155. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/experimental/components/altair.py +0 -0
  156. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/experimental/components/matplotlib.py +0 -0
  157. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/experimental/devs/__init__.py +0 -0
  158. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/experimental/devs/eventlist.py +0 -0
  159. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/experimental/devs/examples/epstein_civil_violence.py +0 -0
  160. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/experimental/devs/examples/wolf_sheep.py +0 -0
  161. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/experimental/devs/simulator.py +0 -0
  162. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/experimental/solara_viz.py +0 -0
  163. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/space.py +0 -0
  164. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/visualization/__init__.py +0 -0
  165. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/visualization/components/__init__.py +0 -0
  166. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/visualization/components/altair_components.py +0 -0
  167. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/visualization/components/matplotlib_components.py +0 -0
  168. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/visualization/mpl_space_drawing.py +0 -0
  169. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/visualization/user_param.py +0 -0
  170. {mesa-3.0.3 → mesa-3.1.0.dev0}/mesa/visualization/utils.py +0 -0
  171. {mesa-3.0.3 → mesa-3.1.0.dev0}/mypy.ini +0 -0
  172. {mesa-3.0.3 → mesa-3.1.0.dev0}/tests/__init__.py +0 -0
  173. {mesa-3.0.3 → mesa-3.1.0.dev0}/tests/read_requirements.py +0 -0
  174. {mesa-3.0.3 → mesa-3.1.0.dev0}/tests/test_agent.py +0 -0
  175. {mesa-3.0.3 → mesa-3.1.0.dev0}/tests/test_batch_run.py +0 -0
  176. {mesa-3.0.3 → mesa-3.1.0.dev0}/tests/test_components_matplotlib.py +0 -0
  177. {mesa-3.0.3 → mesa-3.1.0.dev0}/tests/test_datacollector.py +0 -0
  178. {mesa-3.0.3 → mesa-3.1.0.dev0}/tests/test_devs.py +0 -0
  179. {mesa-3.0.3 → mesa-3.1.0.dev0}/tests/test_end_to_end_viz.sh +0 -0
  180. {mesa-3.0.3 → mesa-3.1.0.dev0}/tests/test_examples.py +0 -0
  181. {mesa-3.0.3 → mesa-3.1.0.dev0}/tests/test_grid.py +0 -0
  182. {mesa-3.0.3 → mesa-3.1.0.dev0}/tests/test_lifespan.py +0 -0
  183. {mesa-3.0.3 → mesa-3.1.0.dev0}/tests/test_model.py +0 -0
  184. {mesa-3.0.3 → mesa-3.1.0.dev0}/tests/test_solara_viz.py +0 -0
  185. {mesa-3.0.3 → mesa-3.1.0.dev0}/tests/test_space.py +0 -0
@@ -37,8 +37,6 @@ jobs:
37
37
  python-version: "3.12"
38
38
  - os: ubuntu
39
39
  python-version: "3.11"
40
- - os: ubuntu
41
- python-version: "3.10"
42
40
  # Disabled for now. See https://github.com/projectmesa/mesa/issues/1253
43
41
  #- os: ubuntu
44
42
  # python-version: 'pypy-3.8'
@@ -17,7 +17,7 @@ repos:
17
17
  rev: v3.19.0
18
18
  hooks:
19
19
  - id: pyupgrade
20
- args: [--py310-plus]
20
+ args: [--py311-plus]
21
21
  - repo: https://github.com/pre-commit/pre-commit-hooks
22
22
  rev: v5.0.0 # Use the ref you want to point at
23
23
  hooks:
@@ -1,24 +1,6 @@
1
1
  ---
2
2
  title: Release History
3
3
  ---
4
- # 3.0.2 (2024-11-11)
5
- ## Highlighst
6
- 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.
7
-
8
- ## What's Changed
9
- ### 🐛 Bugs fixed
10
- * allow components as a positional argument again by @Corvince in https://github.com/projectmesa/mesa/pull/2488
11
- ### 🔍 Examples updated
12
- * examples: Add required components keyword by @EwoutH in https://github.com/projectmesa/mesa/pull/2485
13
- * examples: Fix boid_flockers viz by @EwoutH in https://github.com/projectmesa/mesa/pull/2492
14
- * examples: Fix schelling viz by @EwoutH in https://github.com/projectmesa/mesa/pull/2490
15
- * example: Add input sliders to Sugerscape viz by @EwoutH in https://github.com/projectmesa/mesa/pull/2487
16
- * examples/gol: Add initial fraction alive, add sliders to viz by @EwoutH in https://github.com/projectmesa/mesa/pull/2489
17
- ### 🔧 Maintenance
18
- * test app init of examples by @Corvince in https://github.com/projectmesa/mesa/pull/2491
19
-
20
- **Full Changelog**: https://github.com/projectmesa/mesa/compare/v3.0.1...v3.0.2
21
-
22
4
  # 3.0.1 (2024-11-11)
23
5
  ## Highlights
24
6
  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,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: Mesa
3
- Version: 3.0.3
3
+ Version: 3.1.0.dev0
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
@@ -13,14 +13,13 @@ Classifier: License :: OSI Approved :: Apache Software License
13
13
  Classifier: Natural Language :: English
14
14
  Classifier: Operating System :: OS Independent
15
15
  Classifier: Programming Language :: Python :: 3 :: Only
16
- Classifier: Programming Language :: Python :: 3.10
17
16
  Classifier: Programming Language :: Python :: 3.11
18
17
  Classifier: Programming Language :: Python :: 3.12
19
18
  Classifier: Programming Language :: Python :: 3.13
20
19
  Classifier: Topic :: Scientific/Engineering
21
20
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
22
21
  Classifier: Topic :: Scientific/Engineering :: Artificial Life
23
- Requires-Python: >=3.10
22
+ Requires-Python: >=3.11
24
23
  Requires-Dist: numpy
25
24
  Requires-Dist: pandas
26
25
  Requires-Dist: tqdm
@@ -81,7 +80,7 @@ Description-Content-Type: text/markdown
81
80
  | --- | --- |
82
81
  | CI/CD | [![GitHub Actions build status](https://github.com/projectmesa/mesa/workflows/build/badge.svg)](https://github.com/projectmesa/mesa/actions) [![Coverage status](https://codecov.io/gh/projectmesa/mesa/branch/main/graph/badge.svg)](https://codecov.io/gh/projectmesa/mesa) |
83
82
  | Package | [![PyPI - Version](https://img.shields.io/pypi/v/mesa.svg?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.org/project/Mesa/) [![PyPI - Downloads](https://img.shields.io/pypi/dm/mesa.svg?color=blue&label=Downloads&logo=pypi&logoColor=gold)](https://pypi.org/project/Mesa/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mesa.svg?logo=python&label=Python&logoColor=gold)](https://pypi.org/project/Mesa/) |
84
- | Meta | [![linting - Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch) |
83
+ | Meta | [![linting - Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch) [![SPEC 0 — Minimum Supported Dependencies](https://img.shields.io/badge/SPEC-0-green?labelColor=%23004811&color=%235CA038)](https://scientific-python.org/specs/spec-0000/) |
85
84
  | Chat | [![chat](https://img.shields.io/matrix/project-mesa:matrix.org?label=chat&logo=Matrix)](https://matrix.to/#/#project-mesa:matrix.org) |
86
85
 
87
86
  Mesa allows users to quickly create agent-based models using built-in
@@ -4,7 +4,7 @@
4
4
  | --- | --- |
5
5
  | CI/CD | [![GitHub Actions build status](https://github.com/projectmesa/mesa/workflows/build/badge.svg)](https://github.com/projectmesa/mesa/actions) [![Coverage status](https://codecov.io/gh/projectmesa/mesa/branch/main/graph/badge.svg)](https://codecov.io/gh/projectmesa/mesa) |
6
6
  | Package | [![PyPI - Version](https://img.shields.io/pypi/v/mesa.svg?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.org/project/Mesa/) [![PyPI - Downloads](https://img.shields.io/pypi/dm/mesa.svg?color=blue&label=Downloads&logo=pypi&logoColor=gold)](https://pypi.org/project/Mesa/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mesa.svg?logo=python&label=Python&logoColor=gold)](https://pypi.org/project/Mesa/) |
7
- | Meta | [![linting - Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch) |
7
+ | Meta | [![linting - Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch) [![SPEC 0 — Minimum Supported Dependencies](https://img.shields.io/badge/SPEC-0-green?labelColor=%23004811&color=%235CA038)](https://scientific-python.org/specs/spec-0000/) |
8
8
  | Chat | [![chat](https://img.shields.io/matrix/project-mesa:matrix.org?label=chat&logo=Matrix)](https://matrix.to/#/#project-mesa:matrix.org) |
9
9
 
10
10
  Mesa allows users to quickly create agent-based models using built-in
@@ -56,16 +56,6 @@
56
56
  :show-inheritance:
57
57
  ```
58
58
 
59
- ## mesa.time module
60
-
61
- ```{eval-rst}
62
- .. automodule:: mesa.time
63
- :members:
64
- :undoc-members:
65
- :show-inheritance:
66
-
67
- ```
68
-
69
59
  ## Module contents
70
60
 
71
61
  ```{eval-rst}
@@ -77,7 +77,7 @@
77
77
  "source": [
78
78
  "### Tutorial Setup\n",
79
79
  "\n",
80
- "Create and activate a [virtual environment](http://docs.python-guide.org/en/latest/dev/virtualenvs/). *Python version 3.10 or higher is required*.\n",
80
+ "Create and activate a [virtual environment](http://docs.python-guide.org/en/latest/dev/virtualenvs/). *Python version 3.11 or higher is required*.\n",
81
81
  "\n",
82
82
  "Install Mesa:\n",
83
83
  "\n",
@@ -7,7 +7,6 @@ import datetime
7
7
 
8
8
  import mesa.experimental as experimental
9
9
  import mesa.space as space
10
- import mesa.time as time
11
10
  from mesa.agent import Agent
12
11
  from mesa.batchrunner import batch_run
13
12
  from mesa.datacollection import DataCollector
@@ -16,7 +15,6 @@ from mesa.model import Model
16
15
  __all__ = [
17
16
  "Model",
18
17
  "Agent",
19
- "time",
20
18
  "space",
21
19
  "DataCollector",
22
20
  "batch_run",
@@ -24,7 +22,7 @@ __all__ = [
24
22
  ]
25
23
 
26
24
  __title__ = "mesa"
27
- __version__ = "3.0.3"
25
+ __version__ = "3.1.0.dev"
28
26
  __license__ = "Apache 2.0"
29
- _this_year = datetime.datetime.now(tz=datetime.timezone.utc).date().year
27
+ _this_year = datetime.datetime.now(tz=datetime.UTC).date().year
30
28
  __copyright__ = f"Copyright {_this_year} Project Mesa Team"
@@ -155,7 +155,6 @@ class AgentSet(MutableSet, Sequence):
155
155
  at_most: int | float = float("inf"),
156
156
  inplace: bool = False,
157
157
  agent_type: type[Agent] | None = None,
158
- n: int | None = None,
159
158
  ) -> AgentSet:
160
159
  """Select a subset of agents from the AgentSet based on a filter function and/or quantity limit.
161
160
 
@@ -167,7 +166,6 @@ class AgentSet(MutableSet, Sequence):
167
166
  - If a float between 0 and 1, at most that fraction of original the agents are selected.
168
167
  inplace (bool, optional): If True, modifies the current AgentSet; otherwise, returns a new AgentSet. Defaults to False.
169
168
  agent_type (type[Agent], optional): The class type of the agents to select. Defaults to None, meaning no type filtering is applied.
170
- n (int): deprecated, use at_most instead
171
169
 
172
170
  Returns:
173
171
  AgentSet: A new AgentSet containing the selected agents, unless inplace is True, in which case the current AgentSet is updated.
@@ -176,14 +174,6 @@ class AgentSet(MutableSet, Sequence):
176
174
  - at_most just return the first n or fraction of agents. To take a random sample, shuffle() beforehand.
177
175
  - at_most is an upper limit. When specifying other criteria, the number of agents returned can be smaller.
178
176
  """
179
- if n is not None:
180
- warnings.warn(
181
- "The parameter 'n' is deprecated and will be removed in Mesa 3.1. Use 'at_most' instead.",
182
- DeprecationWarning,
183
- stacklevel=2,
184
- )
185
- at_most = n
186
-
187
177
  inf = float("inf")
188
178
  if filter_func is None and agent_type is None and at_most == inf:
189
179
  return self if inplace else copy.copy(self)
@@ -281,21 +271,6 @@ class AgentSet(MutableSet, Sequence):
281
271
  Returns:
282
272
  AgentSet | list[Any]: The results of the callable calls if return_results is True, otherwise the AgentSet itself.
283
273
  """
284
- try:
285
- return_results = kwargs.pop("return_results")
286
- except KeyError:
287
- return_results = False
288
- else:
289
- warnings.warn(
290
- "Using return_results is deprecated and will be removed in Mesa 3.1."
291
- "Use AgenSet.do in case of return_results=False, and AgentSet.map in case of return_results=True",
292
- DeprecationWarning,
293
- stacklevel=2,
294
- )
295
-
296
- if return_results:
297
- return self.map(method, *args, **kwargs)
298
-
299
274
  # we iterate over the actual weakref keys and check if weakref is alive before calling the method
300
275
  if isinstance(method, str):
301
276
  for agentref in self._agents.keyrefs():
@@ -48,10 +48,8 @@ class CellCollection(Generic[T]):
48
48
  else:
49
49
  self._cells = {cell: cell.agents for cell in cells}
50
50
 
51
- # Get capacity from first cell if collection is not empty
52
- self._capacity: int | None = (
53
- next(iter(self._cells.keys())).capacity if self._cells else None
54
- )
51
+ #
52
+ self._capacity: int = next(iter(self._cells.keys())).capacity
55
53
 
56
54
  if random is None:
57
55
  warnings.warn(
@@ -18,7 +18,6 @@ from typing import Any
18
18
  import numpy as np
19
19
 
20
20
  from mesa.agent import Agent, AgentSet
21
- from mesa.datacollection import DataCollector
22
21
 
23
22
  SeedLike = int | np.integer | Sequence[int] | np.random.SeedSequence
24
23
  RNGLike = np.random.Generator | np.random.BitGenerator
@@ -112,14 +111,6 @@ class Model:
112
111
  # Call the original user-defined step method
113
112
  self._user_step(*args, **kwargs)
114
113
 
115
- def next_id(self) -> int: # noqa: D102
116
- warnings.warn(
117
- "using model.next_id() is deprecated and will be removed in Mesa 3.1. Agents track their unique ID automatically",
118
- DeprecationWarning,
119
- stacklevel=2,
120
- )
121
- return 0
122
-
123
114
  @property
124
115
  def agents(self) -> AgentSet:
125
116
  """Provides an AgentSet of all agents in the model, combining agents from all types."""
@@ -143,16 +134,6 @@ class Model:
143
134
  """A dictionary where the keys are agent types and the values are the corresponding AgentSets."""
144
135
  return self._agents_by_type
145
136
 
146
- def get_agents_of_type(self, agenttype: type[Agent]) -> AgentSet:
147
- """Deprecated: Retrieves an AgentSet containing all agents of the specified type."""
148
- warnings.warn(
149
- f"Model.get_agents_of_type() is deprecated and will be removed in Mesa 3.1."
150
- f"Please replace get_agents_of_type({agenttype}) with the property agents_by_type[{agenttype}].",
151
- DeprecationWarning,
152
- stacklevel=2,
153
- )
154
- return self.agents_by_type[agenttype]
155
-
156
137
  def _setup_agent_registration(self):
157
138
  """Helper method to initialize the agent registration datastructures."""
158
139
  self._agents = {} # the hard references to all agents in the model
@@ -245,38 +226,6 @@ class Model:
245
226
  self.rng = np.random.default_rng(rng)
246
227
  self._rng = self.rng.bit_generator.state
247
228
 
248
- def initialize_data_collector(
249
- self,
250
- model_reporters=None,
251
- agent_reporters=None,
252
- agenttype_reporters=None,
253
- tables=None,
254
- ) -> None:
255
- """Initialize the data collector for the model.
256
-
257
- Args:
258
- model_reporters: model reporters to collect
259
- agent_reporters: agent reporters to collect
260
- agenttype_reporters: agent type reporters to collect
261
- tables: tables to collect
262
-
263
- """
264
- warnings.warn(
265
- "initialize_data_collector() is deprecated and will be removed in Mesa 3.1. Please use the DataCollector class directly. "
266
- "by using `self.datacollector = DataCollector(...)`.",
267
- DeprecationWarning,
268
- stacklevel=2,
269
- )
270
-
271
- self.datacollector = DataCollector(
272
- model_reporters=model_reporters,
273
- agent_reporters=agent_reporters,
274
- agenttype_reporters=agenttype_reporters,
275
- tables=tables,
276
- )
277
- # Collect data for the first time during initialization.
278
- self.datacollector.collect(self)
279
-
280
229
  def remove_all_agents(self):
281
230
  """Remove all agents from the model.
282
231
 
@@ -382,17 +382,11 @@ def ModelCreator(
382
382
  )
383
383
  user_params, fixed_params = split_model_params(user_params)
384
384
 
385
- # Use solara.use_effect to run the initialization code only once
386
- solara.use_effect(
387
- # set model_parameters to the default values for all parameters
388
- lambda: model_parameters.set(
389
- {
390
- **fixed_params,
391
- **{k: v.get("value") for k, v in user_params.items()},
392
- }
393
- ),
394
- [],
395
- )
385
+ # set model_parameters to the default values for all parameters
386
+ model_parameters.value = {
387
+ **fixed_params,
388
+ **{k: v.get("value") for k, v in user_params.items()},
389
+ }
396
390
 
397
391
  def on_change(name, value):
398
392
  model_parameters.value = {**model_parameters.value, name: value}
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
6
6
  name = "Mesa"
7
7
  description = "Agent-based modeling (ABM) in Python"
8
8
  license = { text = "Apache 2.0" }
9
- requires-python = ">=3.10"
9
+ requires-python = ">=3.11"
10
10
  authors = [
11
11
  { name = "Project Mesa Team", email = "projectmesa@googlegroups.com" },
12
12
  ]
@@ -25,7 +25,6 @@ classifiers = [
25
25
  "Topic :: Scientific/Engineering :: Artificial Intelligence",
26
26
  "Intended Audience :: Science/Research",
27
27
  "Programming Language :: Python :: 3 :: Only",
28
- "Programming Language :: Python :: 3.10",
29
28
  "Programming Language :: Python :: 3.11",
30
29
  "Programming Language :: Python :: 3.12",
31
30
  "Programming Language :: Python :: 3.13",
@@ -93,9 +92,9 @@ path = "mesa/__init__.py"
93
92
 
94
93
  [tool.ruff]
95
94
  # See https://github.com/charliermarsh/ruff#rules for error code definitions.
96
- # Hardcode to Python 3.10.
95
+ # Hardcode to Python 3.11.
97
96
  # Reminder to update mesa-examples if the value below is changed.
98
- target-version = "py310"
97
+ target-version = "py311"
99
98
  extend-exclude = ["docs", "build"]
100
99
 
101
100
  [tool.ruff.lint]
@@ -583,40 +583,6 @@ def test_cell_collection():
583
583
  assert len(cells) == len(collection)
584
584
 
585
585
 
586
- def test_empty_cell_collection():
587
- """Test that CellCollection properly handles empty collections."""
588
- rng = random.Random(42)
589
-
590
- # Test initializing with empty collection
591
- collection = CellCollection([], random=rng)
592
- assert len(collection) == 0
593
- assert collection._capacity is None
594
- assert list(collection.cells) == []
595
- assert list(collection.agents) == []
596
-
597
- # Test selecting from empty collection
598
- selected = collection.select(lambda cell: True)
599
- assert len(selected) == 0
600
- assert selected._capacity is None
601
-
602
- # Test filtering to empty collection
603
- n = 10
604
- full_collection = CellCollection(
605
- [Cell((i,), random=rng) for i in range(n)], random=rng
606
- )
607
- assert len(full_collection) == n
608
-
609
- # Filter to empty collection
610
- empty_result = full_collection.select(lambda cell: False)
611
- assert len(empty_result) == 0
612
- assert empty_result._capacity is None
613
-
614
- # Test at_most with empty collection
615
- at_most_result = full_collection.select(lambda cell: False, at_most=5)
616
- assert len(at_most_result) == 0
617
- assert at_most_result._capacity is None
618
-
619
-
620
586
  ### PropertyLayer tests
621
587
  def test_property_layer_integration():
622
588
  """Test integration of PropertyLayer with DiscrateSpace and Cell."""
@@ -7,11 +7,6 @@ def test_import():
7
7
  See https://github.com/projectmesa/mesa/pull/1294.
8
8
  """
9
9
  import mesa
10
- from mesa.time import RandomActivation
11
-
12
- _ = mesa.time.RandomActivation
13
- _ = RandomActivation
14
-
15
10
  from mesa.space import MultiGrid
16
11
 
17
12
  _ = mesa.space.MultiGrid
@@ -1,7 +0,0 @@
1
- # Time
2
-
3
- ```{eval-rst}
4
- .. automodule:: mesa.time
5
- :members:
6
- :inherited-members:
7
- ```