diff --git a/Dockerfile b/Dockerfile index a5af06e220b..8b121a83577 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,9 @@ # We can't use slim because we need either git/wget/curl to # download mesa-examples, and so installing them requires # updating the system anyway. -FROM python:bookworm +FROM python:3.12-bookworm + + LABEL maintainer="projectmesa maintainers@projectmesa.dev" # To use this Dockerfile: @@ -29,7 +31,7 @@ COPY . /opt/mesa EXPOSE 8765/tcp -RUN pip3 install -e /opt/mesa[rec] +RUN pip3 install -e '/opt/mesa[rec]' CMD ["sh", "-c", "cd $MODEL_DIR && solara run app.py --host=0.0.0.0"] diff --git a/HISTORY.md b/HISTORY.md index e55d9766854..5135550372d 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -699,7 +699,7 @@ We're proud to release the first Mesa 3.0 beta! This pre-release announces that In this beta, not so much has changed as in the alphas (we're stabilizing, that's a good sign), but there are still a few notable things: - Agents now have to be initialized without their `unique_id`. See [#2328](https://github.com/projectmesa/mesa/pull/2328) and the [Migration guide](https://mesa.readthedocs.io/latest/migration_guide.html#automatic-assignment-of-unique-id-to-agents). - PropertyLayers can now be visualized! See [#2336](https://github.com/projectmesa/mesa/pull/2336) for details and some examples, and [mesa-examples#214](https://github.com/projectmesa/mesa-examples/pull/214) as a simple example model. -- We reduced the core dependencies of Mesa, so that's a lighter and simpler install. You can now use extras to install the dependencies, for example add `[viz]` to install all visualisation dependencies: `pip install -U --pre mesa[viz]`. See [#2265](https://github.com/projectmesa/mesa/pull/2265) for details. +- We reduced the core dependencies of Mesa, so that's a lighter and simpler install. You can now use extras to install the dependencies, for example add `[viz]` to install all visualisation dependencies: `pip install -U --pre "mesa[viz]"`. See [#2265](https://github.com/projectmesa/mesa/pull/2265) for details. - The [Mesa Overview](https://mesa.readthedocs.io/latest/overview.html) as fully updated for 3.0. We highly recommend reading though it! - We made some more progress on the experimental Cell Space, adding movement and integrating the PropertyLayer. Among others, Agents have nu initial movement capabilities for grids. Development continues during the betas and diff --git a/docs/conf.py b/docs/conf.py index b9ca723d82c..5095af87845 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -131,6 +131,10 @@ # documentation. html_theme_options = { "navbar_start": ["navbar-logo"], + "navigation_depth": 4, + "show_nav_level": 2, + "collapse_navigation": True, + "show_toc_level": 2, } # Add any paths that contain custom themes here, relative to this directory. diff --git a/docs/index.md b/docs/index.md index 80ef76421e1..0418f5d8d46 100644 --- a/docs/index.md +++ b/docs/index.md @@ -44,13 +44,12 @@ pip install -U mesa ``` To also install our recommended dependencies: ```bash -pip install -U mesa[rec] +pip install -U "mesa[rec]" ``` The `[rec]` option installs additional recommended dependencies needed for visualization, plotting, and network modeling capabilities. -On a Mac, this command might cause an error stating `zsh: no matches found: mesa[all]`. -In that case, change the command to `pip install -U "mesa[rec]"`. +Note: On macOS with zsh, the square brackets `[rec]` are interpreted as glob patterns by the shell. Always use quotes as shown in the command above to prevent shell expansion errors. Furthermore, if you are using `nix`, Mesa comes with a flake with devShells and a runnable app: @@ -95,8 +94,22 @@ Our [CITATION.cff](https://github.com/projectmesa/mesa/blob/main/CITATION.cff) c The original Mesa conference paper from 2015 is [available here](http://conference.scipy.org.s3-website-us-east-1.amazonaws.com/proceedings/scipy2015/jacqueline_kazil.html). ```{toctree} -:hidden: true -:maxdepth: 7 +:maxdepth: 2 +:caption: Contents + +getting_started +overview +mesa +examples +best-practices +mesa_extension +migration_guide +apis/api_main +GSoC +``` + overview + tutorials/index + Getting started Overview diff --git a/docs/overview.md b/docs/overview.md index fd5610c5d8a..85d87475e29 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -298,21 +298,9 @@ This will create an interactive visualization of your model, including: - A plot of a model metric over time - A slider to adjust the number of agents -```{toctree} -:hidden: true -:maxdepth: 7 - -Overview -Creating Your First Model -Adding Space -Collecting Data -AgentSet -Basic Visualization -Dynamic Agent Visualization -Custom Visualization Components -Parameter Sweeps -Comparing Scenarios -Best Practices -``` + + + + diff --git a/docs/tutorials/0_first_model.ipynb b/docs/tutorials/0_first_model.ipynb index d814be5346b..f337bf94bea 100644 --- a/docs/tutorials/0_first_model.ipynb +++ b/docs/tutorials/0_first_model.ipynb @@ -58,7 +58,7 @@ "Install Mesa:\n", "\n", "```bash\n", - "pip install mesa[rec] \n", + "pip install \"mesa[rec]\"\n", "```\n", "\n", "Install Jupyter notebook (optional):\n", @@ -89,7 +89,7 @@ } }, "source": [ - "%pip install --quiet mesa[rec]" + "%pip install --quiet \"mesa[rec]\"" ] }, { diff --git a/docs/tutorials/10_comparing_scenarios.ipynb b/docs/tutorials/10_comparing_scenarios.ipynb index fbc4deb087d..8e91653946e 100644 --- a/docs/tutorials/10_comparing_scenarios.ipynb +++ b/docs/tutorials/10_comparing_scenarios.ipynb @@ -41,7 +41,7 @@ } }, "source": [ - "%pip install --quiet mesa[rec]" + "%pip install --quiet \"mesa[rec]\"" ] }, { diff --git a/docs/tutorials/1_adding_space.ipynb b/docs/tutorials/1_adding_space.ipynb index 92181efe0ba..f5ce078064e 100644 --- a/docs/tutorials/1_adding_space.ipynb +++ b/docs/tutorials/1_adding_space.ipynb @@ -43,7 +43,7 @@ } }, "source": [ - "%pip install --quiet mesa[rec]" + "%pip install --quiet \"mesa[rec]\"" ] }, { diff --git a/docs/tutorials/2_collecting_data.ipynb b/docs/tutorials/2_collecting_data.ipynb index f5fc42e65a8..1fb1130466e 100644 --- a/docs/tutorials/2_collecting_data.ipynb +++ b/docs/tutorials/2_collecting_data.ipynb @@ -43,7 +43,7 @@ } }, "source": [ - "%pip install --quiet mesa[rec]" + "%pip install --quiet \"mesa[rec]\"" ] }, { diff --git a/docs/tutorials/3_agentset.ipynb b/docs/tutorials/3_agentset.ipynb index 209f2c1a06e..916affb1cde 100644 --- a/docs/tutorials/3_agentset.ipynb +++ b/docs/tutorials/3_agentset.ipynb @@ -43,7 +43,7 @@ } }, "source": [ - "%pip install --quiet mesa[rec]" + "%pip install --quiet \"mesa[rec]\"" ] }, { diff --git a/docs/tutorials/9_batch_run.ipynb b/docs/tutorials/9_batch_run.ipynb index 98ee83e09bd..d323729af92 100644 --- a/docs/tutorials/9_batch_run.ipynb +++ b/docs/tutorials/9_batch_run.ipynb @@ -41,7 +41,7 @@ } }, "source": [ - "%pip install --quiet mesa[rec]" + "%pip install --quiet \"mesa[rec]\"" ] }, { diff --git a/mesa/examples/advanced/alliance_formation/Readme.md b/mesa/examples/advanced/alliance_formation/Readme.md index bb04dea94d0..94741b7050d 100644 --- a/mesa/examples/advanced/alliance_formation/Readme.md +++ b/mesa/examples/advanced/alliance_formation/Readme.md @@ -24,7 +24,7 @@ If you would like to see an example of explicit meta-agent formation see the [wa This model requires Mesa's recommended install and scipy ``` - $ pip install mesa[rec] + $ pip install "mesa[rec]" ``` ## How to Run