Mesa 3.0.0__tar.gz → 3.0.0a0__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 (226) hide show
  1. mesa-3.0.0a0/.github/ISSUE_TEMPLATE/asking-help.md +9 -0
  2. {mesa-3.0.0 → mesa-3.0.0a0}/.github/ISSUE_TEMPLATE/bug-report.md +1 -2
  3. {mesa-3.0.0 → mesa-3.0.0a0}/.github/release.yml +0 -3
  4. {mesa-3.0.0 → mesa-3.0.0a0}/.github/workflows/benchmarks.yml +1 -1
  5. {mesa-3.0.0 → mesa-3.0.0a0}/.github/workflows/build_lint.yml +6 -12
  6. {mesa-3.0.0 → mesa-3.0.0a0}/.github/workflows/release.yml +1 -2
  7. {mesa-3.0.0 → mesa-3.0.0a0}/.gitignore +4 -6
  8. {mesa-3.0.0 → mesa-3.0.0a0}/.pre-commit-config.yaml +3 -3
  9. {mesa-3.0.0 → mesa-3.0.0a0}/.readthedocs.yml +3 -3
  10. mesa-3.0.0a0/CONTRIBUTING.md +110 -0
  11. {mesa-3.0.0 → mesa-3.0.0a0}/HISTORY.md +1 -537
  12. mesa-3.0.0/NOTICE → mesa-3.0.0a0/LICENSE +2 -2
  13. {mesa-3.0.0 → mesa-3.0.0a0}/PKG-INFO +13 -65
  14. {mesa-3.0.0 → mesa-3.0.0a0}/README.md +4 -24
  15. {mesa-3.0.0 → mesa-3.0.0a0}/benchmarks/Flocking/flocking.py +29 -20
  16. {mesa-3.0.0 → mesa-3.0.0a0}/benchmarks/Schelling/schelling.py +40 -44
  17. {mesa-3.0.0 → mesa-3.0.0a0}/benchmarks/WolfSheep/wolf_sheep.py +73 -50
  18. {mesa-3.0.0 → mesa-3.0.0a0}/benchmarks/compare_timings.py +2 -13
  19. {mesa-3.0.0 → mesa-3.0.0a0}/benchmarks/configurations.py +1 -27
  20. {mesa-3.0.0 → mesa-3.0.0a0}/benchmarks/global_benchmark.py +7 -30
  21. {mesa-3.0.0 → mesa-3.0.0a0}/codecov.yaml +2 -3
  22. {mesa-3.0.0 → mesa-3.0.0a0}/docs/README.md +5 -4
  23. {mesa-3.0.0 → mesa-3.0.0a0}/docs/apis/api_main.md +1 -2
  24. {mesa-3.0.0 → mesa-3.0.0a0}/docs/apis/batchrunner.md +0 -2
  25. {mesa-3.0.0 → mesa-3.0.0a0}/docs/apis/datacollection.md +0 -2
  26. {mesa-3.0.0 → mesa-3.0.0a0}/docs/apis/experimental.md +8 -4
  27. mesa-3.0.0a0/docs/apis/init.md +11 -0
  28. {mesa-3.0.0 → mesa-3.0.0a0}/docs/apis/space.md +0 -2
  29. {mesa-3.0.0 → mesa-3.0.0a0}/docs/apis/time.md +0 -2
  30. mesa-3.0.0a0/docs/apis/visualization.md +21 -0
  31. {mesa-3.0.0 → mesa-3.0.0a0}/docs/best-practices.md +21 -20
  32. {mesa-3.0.0 → mesa-3.0.0a0}/docs/conf.py +6 -93
  33. mesa-3.0.0a0/docs/howto.md +83 -0
  34. mesa-3.0.0a0/docs/images/Mesa_Screenshot.png +0 -0
  35. mesa-3.0.0a0/docs/index.md +102 -0
  36. mesa-3.0.0a0/docs/overview.md +116 -0
  37. mesa-3.0.0a0/docs/packages.md +110 -0
  38. {mesa-3.0.0 → mesa-3.0.0a0}/docs/tutorials/MoneyModel.py +9 -24
  39. {mesa-3.0.0 → mesa-3.0.0a0}/docs/tutorials/intro_tutorial.ipynb +306 -738
  40. mesa-3.0.0a0/docs/tutorials/visualization_tutorial.ipynb +271 -0
  41. {mesa-3.0.0 → mesa-3.0.0a0}/maintenance/fetch_unlabeled_prs.py +1 -2
  42. {mesa-3.0.0 → mesa-3.0.0a0}/mesa/__init__.py +3 -3
  43. mesa-3.0.0a0/mesa/agent.py +362 -0
  44. {mesa-3.0.0 → mesa-3.0.0a0}/mesa/batchrunner.py +27 -54
  45. mesa-3.0.0a0/mesa/cookiecutter-mesa/cookiecutter.json +8 -0
  46. mesa-3.0.0a0/mesa/cookiecutter-mesa/hooks/post_gen_project.py +11 -0
  47. mesa-3.0.0a0/mesa/cookiecutter-mesa/{{cookiecutter.snake}}/README.md +4 -0
  48. mesa-3.0.0a0/mesa/cookiecutter-mesa/{{cookiecutter.snake}}/app.pytemplate +27 -0
  49. mesa-3.0.0a0/mesa/cookiecutter-mesa/{{cookiecutter.snake}}/setup.pytemplate +11 -0
  50. mesa-3.0.0a0/mesa/cookiecutter-mesa/{{cookiecutter.snake}}/{{cookiecutter.snake}}/model.pytemplate +60 -0
  51. {mesa-3.0.0 → mesa-3.0.0a0}/mesa/datacollection.py +29 -140
  52. mesa-3.0.0a0/mesa/experimental/__init__.py +3 -0
  53. {mesa-3.0.0 → mesa-3.0.0a0}/mesa/experimental/cell_space/__init__.py +1 -16
  54. mesa-3.0.0a0/mesa/experimental/cell_space/cell.py +152 -0
  55. mesa-3.0.0a0/mesa/experimental/cell_space/cell_agent.py +37 -0
  56. mesa-3.0.0a0/mesa/experimental/cell_space/cell_collection.py +81 -0
  57. mesa-3.0.0a0/mesa/experimental/cell_space/discrete_space.py +64 -0
  58. {mesa-3.0.0 → mesa-3.0.0a0}/mesa/experimental/cell_space/grid.py +8 -32
  59. {mesa-3.0.0 → mesa-3.0.0a0}/mesa/experimental/cell_space/network.py +7 -12
  60. {mesa-3.0.0 → mesa-3.0.0a0}/mesa/experimental/devs/__init__.py +0 -2
  61. {mesa-3.0.0 → mesa-3.0.0a0}/mesa/experimental/devs/eventlist.py +14 -52
  62. {mesa-3.0.0 → mesa-3.0.0a0}/mesa/experimental/devs/examples/epstein_civil_violence.py +39 -71
  63. {mesa-3.0.0 → mesa-3.0.0a0}/mesa/experimental/devs/examples/wolf_sheep.py +45 -45
  64. {mesa-3.0.0 → mesa-3.0.0a0}/mesa/experimental/devs/simulator.py +15 -55
  65. mesa-3.0.0a0/mesa/main.py +63 -0
  66. mesa-3.0.0a0/mesa/model.py +163 -0
  67. {mesa-3.0.0 → mesa-3.0.0a0}/mesa/space.py +149 -215
  68. {mesa-3.0.0 → mesa-3.0.0a0}/mesa/time.py +77 -62
  69. {mesa-3.0.0/mesa/experimental → mesa-3.0.0a0/mesa/visualization}/UserParam.py +6 -17
  70. mesa-3.0.0a0/mesa/visualization/__init__.py +3 -0
  71. {mesa-3.0.0/mesa/experimental → mesa-3.0.0a0/mesa/visualization}/components/altair.py +0 -10
  72. mesa-3.0.0a0/mesa/visualization/components/matplotlib.py +134 -0
  73. mesa-3.0.0/mesa/experimental/solara_viz.py → mesa-3.0.0a0/mesa/visualization/jupyter_viz.py +110 -65
  74. {mesa-3.0.0 → mesa-3.0.0a0}/pyproject.toml +9 -29
  75. {mesa-3.0.0 → mesa-3.0.0a0}/tests/read_requirements.py +0 -1
  76. mesa-3.0.0a0/tests/test_agent.py +284 -0
  77. {mesa-3.0.0 → mesa-3.0.0a0}/tests/test_batch_run.py +38 -49
  78. mesa-3.0.0a0/tests/test_cell_space.py +465 -0
  79. mesa-3.0.0a0/tests/test_datacollector.py +234 -0
  80. {mesa-3.0.0 → mesa-3.0.0a0}/tests/test_devs.py +0 -6
  81. mesa-3.0.0a0/tests/test_examples.py +68 -0
  82. {mesa-3.0.0 → mesa-3.0.0a0}/tests/test_grid.py +88 -38
  83. {mesa-3.0.0 → mesa-3.0.0a0}/tests/test_import_namespace.py +2 -7
  84. mesa-3.0.0a0/tests/test_jupyter_viz.py +153 -0
  85. {mesa-3.0.0 → mesa-3.0.0a0}/tests/test_lifespan.py +26 -25
  86. mesa-3.0.0a0/tests/test_model.py +53 -0
  87. mesa-3.0.0a0/tests/test_scaffold.py +22 -0
  88. {mesa-3.0.0 → mesa-3.0.0a0}/tests/test_space.py +171 -155
  89. {mesa-3.0.0 → mesa-3.0.0a0}/tests/test_time.py +96 -71
  90. mesa-3.0.0/.github/ISSUE_TEMPLATE/config.yml +0 -5
  91. mesa-3.0.0/.github/PULL_REQUEST_TEMPLATE/bug.md +0 -16
  92. mesa-3.0.0/.github/PULL_REQUEST_TEMPLATE/feature.md +0 -16
  93. mesa-3.0.0/.github/pull_request_template.md +0 -4
  94. mesa-3.0.0/CONTRIBUTING.md +0 -162
  95. mesa-3.0.0/LICENSE +0 -202
  96. mesa-3.0.0/benchmarks/BoltzmannWealth/__init__.py +0 -1
  97. mesa-3.0.0/benchmarks/BoltzmannWealth/boltzmann_wealth.py +0 -112
  98. mesa-3.0.0/benchmarks/Flocking/__init__.py +0 -1
  99. mesa-3.0.0/benchmarks/Schelling/__init__.py +0 -1
  100. mesa-3.0.0/benchmarks/WolfSheep/__init__.py +0 -1
  101. mesa-3.0.0/binder/environment.yml +0 -14
  102. mesa-3.0.0/docs/_static/switcher.json +0 -12
  103. mesa-3.0.0/docs/apis/agent.md +0 -8
  104. mesa-3.0.0/docs/apis/model.md +0 -7
  105. mesa-3.0.0/docs/apis/visualization.md +0 -47
  106. mesa-3.0.0/docs/example_template.txt +0 -22
  107. mesa-3.0.0/docs/examples_overview_template.txt +0 -13
  108. mesa-3.0.0/docs/getting_started.md +0 -262
  109. mesa-3.0.0/docs/images/wolf_sheep.png +0 -0
  110. mesa-3.0.0/docs/index.md +0 -101
  111. mesa-3.0.0/docs/migration_guide.md +0 -335
  112. mesa-3.0.0/docs/tutorials/visualization_tutorial.ipynb +0 -433
  113. mesa-3.0.0/mesa/agent.py +0 -654
  114. mesa-3.0.0/mesa/examples/README.md +0 -37
  115. mesa-3.0.0/mesa/examples/__init__.py +0 -21
  116. mesa-3.0.0/mesa/examples/advanced/epstein_civil_violence/Epstein Civil Violence.ipynb +0 -116
  117. mesa-3.0.0/mesa/examples/advanced/epstein_civil_violence/Readme.md +0 -34
  118. mesa-3.0.0/mesa/examples/advanced/epstein_civil_violence/agents.py +0 -164
  119. mesa-3.0.0/mesa/examples/advanced/epstein_civil_violence/app.py +0 -73
  120. mesa-3.0.0/mesa/examples/advanced/epstein_civil_violence/model.py +0 -114
  121. mesa-3.0.0/mesa/examples/advanced/pd_grid/Readme.md +0 -43
  122. mesa-3.0.0/mesa/examples/advanced/pd_grid/agents.py +0 -50
  123. mesa-3.0.0/mesa/examples/advanced/pd_grid/analysis.ipynb +0 -228
  124. mesa-3.0.0/mesa/examples/advanced/pd_grid/app.py +0 -54
  125. mesa-3.0.0/mesa/examples/advanced/pd_grid/model.py +0 -71
  126. mesa-3.0.0/mesa/examples/advanced/sugarscape_g1mt/Readme.md +0 -64
  127. mesa-3.0.0/mesa/examples/advanced/sugarscape_g1mt/agents.py +0 -344
  128. mesa-3.0.0/mesa/examples/advanced/sugarscape_g1mt/app.py +0 -62
  129. mesa-3.0.0/mesa/examples/advanced/sugarscape_g1mt/model.py +0 -180
  130. mesa-3.0.0/mesa/examples/advanced/sugarscape_g1mt/sugar-map.txt +0 -50
  131. mesa-3.0.0/mesa/examples/advanced/sugarscape_g1mt/tests.py +0 -69
  132. mesa-3.0.0/mesa/examples/advanced/wolf_sheep/Readme.md +0 -57
  133. mesa-3.0.0/mesa/examples/advanced/wolf_sheep/agents.py +0 -102
  134. mesa-3.0.0/mesa/examples/advanced/wolf_sheep/app.py +0 -84
  135. mesa-3.0.0/mesa/examples/advanced/wolf_sheep/model.py +0 -137
  136. mesa-3.0.0/mesa/examples/basic/__init__.py +0 -0
  137. mesa-3.0.0/mesa/examples/basic/boid_flockers/Readme.md +0 -22
  138. mesa-3.0.0/mesa/examples/basic/boid_flockers/__init__.py +0 -0
  139. mesa-3.0.0/mesa/examples/basic/boid_flockers/agents.py +0 -71
  140. mesa-3.0.0/mesa/examples/basic/boid_flockers/app.py +0 -58
  141. mesa-3.0.0/mesa/examples/basic/boid_flockers/model.py +0 -69
  142. mesa-3.0.0/mesa/examples/basic/boltzmann_wealth_model/Readme.md +0 -56
  143. mesa-3.0.0/mesa/examples/basic/boltzmann_wealth_model/__init__.py +0 -0
  144. mesa-3.0.0/mesa/examples/basic/boltzmann_wealth_model/agents.py +0 -31
  145. mesa-3.0.0/mesa/examples/basic/boltzmann_wealth_model/app.py +0 -74
  146. mesa-3.0.0/mesa/examples/basic/boltzmann_wealth_model/model.py +0 -43
  147. mesa-3.0.0/mesa/examples/basic/boltzmann_wealth_model/st_app.py +0 -115
  148. mesa-3.0.0/mesa/examples/basic/conways_game_of_life/Readme.md +0 -39
  149. mesa-3.0.0/mesa/examples/basic/conways_game_of_life/__init__.py +0 -0
  150. mesa-3.0.0/mesa/examples/basic/conways_game_of_life/agents.py +0 -47
  151. mesa-3.0.0/mesa/examples/basic/conways_game_of_life/app.py +0 -51
  152. mesa-3.0.0/mesa/examples/basic/conways_game_of_life/model.py +0 -31
  153. mesa-3.0.0/mesa/examples/basic/conways_game_of_life/st_app.py +0 -72
  154. mesa-3.0.0/mesa/examples/basic/schelling/Readme.md +0 -40
  155. mesa-3.0.0/mesa/examples/basic/schelling/__init__.py +0 -0
  156. mesa-3.0.0/mesa/examples/basic/schelling/agents.py +0 -26
  157. mesa-3.0.0/mesa/examples/basic/schelling/analysis.ipynb +0 -205
  158. mesa-3.0.0/mesa/examples/basic/schelling/app.py +0 -42
  159. mesa-3.0.0/mesa/examples/basic/schelling/model.py +0 -59
  160. mesa-3.0.0/mesa/examples/basic/virus_on_network/Readme.md +0 -61
  161. mesa-3.0.0/mesa/examples/basic/virus_on_network/__init__.py +0 -0
  162. mesa-3.0.0/mesa/examples/basic/virus_on_network/agents.py +0 -69
  163. mesa-3.0.0/mesa/examples/basic/virus_on_network/app.py +0 -114
  164. mesa-3.0.0/mesa/examples/basic/virus_on_network/model.py +0 -96
  165. mesa-3.0.0/mesa/experimental/__init__.py +0 -13
  166. mesa-3.0.0/mesa/experimental/cell_space/cell.py +0 -222
  167. mesa-3.0.0/mesa/experimental/cell_space/cell_agent.py +0 -133
  168. mesa-3.0.0/mesa/experimental/cell_space/cell_collection.py +0 -118
  169. mesa-3.0.0/mesa/experimental/cell_space/discrete_space.py +0 -148
  170. mesa-3.0.0/mesa/experimental/cell_space/voronoi.py +0 -257
  171. mesa-3.0.0/mesa/experimental/components/matplotlib.py +0 -242
  172. mesa-3.0.0/mesa/model.py +0 -291
  173. mesa-3.0.0/mesa/visualization/__init__.py +0 -26
  174. mesa-3.0.0/mesa/visualization/components/__init__.py +0 -83
  175. mesa-3.0.0/mesa/visualization/components/altair_components.py +0 -188
  176. mesa-3.0.0/mesa/visualization/components/matplotlib_components.py +0 -175
  177. mesa-3.0.0/mesa/visualization/mpl_space_drawing.py +0 -593
  178. mesa-3.0.0/mesa/visualization/solara_viz.py +0 -458
  179. mesa-3.0.0/mesa/visualization/user_param.py +0 -69
  180. mesa-3.0.0/mesa/visualization/utils.py +0 -9
  181. mesa-3.0.0/tests/__init__.py +0 -1
  182. mesa-3.0.0/tests/test_agent.py +0 -660
  183. mesa-3.0.0/tests/test_cell_space.py +0 -752
  184. mesa-3.0.0/tests/test_components_matplotlib.py +0 -237
  185. mesa-3.0.0/tests/test_datacollector.py +0 -356
  186. mesa-3.0.0/tests/test_examples.py +0 -72
  187. mesa-3.0.0/tests/test_model.py +0 -110
  188. mesa-3.0.0/tests/test_solara_viz.py +0 -215
  189. {mesa-3.0.0 → mesa-3.0.0a0}/.codespellignore +0 -0
  190. {mesa-3.0.0 → mesa-3.0.0a0}/.coveragerc +0 -0
  191. {mesa-3.0.0 → mesa-3.0.0a0}/.github/ISSUE_TEMPLATE/feature-request.md +0 -0
  192. {mesa-3.0.0 → mesa-3.0.0a0}/.github/dependabot.yml +0 -0
  193. {mesa-3.0.0 → mesa-3.0.0a0}/CITATION.bib +0 -0
  194. {mesa-3.0.0 → mesa-3.0.0a0}/CODE_OF_CONDUCT.md +0 -0
  195. {mesa-3.0.0 → mesa-3.0.0a0}/Dockerfile +0 -0
  196. {mesa-3.0.0/mesa/examples/advanced → mesa-3.0.0a0/benchmarks/Flocking}/__init__.py +0 -0
  197. {mesa-3.0.0/mesa/examples/advanced/epstein_civil_violence → mesa-3.0.0a0/benchmarks/Schelling}/__init__.py +0 -0
  198. {mesa-3.0.0/mesa/examples/advanced/pd_grid → mesa-3.0.0a0/benchmarks/WolfSheep}/__init__.py +0 -0
  199. {mesa-3.0.0 → mesa-3.0.0a0}/docker-compose.yml +0 -0
  200. {mesa-3.0.0 → mesa-3.0.0a0}/docs/Makefile +0 -0
  201. {mesa-3.0.0 → mesa-3.0.0a0}/docs/images/mesa_logo.ico +0 -0
  202. {mesa-3.0.0 → mesa-3.0.0a0}/docs/images/mesa_logo.png +0 -0
  203. {mesa-3.0.0 → mesa-3.0.0a0}/docs/images/tutorial/br_ginis.png +0 -0
  204. {mesa-3.0.0 → mesa-3.0.0a0}/docs/images/tutorial/dc_endwealth.png +0 -0
  205. {mesa-3.0.0 → mesa-3.0.0a0}/docs/images/tutorial/dc_gini.png +0 -0
  206. {mesa-3.0.0 → mesa-3.0.0a0}/docs/images/tutorial/dc_oneagent.png +0 -0
  207. {mesa-3.0.0 → mesa-3.0.0a0}/docs/images/tutorial/first_hist.png +0 -0
  208. {mesa-3.0.0 → mesa-3.0.0a0}/docs/images/tutorial/multirun_hist.png +0 -0
  209. {mesa-3.0.0 → mesa-3.0.0a0}/docs/images/tutorial/numpy_grid.png +0 -0
  210. {mesa-3.0.0 → mesa-3.0.0a0}/docs/images/tutorial/viz_chart.png +0 -0
  211. {mesa-3.0.0 → mesa-3.0.0a0}/docs/images/tutorial/viz_empty.png +0 -0
  212. {mesa-3.0.0 → mesa-3.0.0a0}/docs/images/tutorial/viz_greycircles.png +0 -0
  213. {mesa-3.0.0 → mesa-3.0.0a0}/docs/images/tutorial/viz_histogram.png +0 -0
  214. {mesa-3.0.0 → mesa-3.0.0a0}/docs/images/tutorial/viz_redcircles.png +0 -0
  215. {mesa-3.0.0 → mesa-3.0.0a0}/docs/make.bat +0 -0
  216. {mesa-3.0.0 → mesa-3.0.0a0}/docs/mesa.md +0 -0
  217. {mesa-3.0.0 → mesa-3.0.0a0}/docs/tutorials/files/viz_chart.png +0 -0
  218. {mesa-3.0.0 → mesa-3.0.0a0}/docs/tutorials/files/viz_empty.png +0 -0
  219. {mesa-3.0.0 → mesa-3.0.0a0}/docs/tutorials/files/viz_greycircles.png +0 -0
  220. {mesa-3.0.0 → mesa-3.0.0a0}/docs/tutorials/files/viz_histogram.png +0 -0
  221. {mesa-3.0.0 → mesa-3.0.0a0}/docs/tutorials/files/viz_redcircles.png +0 -0
  222. {mesa-3.0.0 → mesa-3.0.0a0}/docs/tutorials/files/viz_slider.png +0 -0
  223. {mesa-3.0.0/mesa/examples/advanced/sugarscape_g1mt → mesa-3.0.0a0/mesa/cookiecutter-mesa/{{cookiecutter.snake}}/{{cookiecutter.snake}}}/__init__.py +0 -0
  224. {mesa-3.0.0 → mesa-3.0.0a0}/mypy.ini +0 -0
  225. {mesa-3.0.0/mesa/examples/advanced/wolf_sheep → mesa-3.0.0a0/tests}/__init__.py +0 -0
  226. {mesa-3.0.0 → mesa-3.0.0a0}/tests/test_end_to_end_viz.sh +0 -0
