-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/adamamer20/mesa-frames into…
… 65-sugarscape-instantaneous-growback-polars-with-loops
- Loading branch information
Showing
44 changed files
with
1,916 additions
and
616 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,38 @@ | ||
name: Publish docs via GitHub Pages | ||
name: Build and Deploy Documentation | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
name: Deploy docs | ||
build-and-deploy-docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout main | ||
uses: actions/checkout@v2 | ||
- 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' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install .[docs] | ||
- name: Build MkDocs site (general documentation) | ||
run: mkdocs build --config-file mkdocs.yml --site-dir ./site | ||
|
||
- name: Build Sphinx docs (api documentation) | ||
run: | | ||
sphinx-build -b html docs/api site/api | ||
- name: Deploy docs | ||
uses: mhausenblas/mkdocs-deploy-gh-pages@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
REQUIREMENTS: docs/requirements.txt | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./site | ||
force_orphan: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"MD013": false | ||
"MD013": false, | ||
"MD046": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = source | ||
BUILDDIR = build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
import os | ||
|
||
# -- Path setup -------------------------------------------------------------- | ||
# If extensions (or modules to document with autodoc) are in another directory, | ||
# add these directories to sys.path here. | ||
import sys | ||
from pathlib import Path | ||
|
||
sys.path.insert(0, str(Path("..").resolve())) | ||
|
||
# -- Project information ----------------------------------------------------- | ||
project = "mesa-frames" | ||
author = "Adam Amer" | ||
copyright = f"2023, {author}" | ||
|
||
# -- General configuration --------------------------------------------------- | ||
extensions = [ | ||
"sphinx.ext.autodoc", | ||
"sphinx.ext.autosummary", | ||
"sphinx.ext.napoleon", | ||
"sphinx.ext.viewcode", | ||
"sphinx.ext.intersphinx", | ||
"numpydoc", | ||
"sphinx_copybutton", | ||
"sphinx_design", | ||
"autodocsumm", | ||
] | ||
|
||
templates_path = ["_templates"] | ||
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] | ||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
html_theme = "pydata_sphinx_theme" | ||
html_static_path = ["_static"] | ||
html_show_sourcelink = False | ||
|
||
# -- Extension settings ------------------------------------------------------ | ||
# intersphinx mapping | ||
intersphinx_mapping = { | ||
"python": ("https://docs.python.org/3", None), | ||
"numpy": ("https://numpy.org/doc/stable/", None), | ||
"pandas": ("https://pandas.pydata.org/docs/", None), | ||
"polars": ("https://pola-rs.github.io/polars/py-polars/html/", None), | ||
} | ||
|
||
# numpydoc settings | ||
numpydoc_show_class_members = False | ||
|
||
# Copybutton settings | ||
copybutton_prompt_text = r">>> |\.\.\. " | ||
copybutton_prompt_is_regexp = True | ||
|
||
# -- Custom configurations --------------------------------------------------- | ||
autoclass_content = "class" | ||
autodoc_member_order = "bysource" | ||
autodoc_default_options = {"special-members": True, "exclude-members": "__weakref__"} | ||
|
||
# -- GitHub link and user guide settings ------------------------------------- | ||
github_root = "https://github.com/adamamer20/mesa-frames" | ||
web_root = "https://adamamer20.github.io/mesa-frames" | ||
|
||
html_theme_options = { | ||
"external_links": [ | ||
{ | ||
"name": "User guide", | ||
"url": f"{web_root}/user-guide/", | ||
}, | ||
], | ||
"icon_links": [ | ||
{ | ||
"name": "GitHub", | ||
"url": github_root, | ||
"icon": "fa-brands fa-github", | ||
}, | ||
], | ||
"navbar_end": ["navbar-icon-links"], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
mesa-frames API | ||
=============== | ||
|
||
This page provides a high-level overview of all public mesa-frames objects, functions, and methods. All classes and functions exposed in the ``mesa_frames.*`` namespace are public. | ||
|
||
.. grid:: | ||
|
||
.. grid-item-card:: | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
reference/agents/index | ||
|
||
.. grid-item-card:: | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
reference/model | ||
|
||
.. grid-item-card:: | ||
|
||
.. toctree:: | ||
:maxdepth: 3 | ||
|
||
reference/space/index |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@ECHO OFF | ||
|
||
pushd %~dp0 | ||
|
||
REM Command file for Sphinx documentation | ||
|
||
if "%SPHINXBUILD%" == "" ( | ||
set SPHINXBUILD=sphinx-build | ||
) | ||
set SOURCEDIR=source | ||
set BUILDDIR=build | ||
|
||
%SPHINXBUILD% >NUL 2>NUL | ||
if errorlevel 9009 ( | ||
echo. | ||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx | ||
echo.installed, then set the SPHINXBUILD environment variable to point | ||
echo.to the full path of the 'sphinx-build' executable. Alternatively you | ||
echo.may add the Sphinx directory to PATH. | ||
echo. | ||
echo.If you don't have Sphinx installed, grab it from | ||
echo.https://www.sphinx-doc.org/ | ||
exit /b 1 | ||
) | ||
|
||
if "%1" == "" goto help | ||
|
||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
goto end | ||
|
||
:help | ||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
|
||
:end | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
AgentSetDF | ||
========== | ||
|
||
.. currentmodule:: mesa_frames | ||
|
||
.. autoclass:: AgentSetPandas | ||
:members: | ||
:inherited-members: | ||
:autosummary: | ||
:autosummary-nosignatures: | ||
|
||
.. autoclass:: AgentSetPolars | ||
:members: | ||
:inherited-members: | ||
:autosummary: | ||
:autosummary-nosignatures: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
ModelDF | ||
======= | ||
|
||
.. currentmodule:: mesa_frames | ||
|
||
.. autoclass:: ModelDF | ||
:members: | ||
:inherited-members: | ||
:autosummary: | ||
:autosummary-nosignatures: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
GridDF | ||
====== | ||
|
||
.. currentmodule:: mesa_frames | ||
|
||
.. autoclass:: GridPandas | ||
:members: | ||
:inherited-members: | ||
:autosummary: | ||
:autosummary-nosignatures: | ||
|
||
.. autoclass:: GridPolars | ||
:members: | ||
:inherited-members: | ||
:autosummary: | ||
:autosummary-nosignatures: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Space | ||
===== | ||
This page provides a high-level overview of possible space objects for mesa-frames models. | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
grid/index |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Development Guidelines | ||
|
||
!!! warning | ||
This page is in construction, check it again soon. |
Oops, something went wrong.