Skip to content

Commit 69e407a

Browse files
committed
Revamp documentation content and navigation
1 parent 3037456 commit 69e407a

23 files changed

+3484
-423
lines changed

.gitignore

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,10 @@ llm_rules.md
156156
.python-version
157157

158158
benchmarks/results/*
159-
docs/api/_build/*
160-
docs/api/reference/*
159+
docs/api/_build
160+
docs/api/reference/**/mesa_frames.*.rst
161161
examples/**/results/*
162-
docs/general/**/data_*
163-
docs/site/*
162+
docs/general/tutorials/data_csv
163+
docs/general/tutorials/data_parquet
164+
docs/general/tutorials/*.ipynb
165+
docs/site

CHANGELOG.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
## Version 0.1.0-alpha — 2024-08-28
2+
3+
## What's Changed
4+
5+
* Refactoring mesa.Agent, mesa.AgentSet, mesa.Model -> AgentSetDF, AgentsDF, ModelDF by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/8>
6+
* setup: Migrate from setup.py to pyproject.toml by @rht in <https://github.com/adamamer20/mesa-frames/pull/13>
7+
* ci: Add pre-commit configuration by @rht in <https://github.com/adamamer20/mesa-frames/pull/14>
8+
* Merge requirements.txt into pyproject.toml by @rht in <https://github.com/adamamer20/mesa-frames/pull/15>
9+
* ci: Add GA for tests by @rht in <https://github.com/adamamer20/mesa-frames/pull/17>
10+
* Changes to AgentSetDF and AgentsDF before time.py -> CopyMixin by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/16>
11+
* benchmark: Split Polars agent into native and concise by @rht in <https://github.com/adamamer20/mesa-frames/pull/23>
12+
* benchmark: Split pandas agent into native and concise by @rht in <https://github.com/adamamer20/mesa-frames/pull/24>
13+
* speed up mesa readme_plot script by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/26>
14+
* Adding DataFrameMixin for improved reusability/encapsulation by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/27>
15+
* Abstract SpaceDF by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/29>
16+
* Adding Abstract DiscreteSpaceDF by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/30>
17+
* Adding abstract GridDF by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/32>
18+
* Additional methods and fixes to DataFrameMixin by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/43>
19+
* Concrete GridPandas by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/44>
20+
* [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in <https://github.com/adamamer20/mesa-frames/pull/55>
21+
* Fixes and Tests for PolarsMixin by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/56>
22+
* Adding Comparison and Indexing methods to DataFrameMixin by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/58>
23+
* Concrete GridPolars by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/60>
24+
* Sugarscape Instantaneous Growback (Pandas-with-loop implementation) by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/63>
25+
* Adding pydoclint and properly format docstring by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/69>
26+
* Docs with material-from-mkdocs by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/70>
27+
* Enforce correct numpy docstring formatting with ruff.pydocstyle by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/74>
28+
* API Documentation with Sphinx by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/75>
29+
* Move images from docs to docs/general to make it available for mkdocs by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/79>
30+
* Adding user guide by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/81>
31+
* Adding SugarScape IG (polars with loops) by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/71>
32+
* Automatic publishing on PyPI on new release by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/77>
33+
34+
## New Contributors
35+
36+
* @adamamer20 made their first contribution in <https://github.com/adamamer20/mesa-frames/pull/8>
37+
* @rht made their first contribution in <https://github.com/adamamer20/mesa-frames/pull/13>
38+
* @pre-commit-ci made their first contribution in <https://github.com/adamamer20/mesa-frames/pull/55>
39+
40+
**Full Changelog**: <https://github.com/adamamer20/mesa-frames/commits/v0.1.0-alpha>

CONTRIBUTING.md

Lines changed: 33 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,22 @@ Before contributing, we recommend reviewing our [roadmap](https://projectmesa.gi
1515
Before you begin contributing, ensure that you have the necessary tools installed:
1616

1717
- **Install Python** (at least the version specified in `requires-python` of `pyproject.toml`). 🐍
18-
- We recommend using a virtual environment manager like:
19-
- [Astral's UV](https://docs.astral.sh/uv/#installation) 🌟
20-
- [Hatch](https://hatch.pypa.io/latest/install/) 🏗️
18+
19+
-- We recommend using a virtual environment manager like:
20+
21+
- [Astral's UV](https://docs.astral.sh/uv/#installation) 🌟
22+
- [Hatch](https://hatch.pypa.io/latest/install/) 🏗️
23+
2124
- Install **pre-commit** to enforce code quality standards before pushing changes:
25+
2226
- [Pre-commit installation guide](https://pre-commit.com/#install)
2327
- [More about pre-commit hooks](https://stackoverflow.com/collectives/articles/71270196/how-to-use-pre-commit-to-automatically-correct-commits-and-merge-requests-with-g)
24-
- If using **VS Code**, consider installing these extensions to automatically enforce formatting:
25-
- [Ruff](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff) – Python linting & formatting 🐾
26-
- [Markdownlint](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint) – Markdown linting (for documentation) ✍️
27-
- [Git Hooks](https://marketplace.visualstudio.com/items?itemName=lakshmikanthayyadevara.githooks) – Automatically runs & visualizes pre-commit hooks 🔗
28+
29+
-- If using **VS Code**, consider installing these extensions to automatically enforce formatting:
30+
31+
- [Ruff](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff) – Python linting & formatting 🐾
32+
- [Markdownlint](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint) – Markdown linting (for documentation) ✍️
33+
- [Git Hooks](https://marketplace.visualstudio.com/items?itemName=lakshmikanthayyadevara.githooks) – Automatically runs & visualizes pre-commit hooks 🔗
2834

2935
---
3036

@@ -58,28 +64,13 @@ Before you begin contributing, ensure that you have the necessary tools installe
5864

5965
#### **Step 3: Install Dependencies** 📦
6066

61-
It is recommended to set up a virtual environment before installing dependencies.
62-
63-
- **Using UV**:
64-
65-
```sh
66-
uv add --dev .[dev]
67-
```
68-
69-
- **Using Hatch**:
67+
We manage the development environment with [uv](https://docs.astral.sh/uv/):
7068

71-
```sh
72-
hatch env create dev
73-
```
69+
```sh
70+
uv sync --all-extras
71+
```
7472

75-
- **Using Standard Python**:
76-
77-
```sh
78-
python3 -m venv myenv
79-
source myenv/bin/activate # macOS/Linux
80-
myenv\Scripts\activate # Windows
81-
pip install -e ".[dev]"
82-
```
73+
This creates `.venv/` and installs mesa-frames with the development extras.
8374

8475
#### **Step 4: Make and Commit Changes**
8576

@@ -99,33 +90,35 @@ It is recommended to set up a virtual environment before installing dependencies
9990
- **Run pre-commit hooks** to enforce code quality standards:
10091

10192
```sh
102-
pre-commit run
93+
uv run pre-commit run -a
10394
```
10495

10596
- **Run tests** to ensure your contribution does not break functionality:
10697

10798
```sh
108-
pytest --cov
99+
uv run pytest -q --cov=mesa_frames --cov-report=term-missing
109100
```
110101

111-
- If using UV: `uv run pytest --cov`
102+
-- **Optional: Runtime Type Checking (beartype)** 🔍
112103

113-
- **Optional: Enable runtime type checking** during development for enhanced type safety:
104+
You can enable stricter runtime validation of function arguments/returns with `beartype` during local development:
114105

115106
```sh
116-
MESA_FRAMES_RUNTIME_TYPECHECKING=1 uv run pytest --cov
107+
MESA_FRAMES_RUNTIME_TYPECHECKING=1 uv run pytest -q --cov=mesa_frames --cov-report=term-missing
117108
```
118109

119-
!!! tip "Automatically Enabled"
120-
Runtime type checking is automatically enabled in these scenarios:
110+
Quick facts:
121111

122-
- **Hatch development environment** (`hatch shell dev`)
123-
- **VS Code debugging** (when using the debugger)
124-
- **VS Code testing** (when running tests through VS Code's testing interface)
112+
- Automatically enabled in: Hatch dev env (`hatch shell dev`), VS Code debugger, and VS Code test runs.
113+
- Enable manually by exporting `MESA_FRAMES_RUNTIME_TYPECHECKING=1` (any of 1/true/yes).
114+
- Use only for development/debugging; adds overhead—disable for performance measurements or large simulations.
115+
- Unset with your shell (e.g. `unset`/`Remove-Item Env:` depending on shell) to turn it off.
125116

126-
No manual setup needed in these environments!
117+
Example for a one-off test run:
127118

128-
For more details on runtime type checking, see the [Development Guidelines](https://projectmesa.github.io/mesa-frames/development/).
119+
```sh
120+
MESA_FRAMES_RUNTIME_TYPECHECKING=1 uv run pytest -q
121+
```
129122

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

@@ -135,8 +128,7 @@ It is recommended to set up a virtual environment before installing dependencies
135128
- Preview your changes by running:
136129

137130
```sh
138-
mkdocs serve
139-
uv run mkdocs serve #If using uv
131+
uv run mkdocs serve
140132
```
141133

142134
- Open `http://127.0.0.1:8000` in your browser to verify documentation updates.

0 commit comments

Comments
 (0)