@@ -0,0 +1,9 @@
1
+ ---
2
+ name: Asking for help
3
+ about: If you need help using Mesa, you should post in https://github.com/projectmesa/mesa/discussions
4
+ ---
5
+
6
+ <!--
7
+ ATTENTION: Don't raise an issue here!
8
+ If you need help, ask in https://github.com/projectmesa/mesa/discussions
9
+ -->
@@ -11,8 +11,7 @@ about: Let us know if something is broken on Mesa
11
11
  <!-- A clear and concise description of what you expected to happen -->
12
12
 
13
13
  **To Reproduce**
14
- <!-- Steps to reproduce the bug, or a link to a project where the bug is visible
15
- Include a Minimal reproducible example: https://stackoverflow.com/help/minimal-reproducible-example -->
14
+ <!-- Steps to reproduce the bug, or a link to a project where the bug is visible -->
16
15
 
17
16
  **Additional context**
18
17
  <!--
@@ -19,9 +19,6 @@ changelog:
19
19
  - title: 🐛 Bugs fixed
20
20
  labels:
21
21
  - bug
22
- - title: 🔍 Examples updated
23
- labels:
24
- - example
25
22
  - title: 📜 Documentation improvements
26
23
  labels:
27
24
  - docs
@@ -25,7 +25,7 @@ jobs:
25
25
  - name: Set up Python
