Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
blank_issues_enabled: true
contact_links:
- name: Discussions/Questions etc
url: https://github.com/projectmesa/mesa-frames/discussions
url: https://github.com/mesa/mesa-frames/discussions
about: Discuss Mesa-Frames, ask questions, do discussions, share ideas, and showcase your projects


Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/sync_coderabbit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
pull-requests: write # open PR & enable auto‑merge

env:
UPSTREAM_RAW_URL: "https://raw.githubusercontent.com/projectmesa/mesa/main/.coderabbit.yaml"
UPSTREAM_RAW_URL: "https://raw.githubusercontent.com/mesa/mesa/main/.coderabbit.yaml"
SYNC_BRANCH: "sync-coderabbit-from-mesa"

steps:
Expand Down Expand Up @@ -51,11 +51,11 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ env.SYNC_BRANCH }}
commit-message: "chore: sync .coderabbit.yaml from projectmesa/mesa@main"
commit-message: "chore: sync .coderabbit.yaml from mesa/mesa@main"
title: "🔄 Sync .coderabbit.yaml from mesa:main"
body: |
Automated update of **.coderabbit.yaml** from \
[projectmesa/mesa:main](${{ env.UPSTREAM_RAW_URL }}).
[mesa/mesa:main](${{ env.UPSTREAM_RAW_URL }}).

This PR will merge automatically once all required checks succeed.
labels: automated, coderabbit-sync
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

Thank you for taking the time to contribute to **mesa-frames**! Since the project is still in its early stages, we warmly welcome contributions that will help shape its development. 🎉

