Mesa 2.2.3__tar.gz → 2.3.0__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.
- mesa-2.3.0/.github/workflows/benchmarks.yml +87 -0
- {mesa-2.2.3 → mesa-2.3.0}/.github/workflows/build_lint.yml +11 -42
- {mesa-2.2.3 → mesa-2.3.0}/.github/workflows/release.yml +1 -0
- {mesa-2.2.3 → mesa-2.3.0}/.gitignore +5 -0
- {mesa-2.2.3 → mesa-2.3.0}/.pre-commit-config.yaml +11 -3
- mesa-2.3.0/CODE_OF_CONDUCT.md +131 -0
- mesa-2.3.0/CONTRIBUTING.md +110 -0
- {mesa-2.2.3 → mesa-2.3.0}/HISTORY.md +105 -2
- {mesa-2.2.3 → mesa-2.3.0}/PKG-INFO +12 -9
- {mesa-2.2.3 → mesa-2.3.0}/README.md +7 -7
- mesa-2.3.0/benchmarks/Flocking/flocking.py +166 -0
- mesa-2.3.0/benchmarks/Schelling/schelling.py +109 -0
- mesa-2.3.0/benchmarks/WolfSheep/__init__.py +0 -0
- mesa-2.3.0/benchmarks/WolfSheep/wolf_sheep.py +254 -0
- mesa-2.3.0/benchmarks/compare_timings.py +87 -0
- mesa-2.3.0/benchmarks/configurations.py +84 -0
- mesa-2.3.0/benchmarks/global_benchmark.py +83 -0
- mesa-2.3.0/codecov.yaml +12 -0
- mesa-2.3.0/docs/apis/api_main.md +12 -0
- mesa-2.2.3/docs/apis/batchrunner.rst → mesa-2.3.0/docs/apis/batchrunner.md +2 -0
- mesa-2.2.3/docs/apis/datacollection.rst → mesa-2.3.0/docs/apis/datacollection.md +2 -0
- mesa-2.2.3/docs/apis/init.rst → mesa-2.3.0/docs/apis/init.md +6 -3
- mesa-2.3.0/docs/apis/space.md +5 -0
- mesa-2.2.3/docs/apis/time.rst → mesa-2.3.0/docs/apis/time.md +2 -0
- mesa-2.2.3/docs/apis/visualization.rst → mesa-2.3.0/docs/apis/visualization.md +16 -4
- mesa-2.3.0/docs/best-practices.md +80 -0
- mesa-2.3.0/docs/howto.md +83 -0
- mesa-2.3.0/docs/index.md +105 -0
- mesa-2.2.3/docs/mesa.rst → mesa-2.3.0/docs/mesa.md +30 -25
- mesa-2.3.0/docs/mesa.visualization.md +46 -0
- mesa-2.2.3/docs/mesa.visualization.modules.rst → mesa-2.3.0/docs/mesa.visualization.modules.md +26 -20
- mesa-2.2.3/docs/modular-visualization.rst → mesa-2.3.0/docs/modular-visualization.md +99 -104
- mesa-2.2.3/docs/overview.rst → mesa-2.3.0/docs/overview.md +95 -105
- mesa-2.2.3/docs/packages.rst → mesa-2.3.0/docs/packages.md +40 -56
- {mesa-2.2.3 → mesa-2.3.0}/docs/tutorials/MoneyModel.py +1 -0
- {mesa-2.2.3 → mesa-2.3.0}/docs/tutorials/intro_tutorial.ipynb +13 -8
- {mesa-2.2.3 → mesa-2.3.0}/mesa/__init__.py +2 -1
- {mesa-2.2.3 → mesa-2.3.0}/mesa/agent.py +36 -31
- mesa-2.3.0/mesa/cookiecutter-mesa/{{cookiecutter.snake}}/{{cookiecutter.snake}}/__init__.py +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/mesa/datacollection.py +12 -8
- mesa-2.3.0/mesa/experimental/UserParam.py +56 -0
- mesa-2.3.0/mesa/experimental/__init__.py +5 -0
- mesa-2.3.0/mesa/experimental/cell_space/__init__.py +23 -0
- mesa-2.3.0/mesa/experimental/cell_space/cell.py +152 -0
- mesa-2.3.0/mesa/experimental/cell_space/cell_agent.py +37 -0
- mesa-2.3.0/mesa/experimental/cell_space/cell_collection.py +81 -0
- mesa-2.3.0/mesa/experimental/cell_space/discrete_space.py +64 -0
- mesa-2.3.0/mesa/experimental/cell_space/grid.py +204 -0
- mesa-2.3.0/mesa/experimental/cell_space/network.py +40 -0
- mesa-2.3.0/mesa/experimental/components/altair.py +72 -0
- {mesa-2.2.3 → mesa-2.3.0}/mesa/experimental/components/matplotlib.py +6 -2
- mesa-2.3.0/mesa/experimental/devs/__init__.py +4 -0
- mesa-2.3.0/mesa/experimental/devs/eventlist.py +166 -0
- mesa-2.3.0/mesa/experimental/devs/examples/epstein_civil_violence.py +273 -0
- mesa-2.3.0/mesa/experimental/devs/examples/wolf_sheep.py +250 -0
- mesa-2.3.0/mesa/experimental/devs/simulator.py +293 -0
- {mesa-2.2.3 → mesa-2.3.0}/mesa/experimental/jupyter_viz.py +122 -60
- {mesa-2.2.3 → mesa-2.3.0}/mesa/main.py +8 -5
- {mesa-2.2.3 → mesa-2.3.0}/mesa/model.py +15 -4
- {mesa-2.2.3 → mesa-2.3.0}/mesa/space.py +32 -16
- {mesa-2.2.3 → mesa-2.3.0}/mesa/time.py +13 -113
- {mesa-2.2.3 → mesa-2.3.0}/pyproject.toml +46 -40
- mesa-2.3.0/tests/__init__.py +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/tests/test_agent.py +32 -1
- {mesa-2.2.3 → mesa-2.3.0}/tests/test_batch_run.py +3 -3
- mesa-2.3.0/tests/test_cell_space.py +465 -0
- {mesa-2.2.3 → mesa-2.3.0}/tests/test_datacollector.py +1 -0
- mesa-2.3.0/tests/test_devs.py +282 -0
- {mesa-2.2.3 → mesa-2.3.0}/tests/test_examples.py +2 -2
- {mesa-2.2.3 → mesa-2.3.0}/tests/test_grid.py +11 -10
- {mesa-2.2.3 → mesa-2.3.0}/tests/test_jupyter_viz.py +64 -45
- {mesa-2.2.3 → mesa-2.3.0}/tests/test_space.py +73 -31
- {mesa-2.2.3 → mesa-2.3.0}/tests/test_time.py +22 -115
- mesa-2.2.3/.github/workflows/codespell.yml +0 -18
- mesa-2.2.3/CODE_OF_CONDUCT.md +0 -46
- mesa-2.2.3/CONTRIBUTING.rst +0 -121
- mesa-2.2.3/docs/apis/api_main.rst +0 -12
- mesa-2.2.3/docs/apis/space.rst +0 -3
- mesa-2.2.3/docs/best-practices.rst +0 -87
- mesa-2.2.3/docs/howto.rst +0 -70
- mesa-2.2.3/docs/index.rst +0 -111
- mesa-2.2.3/docs/mesa.visualization.rst +0 -45
- mesa-2.2.3/mesa/experimental/__init__.py +0 -1
- {mesa-2.2.3 → mesa-2.3.0}/.codespellignore +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/.coveragerc +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/.github/ISSUE_TEMPLATE/asking-help.md +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/.github/ISSUE_TEMPLATE/bug-report.md +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/.github/ISSUE_TEMPLATE/feature-request.md +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/.github/dependabot.yml +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/.github/release.yml +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/.readthedocs.yml +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/CITATION.bib +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/Dockerfile +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/LICENSE +0 -0
- {mesa-2.2.3/mesa/cookiecutter-mesa/{{cookiecutter.snake}}/{{cookiecutter.snake}} → mesa-2.3.0/benchmarks/Flocking}/__init__.py +0 -0
- {mesa-2.2.3/tests → mesa-2.3.0/benchmarks/Schelling}/__init__.py +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/docker-compose.yml +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/docs/Makefile +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/docs/README.md +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/docs/conf.py +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/docs/images/Mesa_Screenshot.png +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/docs/images/mesa_logo.ico +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/docs/images/mesa_logo.png +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/docs/images/tutorial/br_ginis.png +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/docs/images/tutorial/dc_endwealth.png +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/docs/images/tutorial/dc_gini.png +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/docs/images/tutorial/dc_oneagent.png +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/docs/images/tutorial/first_hist.png +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/docs/images/tutorial/multirun_hist.png +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/docs/images/tutorial/numpy_grid.png +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/docs/images/tutorial/viz_chart.png +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/docs/images/tutorial/viz_empty.png +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/docs/images/tutorial/viz_greycircles.png +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/docs/images/tutorial/viz_histogram.png +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/docs/images/tutorial/viz_redcircles.png +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/docs/make.bat +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/docs/tutorials/adv_tutorial_legacy.ipynb +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/docs/tutorials/files/viz_chart.png +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/docs/tutorials/files/viz_empty.png +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/docs/tutorials/files/viz_greycircles.png +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/docs/tutorials/files/viz_histogram.png +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/docs/tutorials/files/viz_redcircles.png +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/docs/tutorials/files/viz_slider.png +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/docs/tutorials/visualization_tutorial.ipynb +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/mesa/batchrunner.py +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/mesa/cookiecutter-mesa/cookiecutter.json +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/mesa/cookiecutter-mesa/hooks/post_gen_project.py +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/mesa/cookiecutter-mesa/{{cookiecutter.snake}}/README.md +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/mesa/cookiecutter-mesa/{{cookiecutter.snake}}/run.pytemplate +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/mesa/cookiecutter-mesa/{{cookiecutter.snake}}/setup.pytemplate +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/mesa/cookiecutter-mesa/{{cookiecutter.snake}}/{{cookiecutter.snake}}/model.pytemplate +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/mesa/cookiecutter-mesa/{{cookiecutter.snake}}/{{cookiecutter.snake}}/server.pytemplate +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/mesa/flat/__init__.py +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/mesa/flat/visualization.py +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/mesa/visualization/ModularVisualization.py +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/mesa/visualization/TextVisualization.py +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/mesa/visualization/UserParam.py +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/mesa/visualization/__init__.py +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/mesa/visualization/modules.py +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/mypy.ini +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/tests/read_requirements.py +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/tests/test_end_to_end_viz.sh +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/tests/test_import_namespace.py +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/tests/test_lifespan.py +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/tests/test_main.py +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/tests/test_model.py +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/tests/test_scaffold.py +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/tests/test_tornado.py +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/tests/test_usersettableparam.py +0 -0
- {mesa-2.2.3 → mesa-2.3.0}/tests/test_visualization.py +0 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
name: Performance benchmarks
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request_target:
|
|
5
|
+
types: [opened, ready_for_review, labeled]
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
paths:
|
|
9
|
+
- '**.py'
|
|
10
|
+
- '.github/workflows/benchmarks.yml'
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
issues: write
|
|
14
|
+
pull-requests: write
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
run-benchmarks:
|
|
18
|
+
if: >
|
|
19
|
+
github.event.action == 'labeled' && contains(github.event.pull_request.labels.*.name, 'trigger-benchmarks') ||
|
|
20
|
+
github.event.action == 'opened' ||
|
|
21
|
+
github.event.action == 'ready_for_review'
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
steps:
|
|
24
|
+
# Python and dependency setup
|
|
25
|
+
- name: Set up Python
|
|
26
|
+
uses: actions/setup-python@v5
|
|
27
|
+
with:
|
|
28
|
+
python-version: '3.12'
|
|
29
|
+
- name: Add project directory to PYTHONPATH
|
|
30
|
+
run: echo "PYTHONPATH=$PYTHONPATH:$(pwd)" >> $GITHUB_ENV
|
|
31
|
+
- name: Install dependencies
|
|
32
|
+
run: pip install numpy pandas tqdm tabulate matplotlib solara networkx
|
|
33
|
+
# Benchmarks on the projectmesa main branch
|
|
34
|
+
- name: Checkout main branch
|
|
35
|
+
uses: actions/checkout@v4
|
|
36
|
+
with:
|
|
37
|
+
ref: main
|
|
38
|
+
repository: projectmesa/mesa
|
|
39
|
+
- name: Install Mesa
|
|
40
|
+
run: pip install --no-deps .
|
|
41
|
+
- name: Run benchmarks on main branch
|
|
42
|
+
working-directory: benchmarks
|
|
43
|
+
run: python global_benchmark.py
|
|
44
|
+
# Upload benchmarks, checkout PR branch, download benchmarks
|
|
45
|
+
- name: Upload benchmark results
|
|
46
|
+
uses: actions/upload-artifact@v4
|
|
47
|
+
with:
|
|
48
|
+
name: timings-main
|
|
49
|
+
path: benchmarks/timings_1.pickle
|
|
50
|
+
- name: Checkout PR branch
|
|
51
|
+
uses: actions/checkout@v4
|
|
52
|
+
if: github.event_name == 'pull_request_target'
|
|
53
|
+
with:
|
|
54
|
+
ref: ${{ github.event.pull_request.head.ref }}
|
|
55
|
+
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
|
56
|
+
fetch-depth: 0
|
|
57
|
+
persist-credentials: false
|
|
58
|
+
clean: false
|
|
59
|
+
- name: Install Mesa of the PR branch
|
|
60
|
+
run: pip install --no-deps .
|
|
61
|
+
- name: Download benchmark results
|
|
62
|
+
uses: actions/download-artifact@v4
|
|
63
|
+
with:
|
|
64
|
+
name: timings-main
|
|
65
|
+
path: benchmarks
|
|
66
|
+
# Run benchmarks on the PR branch
|
|
67
|
+
- name: Run benchmarks on PR branch
|
|
68
|
+
working-directory: benchmarks
|
|
69
|
+
run: python global_benchmark.py
|
|
70
|
+
# Run compare script and create comment
|
|
71
|
+
- name: Run compare timings and encode output
|
|
72
|
+
working-directory: benchmarks
|
|
73
|
+
run: |
|
|
74
|
+
TIMING_COMPARISON=$(python compare_timings.py | base64 -w 0) # Base64 encode the output
|
|
75
|
+
echo "TIMING_COMPARISON=$TIMING_COMPARISON" >> $GITHUB_ENV
|
|
76
|
+
- name: Comment PR
|
|
77
|
+
uses: actions/github-script@v7
|
|
78
|
+
with:
|
|
79
|
+
script: |
|
|
80
|
+
const output = Buffer.from(process.env.TIMING_COMPARISON, 'base64').toString('utf-8');
|
|
81
|
+
const issue_number = context.issue.number;
|
|
82
|
+
github.rest.issues.createComment({
|
|
83
|
+
issue_number: issue_number,
|
|
84
|
+
owner: context.repo.owner,
|
|
85
|
+
repo: context.repo.repo,
|
|
86
|
+
body: 'Performance benchmarks:\n\n' + output
|
|
87
|
+
});
|
|
@@ -7,11 +7,9 @@ on:
|
|
|
7
7
|
- release**
|
|
8
8
|
paths-ignore:
|
|
9
9
|
- '**.md'
|
|
10
|
-
- '**.rst'
|
|
11
10
|
pull_request:
|
|
12
11
|
paths-ignore:
|
|
13
12
|
- '**.md'
|
|
14
|
-
- '**.rst'
|
|
15
13
|
|
|
16
14
|
# This will cancel previous run if a newer job that obsoletes the said previous
|
|
17
15
|
# run, is started.
|
|
@@ -48,35 +46,17 @@ jobs:
|
|
|
48
46
|
uses: actions/setup-python@v5
|
|
49
47
|
with:
|
|
50
48
|
python-version: ${{ matrix.python-version }}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
name: Use GNU tar
|
|
55
|
-
shell: cmd
|
|
56
|
-
run: |
|
|
57
|
-
echo "Adding GNU tar to PATH"
|
|
58
|
-
echo C:\Program Files\Git\usr\bin>>"%GITHUB_PATH%"
|
|
59
|
-
- uses: actions/cache@v3
|
|
60
|
-
with:
|
|
61
|
-
path: ${{ env.pythonLocation }}
|
|
62
|
-
key: ${{ runner.os }}-pip-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}
|
|
63
|
-
- name: Install dependencies
|
|
64
|
-
# Only if the cache misses
|
|
65
|
-
# Based on https://github.com/pypa/pip/issues/8049#issuecomment-633845028
|
|
66
|
-
# read_requirements.py should be removed once
|
|
67
|
-
# https://github.com/pypa/pip/issues/11440 is resolved.
|
|
68
|
-
if: steps.cache.outputs.cache-hit != 'true'
|
|
69
|
-
run: |
|
|
70
|
-
pip install toml
|
|
71
|
-
python tests/read_requirements.py > requirements.txt
|
|
72
|
-
pip install -r requirements.txt
|
|
49
|
+
cache: 'pip'
|
|
50
|
+
- name: Install uv
|
|
51
|
+
run: pip install uv
|
|
73
52
|
- name: Install Mesa
|
|
74
|
-
|
|
53
|
+
# See https://github.com/astral-sh/uv/issues/1945
|
|
54
|
+
run: uv pip install --system .[dev]
|
|
75
55
|
- name: Test with pytest
|
|
76
|
-
run: pytest --cov=mesa tests/ --cov-report=xml
|
|
56
|
+
run: pytest --durations=10 --cov=mesa tests/ --cov-report=xml
|
|
77
57
|
- if: matrix.os == 'ubuntu'
|
|
78
58
|
name: Codecov
|
|
79
|
-
uses: codecov/codecov-action@
|
|
59
|
+
uses: codecov/codecov-action@v4
|
|
80
60
|
|
|
81
61
|
examples:
|
|
82
62
|
runs-on: ubuntu-latest
|
|
@@ -86,22 +66,11 @@ jobs:
|
|
|
86
66
|
uses: actions/setup-python@v5
|
|
87
67
|
with:
|
|
88
68
|
python-version: "3.12"
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
key: test-examples-pip-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}
|
|
93
|
-
- name: Install dependencies
|
|
94
|
-
# Only if the cache misses
|
|
95
|
-
# Based on https://github.com/pypa/pip/issues/8049#issuecomment-633845028
|
|
96
|
-
# read_requirements.py should be removed once
|
|
97
|
-
# https://github.com/pypa/pip/issues/11440 is resolved.
|
|
98
|
-
if: steps.cache.outputs.cache-hit != 'true'
|
|
99
|
-
run: |
|
|
100
|
-
pip install toml
|
|
101
|
-
python tests/read_requirements.py > requirements.txt
|
|
102
|
-
pip install -r requirements.txt
|
|
69
|
+
cache: 'pip'
|
|
70
|
+
- name: Install uv
|
|
71
|
+
run: pip install uv
|
|
103
72
|
- name: Install Mesa
|
|
104
|
-
run: pip install --
|
|
73
|
+
run: uv pip install --system .[dev]
|
|
105
74
|
- name: Checkout mesa-examples
|
|
106
75
|
uses: actions/checkout@v4
|
|
107
76
|
with:
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
# Benchmarking
|
|
2
|
+
benchmarks/**/*.pickle
|
|
3
|
+
|
|
1
4
|
# Byte-compiled / optimized / DLL files
|
|
2
5
|
__pycache__/
|
|
3
6
|
*.py[cod]
|
|
@@ -66,6 +69,7 @@ target/
|
|
|
66
69
|
|
|
67
70
|
# PyCharm environment files
|
|
68
71
|
.idea/
|
|
72
|
+
*.pclprof
|
|
69
73
|
|
|
70
74
|
# VSCode environment files
|
|
71
75
|
.vscode/
|
|
@@ -85,3 +89,4 @@ pythonenv*/
|
|
|
85
89
|
# JS dependencies
|
|
86
90
|
mesa/visualization/templates/external/
|
|
87
91
|
mesa/visualization/templates/js/external/
|
|
92
|
+
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
ci:
|
|
2
2
|
autoupdate_schedule: 'monthly'
|
|
3
|
-
autofix_prs: false
|
|
4
3
|
|
|
5
4
|
repos:
|
|
6
5
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
7
6
|
# Ruff version.
|
|
8
|
-
rev: v0.
|
|
7
|
+
rev: v0.3.5
|
|
9
8
|
hooks:
|
|
10
9
|
# Run the linter.
|
|
11
10
|
- id: ruff
|
|
12
11
|
types_or: [ python, pyi, jupyter ]
|
|
12
|
+
args: [ --fix ]
|
|
13
13
|
# Run the formatter.
|
|
14
14
|
- id: ruff-format
|
|
15
15
|
types_or: [ python, pyi, jupyter ]
|
|
16
16
|
- repo: https://github.com/asottile/pyupgrade
|
|
17
|
-
rev: v3.15.
|
|
17
|
+
rev: v3.15.2
|
|
18
18
|
hooks:
|
|
19
19
|
- id: pyupgrade
|
|
20
20
|
args: [--py38-plus]
|
|
@@ -24,3 +24,11 @@ repos:
|
|
|
24
24
|
- id: trailing-whitespace
|
|
25
25
|
- id: check-toml
|
|
26
26
|
- id: check-yaml
|
|
27
|
+
- repo: https://github.com/codespell-project/codespell
|
|
28
|
+
rev: v2.2.6
|
|
29
|
+
hooks:
|
|
30
|
+
- id: codespell
|
|
31
|
+
args: [
|
|
32
|
+
"--ignore-words",
|
|
33
|
+
".codespellignore",
|
|
34
|
+
]
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, caste, color, religion, or sexual
|
|
10
|
+
identity and orientation.
|
|
11
|
+
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
14
|
+
|
|
15
|
+
## Our Standards
|
|
16
|
+
|
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
|
18
|
+
community include:
|
|
19
|
+
|
|
20
|
+
* Demonstrating empathy and kindness toward other people
|
|
21
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
+
* Giving and gracefully accepting constructive feedback
|
|
23
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
+
and learning from the experience
|
|
25
|
+
* Focusing on what is best not just for us as individuals, but for the overall
|
|
26
|
+
community
|
|
27
|
+
|
|
28
|
+
Examples of unacceptable behavior include:
|
|
29
|
+
|
|
30
|
+
* The use of sexualized language or imagery, and sexual attention or advances of
|
|
31
|
+
any kind
|
|
32
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
+
* Public or private harassment
|
|
34
|
+
* Publishing others' private information, such as a physical or email address,
|
|
35
|
+
without their explicit permission
|
|
36
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
+
professional setting
|
|
38
|
+
|
|
39
|
+
## Enforcement Responsibilities
|
|
40
|
+
|
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
+
or harmful.
|
|
45
|
+
|
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
+
decisions when appropriate.
|
|
50
|
+
|
|
51
|
+
## Scope
|
|
52
|
+
|
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
+
an individual is officially representing the community in public spaces.
|
|
55
|
+
Examples of representing our community include using an official email address,
|
|
56
|
+
posting via an official social media account, or acting as an appointed
|
|
57
|
+
representative at an online or offline event.
|
|
58
|
+
|
|
59
|
+
## Enforcement
|
|
60
|
+
|
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
|
+
reported to the community leaders responsible for enforcement at [@jackiekazil](https://matrix.to/#/@jackiekazil:matrix.org) and/or [@edgeofchaos](https://matrix.to/#/@edgeofchaos:matrix.org). Violations posted as Github comments, discussion, etc maybe also be reported via the [report functionality](https://docs.github.com/en/communities/maintaining-your-safety-on-github/reporting-abuse-or-spam)
|
|
63
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
|
64
|
+
|
|
65
|
+
All community leaders are obligated to respect the privacy and security of the
|
|
66
|
+
reporter of any incident.
|
|
67
|
+
|
|
68
|
+
## Enforcement Guidelines
|
|
69
|
+
|
|
70
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
|
71
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
|
72
|
+
|
|
73
|
+
### 1. Correction
|
|
74
|
+
|
|
75
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
76
|
+
unprofessional or unwelcome in the community.
|
|
77
|
+
|
|
78
|
+
**Consequence**: A private, written warning from community leaders, providing
|
|
79
|
+
clarity around the nature of the violation and an explanation of why the
|
|
80
|
+
behavior was inappropriate. A public apology may be requested.
|
|
81
|
+
|
|
82
|
+
### 2. Warning
|
|
83
|
+
|
|
84
|
+
**Community Impact**: A violation through a single incident or series of
|
|
85
|
+
actions.
|
|
86
|
+
|
|
87
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
|
88
|
+
interaction with the people involved, including unsolicited interaction with
|
|
89
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
|
90
|
+
includes avoiding interactions in community spaces as well as external channels
|
|
91
|
+
like social media. Violating these terms may lead to a temporary or permanent
|
|
92
|
+
ban.
|
|
93
|
+
|
|
94
|
+
### 3. Temporary Ban
|
|
95
|
+
|
|
96
|
+
**Community Impact**: A serious violation of community standards, including
|
|
97
|
+
sustained inappropriate behavior.
|
|
98
|
+
|
|
99
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
|
100
|
+
communication with the community for a specified period of time. No public or
|
|
101
|
+
private interaction with the people involved, including unsolicited interaction
|
|
102
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
|
103
|
+
Violating these terms may lead to a permanent ban.
|
|
104
|
+
|
|
105
|
+
### 4. Permanent Ban
|
|
106
|
+
|
|
107
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
|
108
|
+
standards, including sustained inappropriate behavior, harassment of an
|
|
109
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
|
110
|
+
|
|
111
|
+
**Consequence**: A permanent ban from any sort of public interaction within the
|
|
112
|
+
community.
|
|
113
|
+
|
|
114
|
+
## Attribution
|
|
115
|
+
|
|
116
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
117
|
+
version 2.1, available at
|
|
118
|
+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
119
|
+
|
|
120
|
+
Community Impact Guidelines were inspired by
|
|
121
|
+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
|
122
|
+
|
|
123
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
|
124
|
+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
|
125
|
+
[https://www.contributor-covenant.org/translations][translations].
|
|
126
|
+
|
|
127
|
+
[homepage]: https://www.contributor-covenant.org
|
|
128
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
129
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|
|
130
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
|
131
|
+
[translations]: https://www.contributor-covenant.org/translations
|
|
@@ -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
|
|
@@ -1,9 +1,113 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Release History
|
|
3
3
|
---
|
|
4
|
+
# 2.3.0 (2024-04-23)
|
|
5
|
+
## Highlights
|
|
6
|
+
Mesa 2.3.0 is a big feature release and the last feature release before 3.0.
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
There are two main new features:
|
|
9
|
+
- The experimental cell-centric discrete spaces, as added in #1994. It allows having cells with not only properties but also active behaviors: the `CellAgent`. Its inspired by NetLogo's [patches](https://ccl.northwestern.edu/netlogo/bind/primitive/patches.html) but extend and generalize this concept further.
|
|
10
|
+
- Full support for discrete event scheduling, as added in #2066. It allows scheduling events (like Agent actions) at any time, including non-integer timesteps.
|
|
11
|
+
|
|
12
|
+
There are a lot of other features: The Jupyter visualisation now supports easier way to specify sliders, `NetworkGrid.get_neighbors()` supports a radius, `AgentSet.get()` can retrieve multiple attributes and there are now benchmarks to track Mesa performance during development.
|
|
13
|
+
|
|
14
|
+
Finally, 2.3.0 stabilizes the `AgentSet` (including `model.agents`), making it the first experimental Mesa feature that is taken out of it's experimental phase.
|
|
15
|
+
|
|
16
|
+
Install this release with:
|
|
17
|
+
```
|
|
18
|
+
pip install --upgrade mesa
|
|
19
|
+
```
|
|
20
|
+
The Mesa 2.3.x-series supports Python 3.9 to 3.12. The next major release will require Python 3.10.
|
|
21
|
+
|
|
22
|
+
## What's Changed
|
|
23
|
+
### 🧪 Experimental features
|
|
24
|
+
* Add cell-centric discrete spaces (experimental) by @Corvince in https://github.com/projectmesa/mesa/pull/1994
|
|
25
|
+
### 🎉 New features added
|
|
26
|
+
* Add performance benchmarking scripts by @EwoutH in https://github.com/projectmesa/mesa/pull/1979
|
|
27
|
+
* feat: Implement Slider class for JupyterViz by @rht in https://github.com/projectmesa/mesa/pull/1972
|
|
28
|
+
* Stabilize AgentSet by @EwoutH in https://github.com/projectmesa/mesa/pull/2065
|
|
29
|
+
* Support discrete event scheduling by @quaquel in https://github.com/projectmesa/mesa/pull/2066
|
|
30
|
+
### 🛠 Enhancements made
|
|
31
|
+
* JupyterViz: Automatically deduce display name from model class by @rht in https://github.com/projectmesa/mesa/pull/1975
|
|
32
|
+
* Add radius argument to NetworkGrid.get_neighbors() by @EwoutH in https://github.com/projectmesa/mesa/pull/1973
|
|
33
|
+
* Speedup of Agentset.shuffle by @quaquel in https://github.com/projectmesa/mesa/pull/2010
|
|
34
|
+
* feat: Let mesa runserver detect server.py as fallback by @rht in https://github.com/projectmesa/mesa/pull/2015
|
|
35
|
+
* JupyterViz: {Convert make_plot & prepare ColorCard} to become Solara component by @rht in https://github.com/projectmesa/mesa/pull/2020
|
|
36
|
+
* new feature: AgentSet.get can retrieve one or more then one attribute by @quaquel in https://github.com/projectmesa/mesa/pull/2044
|
|
37
|
+
* Update CODE_OF_CONDUCT.md to version 2+ of contrib covenant by @jackiekazil in https://github.com/projectmesa/mesa/pull/2052
|
|
38
|
+
* Improve flocking benchmark by @coderbeta1 in https://github.com/projectmesa/mesa/pull/2054
|
|
39
|
+
* Remove JupyterViz Altair marker overlap for huge grid size by @rht in https://github.com/projectmesa/mesa/pull/2062
|
|
40
|
+
* Add tooltip option to Altair chart by @FoFFolo in https://github.com/projectmesa/mesa/pull/2082
|
|
41
|
+
* feat: Display model seed & allow user to specify it in JupyterViz by @rht in https://github.com/projectmesa/mesa/pull/2069
|
|
42
|
+
* warn if placing already placed agent by @puer-robustus in https://github.com/projectmesa/mesa/pull/2083
|
|
43
|
+
### 🐛 Bugs fixed
|
|
44
|
+
* fix: Apply default value to slider by @rht in https://github.com/projectmesa/mesa/pull/2016
|
|
45
|
+
* fix: Initialize model _steps and _time during __new__ by @rht in https://github.com/projectmesa/mesa/pull/2026
|
|
46
|
+
* fix: Use model.schedule only when it is not None by @rht in https://github.com/projectmesa/mesa/pull/2050
|
|
47
|
+
* fix: Remove JupyterViz grid marker overlap for huge grid size by @rht in https://github.com/projectmesa/mesa/pull/2049
|
|
48
|
+
### 📜 Documentation improvements
|
|
49
|
+
* Improve readability of badges by @rht in https://github.com/projectmesa/mesa/pull/2009
|
|
50
|
+
* More pythonic implementation of wolf sheep by @quaquel in https://github.com/projectmesa/mesa/pull/2011
|
|
51
|
+
* Adding super().__init__() to MoneyModel tutorial by @sw23 in https://github.com/projectmesa/mesa/pull/2025
|
|
52
|
+
* docs: Convert howto.rst -> howto.md via rst2myst by @rht in https://github.com/projectmesa/mesa/pull/2033
|
|
53
|
+
* docs: Convert best-practices,overview,packages,mesa,index to .md via rst2myst by @rht in https://github.com/projectmesa/mesa/pull/2034
|
|
54
|
+
* docs: Convert api/*.rst -> api/*.md via rst2myst by @rht in https://github.com/projectmesa/mesa/pull/2035
|
|
55
|
+
* docs: Rewrite howto.md using ChatGPT for clarity and conciseness by @rht in https://github.com/projectmesa/mesa/pull/2037
|
|
56
|
+
* docs: Corrected Contributing Guide Link to Ensure Accessibility by @sahusiddharth in https://github.com/projectmesa/mesa/pull/2057
|
|
57
|
+
* Rename links to internal .rst files to .md by @rht in https://github.com/projectmesa/mesa/pull/2058
|
|
58
|
+
* docs: improve introductory tutorial by @puer-robustus in https://github.com/projectmesa/mesa/pull/2087
|
|
59
|
+
### 🔧 Maintenance
|
|
60
|
+
* Quality of Life: Make codecov less meticulous by @Corvince in https://github.com/projectmesa/mesa/pull/1966
|
|
61
|
+
* Add CI workflow for performance benchmarks by @EwoutH in https://github.com/projectmesa/mesa/pull/1983
|
|
62
|
+
* tests: Resolve warnings by defining PropertyLayer dtypes by @EwoutH in https://github.com/projectmesa/mesa/pull/1987
|
|
63
|
+
* benchmarks.yml: Fix PR branch checkout when triggered by comment by @EwoutH in https://github.com/projectmesa/mesa/pull/1998
|
|
64
|
+
* Quality of life: automatically fix ruff errors by @Corvince in https://github.com/projectmesa/mesa/pull/2004
|
|
65
|
+
* benchmarks.yml: Run on addition of label instead of comment by @EwoutH in https://github.com/projectmesa/mesa/pull/2002
|
|
66
|
+
* ci: Move codespell to pre-commit by @rht in https://github.com/projectmesa/mesa/pull/2040
|
|
67
|
+
* Schelling by @coderbeta1 in https://github.com/projectmesa/mesa/pull/2053
|
|
68
|
+
* Move ruff lint settings into dedicated section by @Corvince in https://github.com/projectmesa/mesa/pull/2073
|
|
69
|
+
* ci: Use uv pip for faster build by @rht in https://github.com/projectmesa/mesa/pull/2038
|
|
70
|
+
* test: Remove place_agent duplicate warnings by @rht in https://github.com/projectmesa/mesa/pull/2086
|
|
71
|
+
### Other changes
|
|
72
|
+
* Minor edits to benchmarking code by @quaquel in https://github.com/projectmesa/mesa/pull/1985
|
|
73
|
+
* build(deps): bump codecov/codecov-action from 3 to 4 by @dependabot in https://github.com/projectmesa/mesa/pull/2030
|
|
74
|
+
* [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/projectmesa/mesa/pull/2029
|
|
75
|
+
* tests: Speed up test_batch_run by @rht in https://github.com/projectmesa/mesa/pull/2039
|
|
76
|
+
* Update benchmarks.yml by @Corvince in https://github.com/projectmesa/mesa/pull/2043
|
|
77
|
+
* docs: Convert visualization .rst -> .md via rst2myst by @rht in https://github.com/projectmesa/mesa/pull/2036
|
|
78
|
+
* docs: Convert CONTRIBUTING .rst -> .md via rst2myst by @rht in https://github.com/projectmesa/mesa/pull/2041
|
|
79
|
+
* Correct wolf energy gained from eating sheep by @JackAtOmenApps in https://github.com/projectmesa/mesa/pull/2048
|
|
80
|
+
* feat: Implement Altair version of grid visualization by @rht in https://github.com/projectmesa/mesa/pull/1991
|
|
81
|
+
|
|
82
|
+
## New Contributors
|
|
83
|
+
* @sw23 made their first contribution in https://github.com/projectmesa/mesa/pull/2025
|
|
84
|
+
* @JackAtOmenApps made their first contribution in https://github.com/projectmesa/mesa/pull/2048
|
|
85
|
+
* @coderbeta1 made their first contribution in https://github.com/projectmesa/mesa/pull/2054
|
|
86
|
+
* @sahusiddharth made their first contribution in https://github.com/projectmesa/mesa/pull/2057
|
|
87
|
+
* @FoFFolo made their first contribution in https://github.com/projectmesa/mesa/pull/2082
|
|
88
|
+
* @puer-robustus made their first contribution in https://github.com/projectmesa/mesa/pull/2083
|
|
89
|
+
|
|
90
|
+
**Full Changelog**: https://github.com/projectmesa/mesa/compare/v2.2.4...2.3.0
|
|
91
|
+
|
|
92
|
+
# 2.3.0-rc1 (2024-04-18)
|
|
93
|
+
Mesa 2.3.0-rc1 is pre-release in preparation for 2.3.0 stable. It had the same release notes as 2.3.0.
|
|
94
|
+
|
|
95
|
+
# 2.2.4 (2024-01-26)
|
|
96
|
+
## Highlights
|
|
97
|
+
Mesa v2.2.4 is a small but important bugfix release for the 2.2 release series. It fixes an essential bug in where agents weren't shuffled in the `BaseScheduler`, affecting mainly the `RandomActivation` scheduler (effectively making it sequential activation)([#2007](https://github.com/projectmesa/mesa/pull/2007)). It also fixes a small behaviour change in `RandomActivationByType.agents_by_type()` ([#1996](https://github.com/projectmesa/mesa/pull/1996)). Furthermore, this release adds an internal clock to the `Model`, which allows to use a Mesa model without a scheduler (using the `AgentSet` API)([#1942](https://github.com/projectmesa/mesa/pull/1942)).
|
|
98
|
+
|
|
99
|
+
Updating from previous 2.2 releases is highly recommended, especially when using the `RandomActivation` scheduler.
|
|
100
|
+
|
|
101
|
+
## What's Changed
|
|
102
|
+
### 🛠 Enhancements made
|
|
103
|
+
* refactor: Remove dependence on model.schedule, add clock to Model by @rht in https://github.com/projectmesa/mesa/pull/1942
|
|
104
|
+
### 🐛 Bugs fixed
|
|
105
|
+
* Fix AgentSet inplace shuffle (and thus RandomActivation), add tests by @EwoutH and @quaquel in https://github.com/projectmesa/mesa/pull/2007
|
|
106
|
+
* fix: Reverse dict key and value for agents_by_type by @rht in https://github.com/projectmesa/mesa/pull/1996
|
|
6
107
|
|
|
108
|
+
**Full Changelog**: https://github.com/projectmesa/mesa/compare/v2.2.3...v2.2.4
|
|
109
|
+
|
|
110
|
+
# 2.2.3 (2024-01-22)
|
|
7
111
|
## Highlights
|
|
8
112
|
Mesa 2.2.3 is a small release with two improvements to the experimental Solara visualisation, on request of one of our contributors. No stable features have changed.
|
|
9
113
|
|
|
@@ -15,7 +119,6 @@ Mesa 2.2.3 is a small release with two improvements to the experimental Solara v
|
|
|
15
119
|
|
|
16
120
|
**Full Changelog**: https://github.com/projectmesa/mesa/compare/v2.2.2...v2.2.3
|
|
17
121
|
|
|
18
|
-
|
|
19
122
|
# 2.2.2 (2024-01-22)
|
|
20
123
|
|
|
21
124
|
## Highlights
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: Mesa
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.0
|
|
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
|
|
@@ -16,6 +16,8 @@ Classifier: Operating System :: OS Independent
|
|
|
16
16
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.9
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
21
|
Classifier: Topic :: Scientific/Engineering
|
|
20
22
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
21
23
|
Classifier: Topic :: Scientific/Engineering :: Artificial Life
|
|
@@ -32,6 +34,7 @@ Requires-Dist: tqdm
|
|
|
32
34
|
Provides-Extra: dev
|
|
33
35
|
Requires-Dist: coverage; extra == 'dev'
|
|
34
36
|
Requires-Dist: pytest-cov; extra == 'dev'
|
|
37
|
+
Requires-Dist: pytest-mock; extra == 'dev'
|
|
35
38
|
Requires-Dist: pytest>=4.6; extra == 'dev'
|
|
36
39
|
Requires-Dist: ruff~=0.1.1; extra == 'dev'
|
|
37
40
|
Requires-Dist: sphinx; extra == 'dev'
|
|
@@ -46,12 +49,12 @@ Description-Content-Type: text/markdown
|
|
|
46
49
|
|
|
47
50
|
# Mesa: Agent-based modeling in Python
|
|
48
51
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
[](https://codecov.io/gh/projectmesa/mesa)
|
|
52
|
-
[](https://github.com/projectmesa/mesa/actions) [](https://codecov.io/gh/projectmesa/mesa) |
|
|
55
|
+
| Package | [](https://pypi.org/project/Mesa/) [](https://pypi.org/project/Mesa/) [](https://pypi.org/project/Mesa/) |
|
|
56
|
+
| Meta | [](https://github.com/astral-sh/ruff) [](https://github.com/psf/black) [](https://github.com/pypa/hatch) |
|
|
57
|
+
| Chat | [](https://matrix.to/#/#project-mesa:matrix.org) |
|
|
55
58
|
|
|
56
59
|
Mesa allows users to quickly create agent-based models using built-in
|
|
57
60
|
core components (such as spatial grids and agent schedulers) or
|
|
@@ -160,7 +163,7 @@ If you would like to add a feature, please reach out via [ticket](https://github
|
|
|
160
163
|
join a dev session (see [Mesa discussions](https://github.com/projectmesa/mesa/discussions)). A feature is most likely
|
|
161
164
|
to be added if you build it!
|
|
162
165
|
|
|
163
|
-
Don't forget to checkout the [Contributors guide](https://github.com/projectmesa/mesa/blob/main/CONTRIBUTING.
|
|
166
|
+
Don't forget to checkout the [Contributors guide](https://github.com/projectmesa/mesa/blob/main/CONTRIBUTING.md).
|
|
164
167
|
|
|
165
168
|
## Citing Mesa
|
|
166
169
|
|