26
26
  uses: actions/setup-python@v5
27
27
  with:
28
- python-version: '3.13'
28
+ python-version: '3.12'
29
29
  - name: Add project directory to PYTHONPATH
30
30
  run: echo "PYTHONPATH=$PYTHONPATH:$(pwd)" >> $GITHUB_ENV
31
31
  - name: Install dependencies
@@ -31,10 +31,8 @@ jobs:
31
31
  fail-fast: False
32
32
  matrix:
33
33
  os: [windows, ubuntu, macos]
34
- python-version: ["3.13"]
34
+ python-version: ["3.12"]
35
35
  include:
36
- - os: ubuntu
37
- python-version: "3.12"
38
36
  - os: ubuntu
39
37
  python-version: "3.11"
40
38
  - os: ubuntu
@@ -49,20 +47,17 @@ jobs:
49
47
  uses: actions/setup-python@v5
50
48
  with:
51
49
  python-version: ${{ matrix.python-version }}
52
- allow-prereleases: true
53
50
  cache: 'pip'
54
51
  - name: Install uv
55
52
  run: pip install uv
56
- - name: Install Mesa and dependencies
53
+ - name: Install Mesa
54
+ # See https://github.com/astral-sh/uv/issues/1945
57
55
  run: uv pip install --system .[dev]
