Skip to content

Commit

Permalink
Api docs (#2298)
Browse files Browse the repository at this point in the history
  • Loading branch information
quaquel authored Sep 18, 2024
1 parent 3fce592 commit b95dd19
Show file tree
Hide file tree
Showing 12 changed files with 40 additions and 27 deletions.
8 changes: 8 additions & 0 deletions docs/apis/agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Agent


```{eval-rst}
.. automodule:: mesa.agent
:members:
:inherited-members:
```
3 changes: 2 additions & 1 deletion docs/apis/api_main.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
```{toctree}
:maxdepth: 3
Base Classes <init>
model
agent
time
space
datacollection
Expand Down
2 changes: 2 additions & 0 deletions docs/apis/batchrunner.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Batchrunner

```{eval-rst}
.. automodule:: batchrunner
:members:
Expand Down
2 changes: 2 additions & 0 deletions docs/apis/datacollection.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Data collection

```{eval-rst}
.. automodule:: datacollection
:members:
Expand Down
6 changes: 1 addition & 5 deletions docs/apis/experimental.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# Experimental

```{eval-rst}
.. automodule:: experimental.__init__
:members:
```
This namespace contains experimental features. These are under development, and their API is not necessarily stable.

## Cell Space

Expand Down
11 changes: 0 additions & 11 deletions docs/apis/init.md

This file was deleted.

7 changes: 7 additions & 0 deletions docs/apis/model.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Model

```{eval-rst}
.. automodule:: mesa.model
:members:
:inherited-members:
```
2 changes: 2 additions & 0 deletions docs/apis/space.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Spaces

```{eval-rst}
.. automodule:: mesa.space
:members:
Expand Down
2 changes: 2 additions & 0 deletions docs/apis/time.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Time

```{eval-rst}
.. automodule:: mesa.time
:members:
Expand Down
4 changes: 2 additions & 2 deletions mesa/agent.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""The agent class for Mesa framework.
"""Agent related classes
Core Objects: Agent
Core Objects: Agent and AgentSet.
"""

# Mypy; for the `|` operator purpose
Expand Down
7 changes: 6 additions & 1 deletion mesa/experimental/cell_space/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
"""Cell spaces."""
"""Cell spaces.
Cell spaces offer an alternative API for discrete spaces. It is experimental and under development. The API is more
expressive that the default grids available in `mesa.space`.
"""

from mesa.experimental.cell_space.cell import Cell
from mesa.experimental.cell_space.cell_agent import CellAgent
Expand Down
13 changes: 6 additions & 7 deletions mesa/space.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
Objects used to add a spatial component to a model.
Grid: base grid, which creates a rectangular grid.
SingleGrid: extension to Grid which strictly enforces one agent per cell.
MultiGrid: extension to Grid where each cell can contain a set of agents.
HexGrid: extension to Grid to handle hexagonal neighbors.
ContinuousSpace: a two-dimensional space where each agent has an arbitrary
position of `float`'s.
NetworkGrid: a network where each node contains zero or more agents.
* Grid: base grid, which creates a rectangular grid.
* SingleGrid: extension to Grid which strictly enforces one agent per cell.
* MultiGrid: extension to Grid where each cell can contain a set of agents.
* HexGrid: extension to Grid to handle hexagonal neighbors.
* ContinuousSpace: a two-dimensional space where each agent has an arbitrary position of `float`'s.
* NetworkGrid: a network where each node contains zero or more agents.
"""

# Mypy; for the `|` operator purpose
Expand Down

0 comments on commit b95dd19

Please sign in to comment.