Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
6251de9
chore: update index.md to include README content to remove duplication
adamamer20 Sep 19, 2025
169c618
fix: update benchmarks navigation link to correct file path
adamamer20 Sep 19, 2025
6287a1b
fix: clarify guidance on using vectorized operations and correct samp…
adamamer20 Sep 19, 2025
e8624f9
docs: streamline installation instructions for development setup
adamamer20 Sep 19, 2025
4633c66
docs: update dependency installation instructions to streamline setup…
adamamer20 Sep 19, 2025
c3797c1
fix: correct minor wording for clarity in vectorized operations section
adamamer20 Sep 19, 2025
48b7659
fix: swap benchmark graph images for Boltzmann Wealth Model comparisons
adamamer20 Sep 19, 2025
7912b04
docs: add tooling instructions for running tests and checks in develo…
adamamer20 Sep 19, 2025
30478ff
docs: add advanced tutorial for Sugarscape model using mesa-frames
adamamer20 Sep 20, 2025
d05e00e
refactor: streamline Sugarscape model initialization and enhance agen…
adamamer20 Sep 20, 2025
27ea2ec
docs: enhance Sugarscape model class docstrings for clarity and compl…
adamamer20 Sep 20, 2025
4552a08
docs: add agent definition section and base agent class implementatio…
adamamer20 Sep 20, 2025
3c55734
docs: update import statements for future annotations in advanced tut…
adamamer20 Sep 20, 2025
8e978da
refactor: optimize sugar consumption logic in SugarscapeAgentsBase class
adamamer20 Sep 20, 2025
894c181
docs: enhance documentation for Sugarscape agent classes and methods
adamamer20 Sep 20, 2025
b859739
fix: resolve ambiguity in membership checks for occupied cells in Sug…
adamamer20 Sep 20, 2025
0c819c9
feat: add environment variable support for sequential baseline execut…
adamamer20 Sep 20, 2025
1f52845
refactor: move _current_sugar_map method to SugarscapeSequentialAgent…
adamamer20 Sep 20, 2025
f78c4c2
refactor: replace Manhattan distance calculation with Frobenius norm …
adamamer20 Sep 20, 2025
6e6c5d1
refactor: move _visible_cells and _choose_best_cell methods to Sugars…
adamamer20 Sep 20, 2025
7125447
chore: remove placeholder advanced tutorial for SugarScape with Insta…
adamamer20 Sep 20, 2025
0be9d0f
feat: add Gini coefficient and correlation metrics for sugar, metabol…
adamamer20 Sep 20, 2025
273ba7c
refactor: move _safe_corr function to improve code organization in ad…
adamamer20 Sep 20, 2025
0e5b125
feat: add Gini coefficient and correlation metrics for sugar, metabol…
adamamer20 Sep 20, 2025
8957020
refactor: rename 'living_agents' to 'agents_alive' for clarity in Sug…
adamamer20 Sep 20, 2025
6281276
refactor: rename 'SugarscapeAgentsBase' to 'AntsBase' and update rela…
adamamer20 Sep 20, 2025
e03f2da
refactor: update grid dimensions and rename 'living_agents' to 'agent…
adamamer20 Sep 20, 2025
44bbdc2
refactor: update section headings for clarity and consistency in adva…
adamamer20 Sep 20, 2025
9edbfdb
refactor: improve agent movement logic and enhance readability in Ant…
adamamer20 Sep 20, 2025
408e040
refactor: update candidate dimension names for clarity in AntsParalle…
adamamer20 Sep 20, 2025
0f96653
refactor: enhance comments for clarity and understanding in AntsParal…
adamamer20 Sep 20, 2025
5e2ce87
refactor: streamline model variant execution and improve readability …
adamamer20 Sep 20, 2025
34c2fd8
refactor: update metrics table construction for clarity and consisten…
adamamer20 Sep 20, 2025
b5cf869
refactor: update section headings for clarity and consistency in adva…
adamamer20 Sep 20, 2025
df89fea
refactor: improve clarity and conciseness in advanced tutorial sectio…
adamamer20 Sep 20, 2025
9eb2457
refactor: remove unnecessary newline at the end of the file in advanc…
adamamer20 Sep 20, 2025
92db3be
fix: update link for Advanced Tutorial to point to the correct notebo…
adamamer20 Sep 20, 2025
7c2645e
feat: add jupytext dependency for enhanced notebook support
adamamer20 Sep 20, 2025
511e303
refactor: remove Jupyter metadata and clean up markdown cells in adva…
adamamer20 Sep 20, 2025
f37b61b
feat: add step to convert tutorial .py scripts to notebooks in CI wor…
adamamer20 Sep 20, 2025
284a991
feat: add jupytext dependency for enhanced notebook support in develo…
adamamer20 Sep 20, 2025
b4076c4
refactor: simplify variant_specs structure and remove unused RUN_SEQU…
adamamer20 Sep 20, 2025
a36e181
refactor: update GitHub Actions workflow for documentation build and …
adamamer20 Sep 20, 2025
ec98197
docs: clarify tutorial instructions for running model variants
adamamer20 Sep 20, 2025
4ef1cf6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 21, 2025
6c0deb0
refactor: enhance jupytext conversion process for .py notebooks in do…
adamamer20 Sep 21, 2025
60bd49b
docs: clarify step ordering in Sugarscape model tutorial
adamamer20 Sep 21, 2025
d7263e1
refactor: optimize distance calculation in AntsSequential class using…
adamamer20 Sep 21, 2025
d62d406
docs: enhance move method documentation in AntsParallel class with de…
adamamer20 Sep 21, 2025
495dbfb
docs: enhance explanation of modeling philosophy in advanced tutorial
adamamer20 Sep 21, 2025
2f02367
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 21, 2025
82a9ab3
docs: update user guide link to point to the getting started section
adamamer20 Sep 21, 2025
bb7910b
docs: remove obsolete Makefile and batch script for Sphinx documentation
Sep 21, 2025
bcf9a51
docs: update overview and mini usage flow in API documentation
Sep 21, 2025
2f51c5a
docs: add docs/site to .gitignore
Sep 21, 2025
62ede62
docs: update API reference for clarity and consistency
Sep 21, 2025
056b5b0
docs: refine minimal example for AgentSet initialization
Sep 21, 2025
b7e437e
docs: enhance minimal example for Model with updated AgentSet usage
Sep 21, 2025
631f363
docs: expand DataCollector documentation with detailed usage examples
Sep 21, 2025
473e0d8
docs: update Model documentation for improved clarity and examples
Sep 21, 2025
439b6a6
docs: enhance overview and examples for Grid usage in space reference
Sep 21, 2025
0c82492
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 21, 2025
82bcc78
docs: add custom branding CSS and JS files to documentation
Sep 21, 2025
fb3bdc4
docs: remove mesa_brand.js and update theme switcher integration in c…
Sep 21, 2025
46c0fd3
docs: update .gitignore to exclude site and API build directories
Sep 21, 2025
bcc055f
docs: add brand variables and theme adapters for improved styling
Sep 21, 2025
f0ee974
docs: remove obsolete brand CSS files for cleaner styling integration
Sep 21, 2025
0391352
.gitignore
Sep 21, 2025
f11b62f
docs: update navigation structure in conf.py and index.rst for improv…
Sep 21, 2025
e9c982d
docs: clean up navbar configuration and fix formatting in API documen…
Sep 21, 2025
620ece9
docs: update TOC settings and enhance autodoc options for better docu…
Sep 22, 2025
0ec7fe4
docs: restructure API reference for AgentSet and AgentSetRegistry wit…
Sep 22, 2025
5927c60
docs: add mesa_frames RST files to .gitignore to prevent tracking
Sep 22, 2025
66dbd5e
docs: update autosummary toctree settings for AgentSet and AgentSetRe…
Sep 22, 2025
8373dbe
docs: enhance API documentation structure with tabs and autosummary f…
Sep 22, 2025
5b76c0a
docs: enhance API reference structure with tabs and autosummary for i…
Sep 22, 2025
eb87385
docs: add logo and favicon settings to HTML output configuration
Sep 22, 2025
1abf27a
docs: add Matrix link to navigation bar for community support
Sep 22, 2025
7632f92
docs: add Meta and Chat sections with relevant badges to README
Sep 22, 2025
b3bdf73
docs: update logo and favicon URLs to use remote assets
Sep 22, 2025
3717ed2
docs: update site name for clarity in project documentation
Sep 22, 2025
9db75c0
docs: enhance README structure and content for clarity and organization
Sep 22, 2025
54d0f27
docs: change .ipynb tutorials to jupytext
Sep 23, 2025
978b874
docs: update README for clarity and organization, enhance benchmarks …
Sep 23, 2025
44c3f46
Merge branch 'improving_documentation' of https://github.com/projectm…
Sep 23, 2025
5b9c2e9
docs: fix typos in advanced tutorial for clarity
Sep 23, 2025
5ac548c
docs: update Data Collector tutorial for clarity and organization
Sep 23, 2025
39053e1
docs: improve formatting and consistency in README.md
Sep 23, 2025
8d7acbf
docs: clarify parameter descriptions in advanced tutorial
Sep 23, 2025
24ba420
docs: improve README formatting and consistency
Sep 23, 2025
3fc2107
Merge branch 'improving_documentation' of https://github.com/projectm…
adamamer20 Sep 23, 2025
c2fdefd
Merge branch 'improving_documentation' of https://github.com/projectm…
Sep 23, 2025
0279f6a
feat: add initial implementation of Boltzmann wealth example
Sep 24, 2025
ea06c97
feat: update docs dependencies to include typer version 0.9.0
Sep 24, 2025
bb75630
feat: add Typer CLI for mesa vs mesa-frames performance benchmarks
Sep 24, 2025
6a6604c
feat: remove unused images and performance plot for Boltzmann wealth …
Sep 25, 2025
da65b01
feat: add Boltzmann wealth model implementation with Typer CLI; inclu…
Sep 25, 2025
db4c32d
feat: add plotting module for visualizing model and agent metrics; re…
Sep 26, 2025
98278b8
feat: implement Mesa backend for Boltzmann wealth model; add FramesSi…
Sep 26, 2025
2c625e1
fix: update typer dependency to allow any version >=0.9.0; remove per…
Sep 26, 2025
37b2aec
refactor: remove Sugarscape IG example files and reorganize backend s…
Sep 26, 2025
747a15d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 26, 2025
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
103 changes: 82 additions & 21 deletions .github/workflows/docs-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,101 @@
name: Build and Deploy Documentation
name: Docs — Build & Preview