58
56
  - name: Test with pytest
59
57
  run: pytest --durations=10 --cov=mesa tests/ --cov-report=xml
60
58
  - if: matrix.os == 'ubuntu'
61
59
  name: Codecov
62
60
  uses: codecov/codecov-action@v4
63
- with:
64
- fail_ci_if_error: true
65
- token: ${{ secrets.CODECOV_TOKEN }}
66
61
 
67
62
  examples:
68
63
  runs-on: ubuntu-latest
@@ -71,13 +66,12 @@ jobs:
71
66
  - name: Set up Python
72
67
  uses: actions/setup-python@v5
73
68
  with:
74
- python-version: "3.13"
75
- allow-prereleases: true
69
+ python-version: "3.12"
76
70
  cache: 'pip'
77
71
  - name: Install uv
78
72
  run: pip install uv
79
73
  - name: Install Mesa
80
- run: uv pip install --system .[examples]
74
+ run: uv pip install --system .[dev]
81
75
  - name: Checkout mesa-examples
82
76
  uses: actions/checkout@v4
83
77
  with:
@@ -86,4 +80,4 @@ jobs:
86
80
  - name: Test examples
87
81
  run: |
88
82
  cd mesa-examples
89
- pytest -rA -Werror -Wdefault::FutureWarning test_examples.py
83
+ pytest test_examples.py
@@ -32,8 +32,7 @@ jobs:
32
32
  - name: Set up Python
