Repository: projectmesa/mesa (python)

Issue:
Rename JupyterViz to SolaraViz
I want to propose to rename `JupyterViz` to `SolaraViz` in the [visualization](https://github.com/projectmesa/mesa/tree/main/mesa/visualization). We build heavily onto Solara, and it's also used outside Jupyter notebook environments. I regularly call it the "Solara-based visualisation" right now, and you also enable it from the cli by running `solara run`. So it's a more descriptive and fitting name.

JupyterViz has't been published as a stable release (since https://github.com/projectmesa/mesa/pull/2090 hasn't been included in a stable release), so we can rename it relatively safely, albeit with proper announcements and a alias with a warning.

It's also gives credit where credit is due to the hard work of @maartenbreddels and his team.

Pull request description:
Rename JupyterViz to SolaraViz
Fixes #2175.

Patch:
diff --git a/docs/tutorials/visualization_tutorial.ipynb b/docs/tutorials/visualization_tutorial.ipynb
index 493324ea..7496227c 100644
--- a/docs/tutorials/visualization_tutorial.ipynb
+++ b/docs/tutorials/visualization_tutorial.ipynb
@@ -119,9 +119,9 @@
    },
    "outputs": [],
    "source": [
-    "from mesa.visualization import JupyterViz\n",
+    "from mesa.visualization import SolaraViz\n",
     "\n",
-    "page = JupyterViz(\n",
+    "page = SolaraViz(\n",
     "    BoltzmannWealthModel,\n",
     "    model_params,\n",
     "    measures=[\"Gini\"],\n",
@@ -164,7 +164,7 @@
    "metadata": {},
    "outputs": [],
    "source": [
-    "page = JupyterViz(\n",
+    "page = SolaraViz(\n",
     "    BoltzmannWealthModel,\n",
     "    model_params,\n",
     "    measures=[\"Gini\"],\n",
@@ -223,7 +223,7 @@
    "metadata": {},
    "outputs": [],
    "source": [
-    "page = JupyterViz(\n",
+    "page = SolaraViz(\n",
     "    BoltzmannWealthModel,\n",
     "    model_params,\n",
     "    measures=[\"Gini\", make_histogram],\n",
diff --git a/mesa/cookiecutter-mesa/{{cookiecutter.snake}}/app.pytemplate b/mesa/cookiecutter-mesa/{{cookiecutter.snake}}/app.pytemplate
index eac88245..04911cc0 100644
--- a/mesa/cookiecutter-mesa/{{cookiecutter.snake}}/app.pytemplate
+++ b/mesa/cookiecutter-mesa/{{cookiecutter.snake}}/app.pytemplate
@@ -1,7 +1,7 @@
 """
 Configure visualization elements and instantiate a server
 """
-from mesa.visualization import JupyterViz
+from mesa.visualization import SolaraViz
 
 from {{ cookiecutter.snake }}.model import {{ cookiecutter.model }}, {{ cookiecutter.agent }}  # noqa
 
@@ -18,7 +18,7 @@ def circle_portrayal_example(agent):
 
 model_params = {"num_agents": 10, "width": 10, "height": 10}
 
-page = JupyterViz(
+page = SolaraViz(
     {{cookiecutter.model}},
     model_params,
     measures=["num_agents"],
diff --git a/mesa/visualization/__init__.py b/mesa/visualization/__init__.py
index f6611e0a..13981bf7 100644
--- a/mesa/visualization/__init__.py
+++ b/mesa/visualization/__init__.py
@@ -1,3 +1,3 @@
-from .jupyter_viz import JupyterViz, Slider, make_text
+from .jupyter_viz import JupyterViz, Slider, SolaraViz, make_text
 
-__all__ = ["JupyterViz", "make_text", "Slider"]
+__all__ = ["JupyterViz", "make_text", "Slider", "SolaraViz"]
diff --git a/mesa/visualization/jupyter_viz.py b/mesa/visualization/jupyter_viz.py
index ddf1e505..4f159884 100644
--- a/mesa/visualization/jupyter_viz.py
+++ b/mesa/visualization/jupyter_viz.py
@@ -5,7 +5,7 @@ This module provides components to create browser- and Jupyter notebook-based vi
 Mesa models, allowing users to watch models run step-by-step and interact with model parameters.
 
 Key features:
-    - JupyterViz: Main component for creating visualizations, supporting grid displays and plots
+    - SolaraViz: Main component for creating visualizations, supporting grid displays and plots
     - ModelController: Handles model execution controls (step, play, pause, reset)
     - UserInputs: Generates UI elements for adjusting model parameters
     - Card: Renders individual visualization elements (space, measures)
@@ -17,7 +17,7 @@ custom visualization components.
 Usage:
     1. Define an agent_portrayal function to specify how agents should be displayed
     2. Set up model_params to define adjustable parameters
-    3. Create a JupyterViz instance with your model, parameters, and desired measures
+    3. Create a SolaraViz instance with your model, parameters, and desired measures
     4. Display the visualization in a Jupyter notebook or run as a Solara app
 
 See the Visualization Tutorial and example models for more details.
@@ -85,7 +85,7 @@ def Card(
 
 
 @solara.component
-def JupyterViz(
+def SolaraViz(
     model_class,
     model_params,
     measures=None,
@@ -202,6 +202,9 @@ def JupyterViz(
     )
 
 
+JupyterViz = SolaraViz
+
+
 @solara.component
 def ModelController(model, play_interval, current_step, reset_counter):
     """


Test patch:
diff --git a/tests/test_jupyter_viz.py b/tests/test_jupyter_viz.py
index 76ee666e..92dc1b29 100644
--- a/tests/test_jupyter_viz.py
+++ b/tests/test_jupyter_viz.py
@@ -5,7 +5,7 @@ import ipyvuetify as vw
 import solara
 
 import mesa
-from mesa.visualization.jupyter_viz import JupyterViz, Slider, UserInputs
+from mesa.visualization.jupyter_viz import Slider, SolaraViz, UserInputs
 
 
 class TestMakeUserInput(unittest.TestCase):
@@ -101,7 +101,7 @@ def test_call_space_drawer(mocker):
     # initialize with space drawer unspecified (use default)
     # component must be rendered for code to run
     solara.render(
-        JupyterViz(
+        SolaraViz(
             model_class=mesa.Model,
             model_params={},
             agent_portrayal=agent_portrayal,
@@ -116,7 +116,7 @@ def test_call_space_drawer(mocker):
     for falsy_value in [None, False, 0]:
         mock_space_matplotlib.reset_mock()
         solara.render(
-            JupyterViz(
+            SolaraViz(
                 model_class=mesa.Model,
                 model_params={},
                 agent_portrayal=agent_portrayal,
@@ -129,7 +129,7 @@ def test_call_space_drawer(mocker):
     # specify a custom space method
     altspace_drawer = Mock()
     solara.render(
-        JupyterViz(
+        SolaraViz(
             model_class=mesa.Model,
             model_params={},
             agent_portrayal=agent_portrayal,