Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
188 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
91d7f39
feat: add Sugarscape IG implementation with Typer CLI; include agent …
Oct 7, 2025
6a251ce
fix: remove extras from typer dependency in development and documenta…
Oct 7, 2025
9db7780
feat: add Sugarscape IG model with Typer CLI for simulation and data …
Oct 7, 2025
543582f
feat: enhance model metrics extraction and plotting in Sugarscape IG …
Oct 7, 2025
53d940c
feat: add correlation functions for sugar metabolism and vision; enha…
Oct 7, 2025
6348ee7
fix: address missing return statements in correlation and Gini functions
Oct 7, 2025
2ecc724
fix: update datetime import and adjust agent type in CLI benchmark fu…
Oct 7, 2025
542affd
fix: update title format in run function for Sugarscape IG
Oct 7, 2025
3409e95
fix: adjust storage handling in DataCollector for benchmarks without …
Oct 14, 2025
be08498
refactor: improve type hints and formatting across multiple files
Oct 14, 2025
0a2f672
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 14, 2025
2ba2e22
fix: improve formatting and type hints in run function parameters
Oct 14, 2025
b8df66b
Merge branch 'improving_documentation' of https://github.com/projectm…
Oct 14, 2025
dc09d4e
adding warning when runtime type checking is activated
adamamer20 Oct 16, 2025
a8fa692
fix: update wealth adjustment logic in MoneyAgents class
adamamer20 Oct 16, 2025
95acd65
fix: streamline wealth adjustment logic in MoneyAgents class
adamamer20 Oct 16, 2025
eba6082
refactor: update _plot_performance to use centralized plotting utilit…
adamamer20 Oct 16, 2025
7e6032c
fix: adjust range validation to allow zero as a valid start endpoint
adamamer20 Oct 16, 2025
40332c8
refactor: format _plot_performance function signature for improved re…
adamamer20 Oct 16, 2025
d7ee340
fix: enhance sorting criteria in AntsParallel class for improved cand…
adamamer20 Oct 16, 2025
9ec57c4
feat: add completion messages to CLI for benchmarking runs
adamamer20 Oct 16, 2025
25575d2
refactor: update plot titles for clarity and enhance legend handling …
adamamer20 Oct 17, 2025
5979ff9
fix: update .gitignore to include results and plots directories for e…
adamamer20 Oct 17, 2025
fcce402
refactor: enhance output directory structure for benchmark results an…
adamamer20 Oct 17, 2025
e5bc07e
refactor: streamline plots directory handling in benchmark CLI
adamamer20 Oct 17, 2025
d973b16
feat: add comprehensive examples and usage instructions to README
adamamer20 Oct 17, 2025
e56a699
feat: add README for Boltzmann Wealth Exchange Model example with usa…
adamamer20 Oct 17, 2025
7ae1495
feat: add README for Sugarscape IG example with detailed usage instru…
adamamer20 Oct 17, 2025
a1c76a3
docs: update README for Boltzmann Wealth Exchange and Sugarscape IG e…
adamamer20 Oct 17, 2025
504d9f2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 17, 2025
85af55a
docs: update benchmark links and images in README for improved accuracy
adamamer20 Oct 17, 2025
55dbbec
chore: remove unused JavaScript and CSS references from mkdocs config…
adamamer20 Oct 17, 2025
d4bc7fb
feat: add SVG files for Boltzmann and Sugarscape plots to enhance doc…
adamamer20 Oct 17, 2025
3c4095d
Implement code changes to enhance functionality and improve performance
adamamer20 Oct 17, 2025
d2511da
Implement code changes to enhance functionality and improve performance
adamamer20 Oct 17, 2025
aa3fe61
docs: update benchmark image paths in README for improved accuracy
adamamer20 Oct 17, 2025
ef724c2
docs: enhance performance descriptions in README for clarity and accu…
adamamer20 Oct 17, 2025
a2b28e0
Merge branch 'improving_documentation' of https://github.com/projectm…
adamamer20 Oct 17, 2025
a8107d2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 17, 2025
29a583a
Merge branch 'improving_documentation' of https://github.com/projectm…
Oct 17, 2025
47fc53e
fix: disable notebook execution in mkdocs configuration and adjust tu…
Oct 17, 2025
8ec84a0
fix: enable notebook execution in mkdocs configuration and restrict p…
Oct 17, 2025
165f3f7
fix: update mkdocs-jupyter plugin configuration to restrict notebook …
Oct 17, 2025
5e59e05
fix: remove outdated benchmarks documentation from user guide
Oct 17, 2025
65afb5b
Add Data Collector tutorial in Jupyter Notebook and Python script
Oct 17, 2025
5511154
fix: update agent_reporters format in Sugarscape model
Oct 17, 2025
e6499c9
fix: correct file naming in Tutorials section of mkdocs configuration
Oct 17, 2025
ec2b156
fix: update agent_reporters format in Sugarscape model to use explici…
Oct 17, 2025
a9fc3bb
fix: comment out installation commands in introductory and advanced t…
Oct 17, 2025
ddfa06f
fix: update contributing guidelines for clarity and completeness
Oct 17, 2025
b60686c
fix: update sample method calls in tutorials for consistency and accu…
Oct 17, 2025
643cca0
fix: format installation instructions for consistency in contributing…
Oct 17, 2025
cf0815a
fix: update mkdocs configuration to disable notebook execution and ad…
Oct 17, 2025
991a3cc
fix: correct variable name in wealth distribution example for accuracy
Oct 17, 2025
a42d5b2
fix: update getting started guide for clarity and completeness
Oct 17, 2025
7b50f78
fix: enhance runtime type checking section in contributing guide for …
Oct 17, 2025
be92cdc
fix: improve formatting and indentation in contributing guidelines fo…
Oct 17, 2025
1cf6ae6
fix: improve formatting of runtime type checking section in contribut…
Oct 17, 2025
ef463d2
fix: enhance clarity and detail in vectorized operations section of g…
Oct 17, 2025
be30726
feat: add seed property and setter to Model class for random generato…
Oct 17, 2025
8576a33
fix: update example sections to pluralize for consistency in Abstract…
Oct 17, 2025
54fc12c
fix: update documentation for DataCollector to enhance clarity and co…
Oct 17, 2025
a0b45ee
fix: correct introductory sentence in Model documentation for clarity
Oct 17, 2025
f44eb18
fix: enhance documentation for AbstractAgentSet methods and add new a…
Oct 17, 2025
0837a04
fix: update Sphinx configuration to enable autosummary generation ove…
Oct 17, 2025
7fb155c
fix: enhance documentation for AbstractAgentSet properties to improve…
Oct 17, 2025
6e76bba
fix: update documentation for Space overview and examples for clarity…
Oct 17, 2025
b99658b
fix: improve code formatting and organization in documentation and ag…
Oct 17, 2025
3dd607a
fix: simplify return type annotation for random generator in Abstract…
Oct 17, 2025
73b358a
fix: correct spelling and formatting in README files for consistency
Oct 17, 2025
5b0eb23
fix: update tutorial link and roadmap URL in README for accuracy
Oct 19, 2025
e1da7eb
fix: update README for improved clarity and organization
Oct 19, 2025
b6d014d
fix: update section on transitioning from imperative code to behavior…
Oct 19, 2025
3df8eb2
feat: add changelog inclusion for better documentation accessibility
Oct 19, 2025
47f1e18
fix: remove unused brand-material.css file to streamline stylesheets
Oct 19, 2025
4c9416e
feat: add Changelog link to navigation for improved documentation acc…
Oct 19, 2025
87a67da
fix: add missing newline at end of CHANGELOG.md for proper formatting
Oct 19, 2025
85f8d9e
feat: automate changelog generation and update process for new releases
Oct 19, 2025
af70ba3
fix: update publish workflow to ensure changelog is generated and com…
Oct 19, 2025
dd582b8
refactor: update ROADMAP.md for clarity and focus on near-term goals
Oct 19, 2025
0921cbc
chore: update ROADMAP.md for consistency and clarity
Oct 19, 2025
cc751a7
fix: add missing newline in ROADMAP.md for proper formatting
Oct 19, 2025
16fe18e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 19, 2025
a6ea494
fix: replace setup-python action with astral-sh/setup-uv for improved…
Oct 19, 2025
bac16c0
refactor: remove select() method from the abstract API in AbstractAge…
Oct 20, 2025
fc9eef4
fix: simplify rename logic in AgentSet class for better readability
Oct 20, 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
100 changes: 80 additions & 20 deletions .github/workflows/docs-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,100 @@
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 }