33
33
  uses: actions/setup-python@v5
34
34
  with:
35
- python-version: "3.13"
36
- allow-prereleases: true
35
+ python-version: "3.12"
37
36
  cache: 'pip'
38
37
  - name: Install dependencies
39
38
  run: pip install -U pip hatch
@@ -1,10 +1,6 @@
1
1
  # Benchmarking
2
2
  benchmarks/**/*.pickle
3
3
 
4
- # exampledocs
5
- docs/examples/*
6
- docs/example.md
7
-
8
4
  # Byte-compiled / optimized / DLL files
9
5
  __pycache__/
10
6
  *.py[cod]
@@ -19,8 +15,6 @@ __pycache__/
19
15
  .Python
20
16
  env/
21
17
  venv/
22
- pythonenv*/
23
- .venv/
24
18
  build/
25
19
  develop-eggs/
26
20
  dist/
@@ -89,6 +83,10 @@ target/
89
83
  .dmypy.json
90
84
  dmypy.json
91
85
 
86
+ # pythonenv
87
+ pythonenv*/
88
+
92
89
  # JS dependencies
93
90
  mesa/visualization/templates/external/
94
91
  mesa/visualization/templates/js/external/
92
+
@@ -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.5.0
8
8
  hooks:
9
9
  # Run the linter.