on:
push:
branches:
- main
branches: [ main ] # regular prod deploy
paths:
- 'mkdocs.yml'
- 'docs/**'
pull_request: # preview only when docs are touched
branches: [ '**' ]
paths:
- 'mkdocs.yml'
- 'docs/**'

jobs:
build-and-deploy-docs:
build:
runs-on: ubuntu-latest
outputs:
short_sha: ${{ steps.sha.outputs.short }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for .git-restore-mtime to work correctly

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
with: { fetch-depth: 0 }
- uses: actions/setup-python@v5
with: { python-version: '3.x' }
- uses: astral-sh/setup-uv@v6

- name: Install uv via GitHub Action
uses: astral-sh/setup-uv@v6

- name: Install mesa-frames + docs dependencies
- name: Install mesa-frames + docs deps
run: |
uv pip install --system .
uv pip install --group docs --system

- name: Build MkDocs site (general documentation)
run: mkdocs build --config-file mkdocs.yml --site-dir ./site
- name: Convert jupytext .py notebooks to .ipynb
run: |
set -euxo pipefail
# Convert any jupytext .py files to .ipynb without executing them.
# Enable nullglob so the pattern expands to empty when there are no matches
# and globstar so we recurse into subdirectories (e.g., user-guide/).
shopt -s nullglob globstar || true
files=(docs/general/**/*.py)
if [ ${#files[@]} -eq 0 ]; then
echo "No jupytext .py files found under docs/general"
else
for src in "${files[@]}"; do
[ -e "$src" ] || continue
dest="${src%.py}.ipynb"
echo "Converting $src -> $dest"
# jupytext will write the .ipynb alongside the source file
uv run jupytext --to notebook "$src"
done
fi

- name: Build MkDocs site
run: uv run mkdocs build --config-file mkdocs.yml --site-dir ./site

- name: Build Sphinx docs (API)
run: uv run sphinx-build -b html docs/api site/api

- name: Build Sphinx docs (API documentation)
run: sphinx-build -b html docs/api site/api
- name: Short SHA
id: sha
run: echo "short=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"

- name: Deploy to GitHub Pages
- name: Upload site artifact
uses: actions/upload-artifact@v4
with:
name: site
path: site

deploy-main:
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with: { name: site, path: site }
- name: Deploy to GitHub Pages (main)
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./site
force_orphan: true
force_orphan: true

deploy-preview:
needs: build
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with: { name: site, path: site }
- name: Deploy preview under subfolder
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./site
destination_dir: preview/${{ github.head_ref || github.ref_name }}/${{ needs.build.outputs.short_sha }}
keep_files: true # keep previous previews
# DO NOT set force_orphan here
- name: Print preview URL
run: |
echo "Preview: https://${{ github.repository_owner }}.github.io/$(basename ${{ github.repository }})/preview/${{ github.head_ref || github.ref_name }}/${{ needs.build.outputs.short_sha }}/"
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,9 @@ cython_debug/
*.code-workspace
llm_rules.md
.python-version
docs/site
docs/api/_build
docs/general/user-guide/data_csv
docs/general/user-guide/data_parquet
docs/api/reference/**/mesa_frames.*.rst
examples/**/results
36 changes: 9 additions & 27 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,28 +58,13 @@ Before you begin contributing, ensure that you have the necessary tools installe

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

It is recommended to set up a virtual environment before installing dependencies.
We manage the development environment with [uv](https://docs.astral.sh/uv/):

- **Using UV**:
```sh
uv sync --all-extras
```

```sh
uv add --dev .[dev]
```

- **Using Hatch**:

```sh
hatch env create dev
```

- **Using Standard Python**:

```sh
python3 -m venv myenv
source myenv/bin/activate # macOS/Linux
myenv\Scripts\activate # Windows
pip install -e ".[dev]"
```
This creates `.venv/` and installs mesa-frames with the development extras.

#### **Step 4: Make and Commit Changes** ✨

Expand All @@ -99,21 +84,19 @@ It is recommended to set up a virtual environment before installing dependencies
- **Run pre-commit hooks** to enforce code quality standards:

```sh
pre-commit run
uv run pre-commit run -a
```

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

```sh
pytest --cov
uv run pytest -q --cov=mesa_frames --cov-report=term-missing
```

- If using UV: `uv run pytest --cov`

- **Optional: Enable runtime type checking** during development for enhanced type safety:

```sh
MESA_FRAMES_RUNTIME_TYPECHECKING=1 uv run pytest --cov
MESA_FRAMES_RUNTIME_TYPECHECKING=1 uv run pytest -q --cov=mesa_frames --cov-report=term-missing
```

!!! tip "Automatically Enabled"
Expand All @@ -135,8 +118,7 @@ It is recommended to set up a virtual environment before installing dependencies
- Preview your changes by running:

```sh
mkdocs serve
uv run mkdocs serve #If using uv
uv run mkdocs serve
```

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