For a more general and comprehensive guide, please refer to [mesa's main contribution guidelines](https://github.com/projectmesa/mesa/blob/main/CONTRIBUTING.md). 📜
For a more general and comprehensive guide, please refer to [mesa's main contribution guidelines](https://github.com/mesa/mesa/blob/main/CONTRIBUTING.md). 📜

## Project Roadmap 🗺️

Before contributing, we recommend reviewing our [roadmap](https://projectmesa.github.io/mesa-frames/roadmap/) file to understand the project's current priorities, upcoming features, and long-term vision. This will help ensure your contributions align with the project's direction.
Before contributing, we recommend reviewing our [roadmap](https://mesa.github.io/mesa-frames/roadmap/) file to understand the project's current priorities, upcoming features, and long-term vision. This will help ensure your contributions align with the project's direction.

## How to Contribute 💡

Expand Down Expand Up @@ -125,7 +125,7 @@ It is recommended to set up a virtual environment before installing dependencies

No manual setup needed in these environments!

For more details on runtime type checking, see the [Development Guidelines](https://projectmesa.github.io/mesa-frames/development/).
For more details on runtime type checking, see the [Development Guidelines](https://mesa.github.io/mesa-frames/development/).

#### **Step 6: Documentation Updates (If Needed)** 📖

Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# mesa-frames 🚀

mesa-frames is an extension of the [mesa](https://github.com/projectmesa/mesa) framework, designed for complex simulations with thousands of agents. By storing agents in a DataFrame, mesa-frames significantly enhances the performance and scalability of mesa, while maintaining a similar syntax. mesa-frames allows for the use of [vectorized functions](https://stackoverflow.com/a/1422198) which significantly speeds up operations whenever simultaneous activation of agents is possible.
mesa-frames is an extension of the [mesa](https://github.com/mesa/mesa) framework, designed for complex simulations with thousands of agents. By storing agents in a DataFrame, mesa-frames significantly enhances the performance and scalability of mesa, while maintaining a similar syntax. mesa-frames allows for the use of [vectorized functions](https://stackoverflow.com/a/1422198) which significantly speeds up operations whenever simultaneous activation of agents is possible.

## Why DataFrames? 📊

Expand All @@ -10,11 +10,11 @@ DataFrames are optimized for simultaneous operations through [SIMD processing](h

The following is a performance graph showing execution time using mesa and mesa-frames for the [Boltzmann Wealth model](https://mesa.readthedocs.io/en/stable/tutorials/intro_tutorial.html).

![Performance Graph with Mesa](https://github.com/projectmesa/mesa-frames/blob/main/examples/boltzmann_wealth/boltzmann_with_mesa.png)
![Performance Graph with Mesa](https://github.com/mesa/mesa-frames/blob/main/examples/boltzmann_wealth/boltzmann_with_mesa.png)

![Performance Graph without Mesa](https://github.com/projectmesa/mesa-frames/blob/main/examples/boltzmann_wealth/boltzmann_no_mesa.png)
![Performance Graph without Mesa](https://github.com/mesa/mesa-frames/blob/main/examples/boltzmann_wealth/boltzmann_no_mesa.png)

([You can check the script used to generate the graph here](https://github.com/projectmesa/mesa-frames/blob/main/examples/boltzmann_wealth/performance_plot.py), but if you want to additionally compare vs Mesa, you have to uncomment `mesa_implementation` and its label)
([You can check the script used to generate the graph here](https://github.com/mesa/mesa-frames/blob/main/examples/boltzmann_wealth/performance_plot.py), but if you want to additionally compare vs Mesa, you have to uncomment `mesa_implementation` and its label)

## Installation

Expand All @@ -33,7 +33,7 @@ To install the most updated version of mesa-frames, you can clone the repository
To get started with mesa-frames, first clone the repository from GitHub:

```bash
git clone https://github.com/projectmesa/mesa-frames.git
git clone https://github.com/mesa/mesa-frames.git
cd mesa_frames
```

Expand Down Expand Up @@ -80,11 +80,11 @@ pip install -e .

## Usage

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/projectmesa/mesa-frames/blob/main/docs/general/user-guide/2_introductory-tutorial.ipynb)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mesa/mesa-frames/blob/main/docs/general/user-guide/2_introductory-tutorial.ipynb)

**Note:** mesa-frames is currently in its early stages of development. As such, the usage patterns and API are subject to change. Breaking changes may be introduced. Reports of feedback and issues are encouraged.

[You can find the API documentation here](https://projectmesa.github.io/mesa-frames/api).
[You can find the API documentation here](https://mesa.github.io/mesa-frames/api).

### Creation of an Agent

Expand Down Expand Up @@ -170,4 +170,4 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

For the full license text, see the [LICENSE](https://github.com/projectmesa/mesa-frames/blob/main/LICENSE) file in the GitHub repository.
For the full license text, see the [LICENSE](https://github.com/mesa/mesa-frames/blob/main/LICENSE) file in the GitHub repository.
4 changes: 2 additions & 2 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This document outlines the development roadmap for the mesa-frames project. It p
One of our major priorities was to move from pandas to polars as the primary dataframe backend. This transition was motivated by performance considerations.
Now we should transition to using the lazily evaluated version of polars.

**Related issues:** [#10: GPU integration: Dask, cuda (cudf) and RAPIDS (Polars)](https://github.com/projectmesa/mesa-frames/issues/10), [#89: Investigate using Ibis for the common interface library to any DF backend](https://github.com/projectmesa/mesa-frames/issues/89), [#52: Use of LazyFrames for Polars implementation](https://github.com/projectmesa/mesa-frames/issues/52)
**Related issues:** [#10: GPU integration: Dask, cuda (cudf) and RAPIDS (Polars)](https://github.com/mesa/mesa-frames/issues/10), [#89: Investigate using Ibis for the common interface library to any DF backend](https://github.com/mesa/mesa-frames/issues/89), [#52: Use of LazyFrames for Polars implementation](https://github.com/mesa/mesa-frames/issues/52)

#### Progress and Next Steps

Expand All @@ -20,7 +20,7 @@ Now we should transition to using the lazily evaluated version of polars.

A critical aspect of agent-based models is efficiently managing concurrent agent movements, especially when multiple agents attempt to move to the same location simultaneously. We aim to implement abstractions that handle these concurrency conditions automatically.

**Related issues:** [#108: Adding abstraction of optimal agent movement](https://github.com/projectmesa/mesa-frames/issues/108), [#48: Emulate RandomActivation with DataFrame.rolling](https://github.com/projectmesa/mesa-frames/issues/48)
**Related issues:** [#108: Adding abstraction of optimal agent movement](https://github.com/mesa/mesa-frames/issues/108), [#48: Emulate RandomActivation with DataFrame.rolling](https://github.com/mesa/mesa-frames/issues/48)

#### Sugarscape Example of Concurrency Issues

Expand Down
4 changes: 2 additions & 2 deletions docs/api/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
autodoc_default_options = {"special-members": True, "exclude-members": "__weakref__"}

# -- GitHub link and user guide settings -------------------------------------
github_root = "https://github.com/projectmesa/mesa-frames"
web_root = "https://projectmesa.github.io/mesa-frames"
github_root = "https://github.com/mesa/mesa-frames"
web_root = "https://mesa.github.io/mesa-frames"

html_theme_options = {
"external_links": [
Expand Down
12 changes: 6 additions & 6 deletions docs/general/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Welcome to mesa-frames 🚀

mesa-frames is an extension of the [mesa](https://github.com/projectmesa/mesa) framework, designed for complex simulations with thousands of agents. By storing agents in a DataFrame, mesa-frames significantly enhances the performance and scalability of mesa, while maintaining a similar syntax.
mesa-frames is an extension of the [mesa](https://github.com/mesa/mesa) framework, designed for complex simulations with thousands of agents. By storing agents in a DataFrame, mesa-frames significantly enhances the performance and scalability of mesa, while maintaining a similar syntax.

You can get a model which is multiple orders of magnitude faster based on the number of agents - the more agents, the faster the relative performance.

Expand All @@ -14,9 +14,9 @@ DataFrames are optimized for simultaneous operations through [SIMD processing](h

Check out our performance graphs comparing mesa and mesa-frames for the [Boltzmann Wealth model](https://mesa.readthedocs.io/en/stable/tutorials/intro_tutorial.html):

![Performance Graph with Mesa](https://github.com/projectmesa/mesa-frames/raw/main/examples/boltzmann_wealth/boltzmann_with_mesa.png)
![Performance Graph with Mesa](https://github.com/mesa/mesa-frames/raw/main/examples/boltzmann_wealth/boltzmann_with_mesa.png)

![Performance Graph without Mesa](https://github.com/projectmesa/mesa-frames/raw/main/examples/boltzmann_wealth/boltzmann_no_mesa.png)
![Performance Graph without Mesa](https://github.com/mesa/mesa-frames/raw/main/examples/boltzmann_wealth/boltzmann_no_mesa.png)

## Quick Start 🚀

Expand All @@ -31,7 +31,7 @@ pip install mesa-frames
#### Installing from Source

```bash
git clone https://github.com/projectmesa/mesa-frames.git
git clone https://github.com/mesa/mesa-frames.git
cd mesa_frames
pip install -e .
```
Expand Down Expand Up @@ -82,8 +82,8 @@ class MoneyModel(Model):

## Get Involved! 🤝

mesa-frames is in its early stages, and we welcome your feedback and contributions! Check out our [GitHub repository](https://github.com/projectmesa/mesa-frames) to get started.
mesa-frames is in its early stages, and we welcome your feedback and contributions! Check out our [GitHub repository](https://github.com/mesa/mesa-frames) to get started.

## License

mesa-frames is available under the MIT License. See the [LICENSE](https://github.com/projectmesa/mesa-frames/blob/main/LICENSE) file for full details.
mesa-frames is available under the MIT License. See the [LICENSE](https://github.com/mesa/mesa-frames/blob/main/LICENSE) file for full details.
4 changes: 2 additions & 2 deletions docs/general/user-guide/2_introductory-tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "7ee055b2",
"metadata": {},
"source": [
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/projectmesa/mesa-frames/blob/main/docs/general/user-guide/2_introductory-tutorial.ipynb)"
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mesa/mesa-frames/blob/main/docs/general/user-guide/2_introductory-tutorial.ipynb)"
]
},
{
Expand All @@ -25,7 +25,7 @@
"metadata": {},
"outputs": [],
"source": [
"# !pip install git+https://github.com/projectmesa/mesa-frames mesa"
"# !pip install git+https://github.com/mesa/mesa-frames mesa"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/general/user-guide/4_datacollector.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"source": [
"# Data Collector Tutorial\n",
"\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/projectmesa/mesa-frames/blob/main/docs/general/user-guide/4_datacollector.ipynb)\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mesa/mesa-frames/blob/main/docs/general/user-guide/4_datacollector.ipynb)\n",
"\n",
"This notebook walks you through using the concrete `DataCollector` in `mesa-frames` to collect model- and agent-level data and write it to different storage backends: **memory, CSV, Parquet, S3, and PostgreSQL**.\n",
"\n",
Expand All @@ -33,7 +33,7 @@
},
"outputs": [],
"source": [
"# !pip install git+https://github.com/projectmesa/mesa-frames mesa"
"# !pip install git+https://github.com/mesa/mesa-frames mesa"
]
},
{
Expand Down
10 changes: 5 additions & 5 deletions docs/general/user-guide/5_benchmarks.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ mesa-frames offers significant performance improvements over the original mesa f

## Boltzmann Wealth Model 💰

[View the benchmark script](https://github.com/projectmesa/mesa-frames/blob/main/examples/boltzmann_wealth/performance_plot.py)
[View the benchmark script](https://github.com/mesa/mesa-frames/blob/main/examples/boltzmann_wealth/performance_plot.py)

### Comparison with mesa

![Performance Graph BW](https://github.com/projectmesa/mesa-frames/raw/main/examples/boltzmann_wealth/boltzmann_no_mesa.png)
![Performance Graph BW](https://github.com/mesa/mesa-frames/raw/main/examples/boltzmann_wealth/boltzmann_no_mesa.png)

### Comparison of mesa-frames implementations

![Performance Graph BW without Mesa](https://github.com/projectmesa/mesa-frames/raw/main/examples/boltzmann_wealth/boltzmann_with_mesa.png)
![Performance Graph BW without Mesa](https://github.com/mesa/mesa-frames/raw/main/examples/boltzmann_wealth/boltzmann_with_mesa.png)

## SugarScape with Instantaneous Growback 🍬

[View the benchmark script](https://github.com/projectmesa/mesa-frames/blob/main/examples/sugarscape_ig/performance_comparison.py)
[View the benchmark script](https://github.com/mesa/mesa-frames/blob/main/examples/sugarscape_ig/performance_comparison.py)

![Performance Graph SS IG](https://github.com/projectmesa/mesa-frames/raw/main/examples/sugarscape_ig/mesa_comparison.png)
![Performance Graph SS IG](https://github.com/mesa/mesa-frames/raw/main/examples/sugarscape_ig/mesa_comparison.png)
2 changes: 1 addition & 1 deletion mesa_frames/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(self, width, height):

Developed by: Project Mesa, Adam Amer
License: MIT
GitHub: https://github.com/projectmesa/mesa-frames
GitHub: https://github.com/mesa/mesa-frames
"""

from __future__ import annotations
Expand Down
2 changes: 1 addition & 1 deletion mesa_frames/abstract/space.py
Original file line number Diff line number Diff line change
Expand Up @@ -1236,7 +1236,7 @@ class AbstractGrid(AbstractDiscreteSpace):
The [0, 0] coordinate is at the bottom-left corner of the grid.

.. _np.genfromtxt: https://numpy.org/doc/stable/reference/generated/numpy.genfromtxt.html
.. _mesa-examples Sugarscape model: https://github.com/projectmesa/mesa-examples/blob/e137a60e4e2f2546901bec497e79c4a7b0cc69bb/examples/sugarscape_g1mt/sugarscape_g1mt/model.py#L93-L94
.. _mesa-examples Sugarscape model: https://github.com/mesa/mesa-examples/blob/e137a60e4e2f2546901bec497e79c4a7b0cc69bb/examples/sugarscape_g1mt/sugarscape_g1mt/model.py#L93-L94
"""

_cells_capacity: (
Expand Down
10 changes: 5 additions & 5 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Project information
site_name: mesa-frames
site_url: https://projectmesa.github.io/mesa-frames
repo_url: https://github.com/projectmesa/mesa-frames
repo_name: projectmesa/mesa-frames
site_url: https://mesa.github.io/mesa-frames
repo_url: https://github.com/mesa/mesa-frames
repo_name: mesa/mesa-frames
docs_dir: docs/general

# Theme configuration
Expand Down Expand Up @@ -76,7 +76,7 @@ markdown_extensions:
- pymdownx.keys
- pymdownx.magiclink:
repo_url_shorthand: true
user: projectmesa
user: mesa
repo: mesa-frames
- pymdownx.mark
- pymdownx.smartsymbols
Expand All @@ -100,7 +100,7 @@ extra_javascript:
extra:
social:
- icon: fontawesome/brands/github
link: https://github.com/projectmesa
link: https://github.com/mesa
- icon: fontawesome/brands/python
link: https://pypi.org/project/mesa-frames/

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ dependencies = [
dynamic = ["version"]

[project.urls]
Documentation = "https://projectmesa.github.io/mesa-frames"
Repository = "https://github.com/projectmesa/mesa-frames.git"
Documentation = "https://mesa.github.io/mesa-frames"
Repository = "https://github.com/mesa/mesa-frames.git"


# ──────────────────────────────────────────────────────────────────────────────
Expand Down
Loading