10
10
  - id: ruff
@@ -14,12 +14,12 @@ repos:
14
14
  - id: ruff-format
15
15
  types_or: [ python, pyi, jupyter ]
16
16
  - repo: https://github.com/asottile/pyupgrade
17
- rev: v3.19.0
17
+ rev: v3.16.0
18
18
  hooks:
19
19
  - id: pyupgrade
20
20
  args: [--py310-plus]
21
21
  - repo: https://github.com/pre-commit/pre-commit-hooks
22
- rev: v5.0.0 # Use the ref you want to point at
22
+ rev: v4.6.0 # Use the ref you want to point at
23
23
  hooks:
24
24
  - id: trailing-whitespace
25
25
  - id: check-toml
@@ -1,5 +1,5 @@
1
1
  # Read the Docs configuration file
2
- # See https://docs.readthedocs.io/stable/config-file/v2.html for details
2
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3
3
 
4
4
  # Required
5
5
  version: 2
@@ -13,9 +13,9 @@ formats:
13
13
  - pdf
14
14
 
15
15
  build:
16
- os: ubuntu-lts-latest
16
+ os: "ubuntu-22.04"
17
17
  tools:
18
- python: latest
18
+ python: "3"
19
19
 
20
20
  # Optionally set the version of Python and requirements required to build your docs