- name: Install uv via GitHub Action
uses: astral-sh/setup-uv@v6
- 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: Short SHA
id: sha
run: echo "short=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"

- name: Upload site artifact
uses: actions/upload-artifact@v4
with:
name: site
path: site

- name: Build Sphinx docs (API documentation)
run: sphinx-build -b html docs/api site/api
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

- name: Deploy to GitHub Pages
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
force_orphan: true
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 }}/"
73 changes: 54 additions & 19 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,43 +17,78 @@ jobs:
with:
fetch-depth: 0
token: ${{ secrets.VERSION_PUSH_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install hatch
- name: Setup uv
uses: astral-sh/setup-uv@v3
- name: Set release version
run: |
# Get the tag from the GitHub release
TAG=${GITHUB_REF#refs/tags/}
# Remove 'v' prefix if present
VERSION=${TAG#v}
hatch version $VERSION
uvx hatch version $VERSION
- name: Build package
run: hatch build
run: uvx hatch build
- name: Run tests
run: hatch run test:pytest
run: uvx hatch run test:pytest
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Verify PyPI Release
run: |
# Verify PyPI release
PACKAGE_NAME="mesa_frames"
CURRENT_VERSION=$(hatch version)
pip install $PACKAGE_NAME==$CURRENT_VERSION
CURRENT_VERSION=$(uvx hatch version)
uv pip install --system $PACKAGE_NAME==$CURRENT_VERSION
python -c "import mesa_frames; print(mesa_frames.__version__)"
- name: Update GitHub Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
dist/*
- name: Generate changelog from release notes
id: notes
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const tag = (context.payload.release && context.payload.release.tag_name)
? context.payload.release.tag_name
: (process.env.GITHUB_REF || '').replace('refs/tags/', '');

const body = (context.payload.release && context.payload.release.body) ? context.payload.release.body : '';
if (!body || body.trim().length === 0) {
core.setFailed('Release body is empty. Ensure the GitHub Release is created with auto-generated notes configured by .github/release.yml or supply a body.');
}

fs.writeFileSync('RELEASE_BODY.md', body, 'utf8');
core.setOutput('tag', tag);
- name: Prepend notes to CHANGELOG.md
env:
TAG: ${{ steps.notes.outputs.tag }}
run: |
VERSION_NO_V=${TAG#v}
DATE_UTC=$(date -u +%Y-%m-%d)
echo "## Version ${VERSION_NO_V} — ${DATE_UTC}" > RELEASE_HEADER.md
echo "" >> RELEASE_HEADER.md
if [ -f CHANGELOG.md ]; then
cat RELEASE_HEADER.md RELEASE_BODY.md CHANGELOG.md > CHANGELOG.new
else
cat RELEASE_HEADER.md RELEASE_BODY.md > CHANGELOG.new
fi
mv CHANGELOG.new CHANGELOG.md
- name: Commit and push CHANGELOG update
env:
TAG: ${{ steps.notes.outputs.tag }}
run: |
git config user.name github-actions
git config user.email [email protected]
git add CHANGELOG.md
# Avoid CI cycles
git commit -m "Changelog: add notes for ${TAG} [skip ci]" || echo "No changelog changes to commit"
git push origin main || true
- name: Create or recreate version branch
run: |
CURRENT_VERSION=$(hatch version)
CURRENT_VERSION=$(uvx hatch version)
BRANCH_NAME="v$CURRENT_VERSION"

git config user.name github-actions
Expand All @@ -72,15 +107,15 @@ jobs:
- name: Update to Next Version
run: |
# Bump to next development version
hatch version patch
hatch version dev
uvx hatch version patch
uvx hatch version dev

# Get the new version
NEW_VERSION=$(hatch version)
NEW_VERSION=$(uvx hatch version)

# Commit and push the version bump
git config user.name github-actions
git config user.email [email protected]
git add mesa_frames/__init__.py
git add mesa_frames/__init__.py CHANGELOG.md
git commit -m "Bump version to $NEW_VERSION [skip ci]"
git push origin main
git push origin main
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,12 @@ cython_debug/
*.code-workspace
llm_rules.md
.python-version
docs/site
docs/api/_build
docs/general/tutorials/data_csv
docs/general/tutorials/data_parquet
docs/general/tutorials/*.ipynb
docs/api/reference/**/mesa_frames.*.rst
examples/**/results
benchmarks/**/results
benchmarks/**/plots
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## Version 0.1.0-alpha — 2024-08-28

## What's Changed

* Refactoring mesa.Agent, mesa.AgentSet, mesa.Model -> AgentSetDF, AgentsDF, ModelDF by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/8>
* setup: Migrate from setup.py to pyproject.toml by @rht in <https://github.com/adamamer20/mesa-frames/pull/13>
* ci: Add pre-commit configuration by @rht in <https://github.com/adamamer20/mesa-frames/pull/14>
* Merge requirements.txt into pyproject.toml by @rht in <https://github.com/adamamer20/mesa-frames/pull/15>
* ci: Add GA for tests by @rht in <https://github.com/adamamer20/mesa-frames/pull/17>
* Changes to AgentSetDF and AgentsDF before time.py -> CopyMixin by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/16>
* benchmark: Split Polars agent into native and concise by @rht in <https://github.com/adamamer20/mesa-frames/pull/23>
* benchmark: Split pandas agent into native and concise by @rht in <https://github.com/adamamer20/mesa-frames/pull/24>
* speed up mesa readme_plot script by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/26>
* Adding DataFrameMixin for improved reusability/encapsulation by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/27>
* Abstract SpaceDF by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/29>
* Adding Abstract DiscreteSpaceDF by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/30>
* Adding abstract GridDF by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/32>
* Additional methods and fixes to DataFrameMixin by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/43>
* Concrete GridPandas by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/44>
* [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in <https://github.com/adamamer20/mesa-frames/pull/55>
* Fixes and Tests for PolarsMixin by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/56>
* Adding Comparison and Indexing methods to DataFrameMixin by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/58>
* Concrete GridPolars by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/60>
* Sugarscape Instantaneous Growback (Pandas-with-loop implementation) by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/63>
* Adding pydoclint and properly format docstring by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/69>
* Docs with material-from-mkdocs by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/70>
* Enforce correct numpy docstring formatting with ruff.pydocstyle by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/74>
* API Documentation with Sphinx by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/75>
* Move images from docs to docs/general to make it available for mkdocs by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/79>
* Adding user guide by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/81>
* Adding SugarScape IG (polars with loops) by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/71>
* Automatic publishing on PyPI on new release by @adamamer20 in <https://github.com/adamamer20/mesa-frames/pull/77>

## New Contributors

* @adamamer20 made their first contribution in <https://github.com/adamamer20/mesa-frames/pull/8>
* @rht made their first contribution in <https://github.com/adamamer20/mesa-frames/pull/13>
* @pre-commit-ci made their first contribution in <https://github.com/adamamer20/mesa-frames/pull/55>

**Full Changelog**: <https://github.com/adamamer20/mesa-frames/commits/v0.1.0-alpha>
Loading