21
21
  python:
@@ -0,0 +1,110 @@
1
+ # Contributing
2
+
3
+ As an open source project, Mesa welcomes contributions of many forms, and from beginners to experts. If you are
4
+ curious or just want to see what is happening, we post our development session agendas
5
+ and development session notes on [Mesa discussions]. We also have a threaded discussion forum on [Matrix]
6
+ for casual conversation.
7
+
8
+ In no particular order, examples include:
9
+
10
+ - Code patches
11
+ - Bug reports and patch reviews
12
+ - New features
13
+ - Documentation improvements
14
+ - Tutorials
15
+
16
+ No contribution is too small. Although, contributions can be too big, so let's
17
+ discuss via [Matrix] OR via [an issue].
18
+
19
+ **To submit a contribution**
20
+
21
+ - Create a ticket for the item that you are working on.
22
+ - Fork the Mesa repository.
23
+ - [Clone your repository] from Github to your machine.
24
+ - Create a new branch in your fork: `git checkout -b BRANCH_NAME`
25
+ - Run `git config pull.rebase true`. This prevents messy merge commits when updating your branch on top of Mesa main branch.
26
+ - Install an editable version with developer requirements locally: `pip install -e ".[dev]"`
27
+ - Edit the code. Save.
28
+ - Git add the new files and files with changes: `git add FILE_NAME`
29
+ - Git commit your changes with a meaningful message: `git commit -m "Fix issue X"`
30
+ - If implementing a new feature, include some documentation in docs folder.
31
+ - Make sure that your submission works with a few of the examples in the examples repository. If adding a new feature to mesa, please illustrate usage by implementing it in an example.
32
+ - Make sure that your submission passes the [GH Actions build]. See "Testing and Standards below" to be able to run these locally.
33
+ - Make sure that your code is formatted according to [the black] standard (you can do it via [pre-commit]).
34
+ - Push your changes to your fork on Github: `git push origin NAME_OF_BRANCH`.
35
+ - [Create a pull request].
36
+ - Describe the change w/ ticket number(s) that the code fixes.
37
+ - Format your commit message as per [Tim Pope's guideline].
38
+
39
+ ## Testing and Code Standards
40
+
41
+ ```{image} https://codecov.io/gh/projectmesa/mesa/branch/main/graph/badge.svg
42
+ :target: https://codecov.io/gh/projectmesa/mesa
43
+ ```
44
+
45
+ ```{image} https://img.shields.io/badge/code%20style-black-000000.svg
46
+ :target: https://github.com/psf/black
47
+ ```
48
+
49
+ As part of our contribution process, we practice continuous integration and use GH Actions to help enforce best practices.
50
+
51
+ If you're changing previous Mesa features, please make sure of the following:
52
+
53
+ - Your changes pass the current tests.
54
+ - Your changes pass our style standards.
55
+ - Your changes don't break the models or your changes include updated models.
56
+ - Additional features or rewrites of current features are accompanied by tests.
57
+ - New features are demonstrated in a model, so folks can understand more easily.
58
+
59
+ To ensure that your submission will not break the build, you will need to install Ruff and pytest.
60
+
61
+ ```bash
62
+ pip install ruff pytest pytest-cov
63
+ ```
64
+
65
+ We test by implementing simple models and through traditional unit tests in the tests/ folder. The following only covers unit tests coverage. Ensure that your test coverage has not gone down. If it has and you need help, we will offer advice on how to structure tests for the contribution.
66
+
67
+ ```bash
68
+ py.test --cov=mesa tests/
69
+ ```
70
+
71
+ With respect to code standards, we follow [PEP8] and the [Google Style Guide]. We use [ruff format] (a more performant alternative to `black`) as an automated code formatter. You can automatically format your code using [pre-commit], which will prevent `git commit` of unstyled code and will automatically apply black style so you can immediately re-run `git commit`. To set up pre-commit run the following commands:
72
+
73
+ ```bash
74
+ pip install pre-commit
75
+ pre-commit install
76
+ ```
77
+
78
+ You should no longer have to worry about code formatting. If still in doubt you may run the following command. If the command generates errors, fix all errors that are returned.
79
+
80
+ ```bash
81
+ ruff .
82
+ ```
83
+
84
+ ## Licensing
85
+
86
+ The license of this project is located in [LICENSE]. By submitting a contribution to this project, you are agreeing that your contribution will be released under the terms of this license.
87
+
88
+ ## Special Thanks
89
+
90
+ A special thanks to the following projects who offered inspiration for this contributing file.
91
+
92
+ - [Django]
93
+ - [18F's FOIA]
94
+ - [18F's Midas]
95
+
96
+ [18f's foia]: https://github.com/18F/foia-hub/blob/master/CONTRIBUTING.md
97
+ [18f's midas]: https://github.com/18F/midas/blob/devel/CONTRIBUTING.md
98
+ [an issue]: https://github.com/projectmesa/mesa/issues
99
+ [black]: https://github.com/psf/black
100
+ [clone your repository]: https://help.github.com/articles/cloning-a-repository/
101
+ [create a pull request]: https://help.github.com/articles/creating-a-pull-request/
102
+ [django]: https://github.com/django/django/blob/master/CONTRIBUTING.rst
103
+ [gh actions build]: https://github.com/projectmesa/mesa/actions/workflows/build_lint.yml
104
+ [google style guide]: https://google.github.io/styleguide/pyguide.html
105
+ [license]: https://github.com/projectmesa/mesa/blob/main/LICENSE
106
+ [matrix]: https://matrix.to/#/#project-mesa:matrix.org`
107
+ [mesa discussions]: https://github.com/projectmesa/mesa/discussions
108
+ [pep8]: https://www.python.org/dev/peps/pep-0008
109
+ [pre-commit]: https://github.com/pre-commit/pre-commit
110
+ [tim pope's guideline]: https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html