internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: projectmesa/mesa

Issue:
ContinuousSpace comments are behind changes to the class
MultiGrid was used internally to store agent objects when ContinuousSpace was created, but @JamesArruda updated ContinuousSpace to use a numpy array instead of MultiGrid (in PR #439). Also, relic objects `grid_width` & `grid_height` were originally used to construct the MultiGrid. They're no longer used.  The comments were properly removed in 10b262a9eaeeb5145a41814bca9faab18c6d218b but accidentally snuck back in with merge commit eb443d022b1595179a971bc6453a320f89ae35b1.

I plan to submit a pull request shortly to fix the stale comments in the ContinuousSpace class.


Discussion:

Resolving patch:
diff --git a/mesa/space.py b/mesa/space.py
--- a/mesa/space.py
+++ b/mesa/space.py
@@ -600,7 +600,7 @@ class ContinuousSpace:
     """ Continuous space where each agent can have an arbitrary position.
 
     Assumes that all agents are point objects, and have a pos property storing
-    their position as an (x, y) tuple. This class uses a MultiGrid internally
+    their position as an (x, y) tuple. This class uses a numpy array internally
     to store agent objects, to speed up neighborhood lookups.
 
     """
@@ -615,11 +615,6 @@ def __init__(self, x_max, y_max, torus, x_min=0, y_min=0):
             x_min, y_min: (default 0) If provided, set the minimum x and y
                           coordinates for the space. Below them, values loop to
                           the other edge (if torus=True) or raise an exception.
-            grid_width, _height: (default 100) Determine the size of the
-                                 internal storage grid. More cells will slow
-                                 down movement, but speed up neighbor lookup.
-                                 Probably only fiddle with this if one or the
-                                 other is impacting your model's performance.
 
         """
         self.x_min = x_min


Test patch:
Repository: projectmesa/mesa

Issue:
Make opening the browser when launching the server optional
**What's the problem this feature will solve?**
When we call `server.launch()` on a `ModularServer` instance the browser always opens another tab. This is not always desired behavior. 

**Describe the solution you'd like**
We should be able to make this optional. To maintain backwards compatibility we can keep the current behavior as default but over ride it with something like `server.launch(open_browser=False)`

**Additional context**
I will make a PR with this simple change.


Discussion:

Resolving patch:
diff --git a/mesa/visualization/ModularVisualization.py b/mesa/visualization/ModularVisualization.py
--- a/mesa/visualization/ModularVisualization.py
+++ b/mesa/visualization/ModularVisualization.py
@@ -310,13 +310,14 @@ def render_model(self):
             visualization_state.append(element_state)
         return visualization_state
 
-    def launch(self, port=None):
+    def launch(self, port=None, open_browser=True):
         """ Run the app. """
         if port is not None:
             self.port = port
         url = 'http://127.0.0.1:{PORT}'.format(PORT=self.port)
         print('Interface starting at {url}'.format(url=url))
         self.listen(self.port)
-        webbrowser.open(url)
+        if open_browser:
+            webbrowser.open(url)
         tornado.autoreload.start()
         tornado.ioloop.IOLoop.current().start()


Test patch:
Repository: projectmesa/mesa

Issue:
The order of the cell content of MultiGrid is non-deterministic
This is because the cell content is a Python `set`, and `set` doesn't preserve insertion order.
It is possible to use `dict` for Python >=3.6 instead, but this requires a lot of redefinition of the methods `__iter__` and `__getitem__`.


Discussion:
I see two possible solutions:

1) Switching to a list: This would either require checking if an agent already exists or would make it possible for the agent to exist several times at a given position. The second one could allow for more modeling flexibility. However, I would guess most of the times an agent is only allowed to exist once and it would rather produce confusing bugs.
2) Leave the sets internally, but return ordered lists from `__getitem__` or whenever a GridContent is queried

Resolving patch:
diff --git a/mesa/space.py b/mesa/space.py
--- a/mesa/space.py
+++ b/mesa/space.py
@@ -424,12 +424,13 @@ class MultiGrid(Grid):
     @staticmethod
     def default_val():
         """ Default value for new cell elements. """
-        return set()
+        return []
 
     def _place_agent(self, pos, agent):
         """ Place the agent at the correct location. """
         x, y = pos
-        self.grid[x][y].add(agent)
+        if agent not in self.grid[x][y]:
+            self.grid[x][y].append(agent)
         self.empties.discard(pos)
 
     def _remove_agent(self, pos, agent):


Test patch:
Repository: projectmesa/mesa

Issue:
Push new Mesa release
Wee are overdue for an official release. Before I push one, does anyone have anything that really want to try to get in or should I just tag and release? 

Discuss. 


Discussion:
I am fine with the current state and in full support for a new release!

Resolving patch:
diff --git a/mesa/__init__.py b/mesa/__init__.py
--- a/mesa/__init__.py
+++ b/mesa/__init__.py
@@ -14,6 +14,6 @@
 __all__ = ["Model", "Agent"]
 
 __title__ = "mesa"
-__version__ = "0.8.6"
+__version__ = "0.8.7"
 __license__ = "Apache 2.0"
 __copyright__ = "Copyright %s Project Mesa Team" % datetime.date.today().year


Test patch:
Repository: projectmesa/mesa

Issue:
Cookiecutter doesn't work on 0.8.7 release
**Describe the bug**
`mesa startproject` fails after `pipenv install mesa`
```
A valid repository for "/home/neil/.local/share/virtualenvs/baseline-economy-6fg_iky1/lib/python3.8/site-packages/mesa/cookiecutter-mesa" could not be found in the following locations:
...
```

**Expected behavior**
Generate the project layout

**To Reproduce**
- pipenv install mesa
- mesa startproject

**Additional context**
The cookiecutter directory from the repo is missing from the installation.
Additionally there is no help message for `startproject` when you run `mesa --help`




Discussion:

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -8,7 +8,7 @@
 requires = ["click", "cookiecutter", "networkx", "numpy", "pandas", "tornado", "tqdm"]
 
 extras_require = {
-    "dev": ["coverage", "flake8", "pytest >= 3.6", "pytest-cov", "sphinx"],
+    "dev": ["coverage", "flake8", "pytest >= 4.6", "pytest-cov", "sphinx"],
     "docs": ["sphinx"],
 }
 


Test patch:
Repository: projectmesa/mesa

Issue:
Color patches takes a long time to load
When you hit "reset" to load the color patches example, it takes a long time to load.
Not sure why. As a result, I thought it was broken.

To recreate... 
```
cd examples/color_patches
python run.py
```

Wait for patches to load when browser window pops up. 
OR hit reset and wait for color patches to load.

This is what it should look something like...
<img width="407" alt="screen shot 2018-04-01 at 10 03 33 pm" src="https://user-images.githubusercontent.com/166734/38180194-95c2acb0-35f8-11e8-8c1b-8bd7a6d25098.png">
Color patches takes a long time to load
When you hit "reset" to load the color patches example, it takes a long time to load.
Not sure why. As a result, I thought it was broken.

To recreate... 
```
cd examples/color_patches
python run.py
```

Wait for patches to load when browser window pops up. 
OR hit reset and wait for color patches to load.

This is what it should look something like...
<img width="407" alt="screen shot 2018-04-01 at 10 03 33 pm" src="https://user-images.githubusercontent.com/166734/38180194-95c2acb0-35f8-11e8-8c1b-8bd7a6d25098.png">


Discussion:
I was dealing with the same problem earlier this year and found out that the canvas values were being used instead of the grid values when starting up the server:

https://github.com/projectmesa/mesa/blob/d376920146ca0ec422286cb8434d86b74e64b2fa/examples/color_patches/color_patches/server.py#L65

{"width": canvas_width, "height": canvas_height} should be changed to {"width": grid_rows, "height": grid_cols}

I was dealing with the same problem earlier this year and found out that the canvas values were being used instead of the grid values when starting up the server:

https://github.com/projectmesa/mesa/blob/d376920146ca0ec422286cb8434d86b74e64b2fa/examples/color_patches/color_patches/server.py#L65

{"width": canvas_width, "height": canvas_height} should be changed to {"width": grid_rows, "height": grid_cols}


Resolving patch:
diff --git a/examples/color_patches/color_patches/server.py b/examples/color_patches/color_patches/server.py
--- a/examples/color_patches/color_patches/server.py
+++ b/examples/color_patches/color_patches/server.py
@@ -62,7 +62,7 @@ def color_patch_draw(cell):
     ColorPatches,
     [canvas_element],
     "Color Patches",
-    {"width": canvas_width, "height": canvas_height},
+    {"width": grid_rows, "height": grid_cols},
 )
 
 # webbrowser.open('http://127.0.0.1:8521')  # TODO: make this configurable


Test patch:
Repository: projectmesa/mesa

Issue:
No public version of NetworkGrid._remove_agent, though code exists


Currently it is not possible to remove an Agent from a NetworkGrid using a **public** function. Currently, you can do the following:

```python
...
model.grid = NetworkGrid(G)
...
a = Agent(...)
model.grid._remove_agent(a, a.pos)
...
```
But this function is a private function, therefore it isn't shown in documentation or in your editor. I'd like to be able to remove agents like with the other space modules.


**Describe the solution you'd like**
I'd like a similar solution as used for the other space modules:

Solution in space.Grid:
```python
def remove_agent(self, agent: Agent) -> None:  # solution in space.Grid
        """ Remove the agent from the grid and set its pos variable to None. """
        pos = agent.pos
        self._remove_agent(pos, agent)
        agent.pos = None

```
Solution for NetworkGrid:
```python
def remove_agent(self, agent: Agent) -> None:  # New solution
        """ Remove the agent from the network and set its pos variable to None. """
        pos = agent.pos
        self._remove_agent(agent, pos)
        agent.pos = None

```

**Additional context**
The _remove_agent function in NetworkGrid
```python
def _remove_agent(self, agent: Agent, node_id: int) -> None:
        """ Remove an agent from a node. """

        self.G.nodes[node_id]["agent"].remove(agent)
```


Discussion:

Resolving patch:
diff --git a/mesa/space.py b/mesa/space.py
--- a/mesa/space.py
+++ b/mesa/space.py
@@ -871,6 +871,12 @@ def _remove_agent(self, agent: Agent, node_id: int) -> None:
 
         self.G.nodes[node_id]["agent"].remove(agent)
 
+    def remove_agent(self, agent: Agent) -> None:
+        """ Remove the agent from the network and set its pos variable to None. """
+        pos = agent.pos
+        self._remove_agent(agent, pos)
+        agent.pos = None
+
     def is_cell_empty(self, node_id: int) -> bool:
         """ Returns a bool of the contents of a cell. """
         return not self.G.nodes[node_id]["agent"]


Test patch:
diff --git a/tests/test_space.py b/tests/test_space.py
--- a/tests/test_space.py
+++ b/tests/test_space.py
@@ -357,6 +357,15 @@ def test_move_agent(self):
         assert _agent not in self.space.G.nodes[initial_pos]["agent"]
         assert _agent in self.space.G.nodes[final_pos]["agent"]
 
+    def test_remove_agent(self):
+        for i, pos in enumerate(TEST_AGENTS_NETWORK_SINGLE):
+            a = self.agents[i]
+            assert a.pos == pos
+            assert a in self.space.G.nodes[pos]["agent"]
+            self.space.remove_agent(a)
+            assert a.pos is None
+            assert a not in self.space.G.nodes[pos]["agent"]
+
     def test_is_cell_empty(self):
         assert not self.space.is_cell_empty(0)
         assert self.space.is_cell_empty(TestSingleNetworkGrid.GRAPH_SIZE - 1)
Repository: projectmesa/mesa

Issue:
Needs black clean up 
See build fail on #1072


Discussion:
In #1074 I split of the lint jobs, that may help make it more apparent when linting fails and when the functional code/tests fails.

Resolving patch:
diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -95,10 +95,10 @@
 add_module_names = False
 
 # Sort members by the order in the source files instead of alphabetically
-autodoc_member_order = 'bysource'
+autodoc_member_order = "bysource"
 
 # Show both the class-level docstring and the constructor docstring
-autoclass_content = 'both'
+autoclass_content = "both"
 
 # If true, sectionauthor and moduleauthor directives will be shown in the
 # output. They are ignored by default.
diff --git a/mesa/datacollection.py b/mesa/datacollection.py
--- a/mesa/datacollection.py
+++ b/mesa/datacollection.py
@@ -240,7 +240,8 @@ def get_agent_vars_dataframe(self):
         rep_names = [rep_name for rep_name in self.agent_reporters]
 
         df = pd.DataFrame.from_records(
-            data=all_records, columns=["Step", "AgentID"] + rep_names,
+            data=all_records,
+            columns=["Step", "AgentID"] + rep_names,
         )
         df = df.set_index(["Step", "AgentID"])
         return df
diff --git a/mesa/space.py b/mesa/space.py
--- a/mesa/space.py
+++ b/mesa/space.py
@@ -116,7 +116,9 @@ def __getitem__(self, index: Sequence[Coordinate]) -> List[GridContent]:
     def __getitem__(
         self,
         index: Union[
-            int, Sequence[Coordinate], Tuple[Union[int, slice], Union[int, slice]],
+            int,
+            Sequence[Coordinate],
+            Tuple[Union[int, slice], Union[int, slice]],
         ],
     ) -> Union[GridContent, List[GridContent]]:
         """Access contents from the grid."""


Test patch:
diff --git a/examples/boid_flockers/Flocker Test.ipynb b/examples/boid_flockers/Flocker Test.ipynb
--- a/examples/boid_flockers/Flocker Test.ipynb	
+++ b/examples/boid_flockers/Flocker Test.ipynb	
@@ -11,6 +11,7 @@
     "from boid_flockers.model import BoidFlockers\n",
     "import numpy as np\n",
     "import matplotlib.pyplot as plt\n",
+    "\n",
     "%matplotlib inline"
    ]
   },
@@ -29,7 +30,7 @@
     "        x, y = boid.pos\n",
     "        x_vals.append(x)\n",
     "        y_vals.append(y)\n",
-    "    fig = plt.figure(figsize=(10,10))\n",
+    "    fig = plt.figure(figsize=(10, 10))\n",
     "    ax = fig.add_subplot(111)\n",
     "    ax.scatter(x_vals, y_vals)"
    ]
Repository: projectmesa/mesa

Issue:
lint-black breaking workflow
lint-black is breaking the workflow. My impression is this also a contributor guide issue, but could be wrong. 


Discussion:
I didn't encounter the Black issue locally, until I found out that my local Black version was outdated. And so, it is a real problem that can be fixed with the latest Black.
@rht Ahhh thanks I bet that is it!

Resolving patch:
diff --git a/examples/sugarscape_cg/sugarscape_cg/agents.py b/examples/sugarscape_cg/sugarscape_cg/agents.py
--- a/examples/sugarscape_cg/sugarscape_cg/agents.py
+++ b/examples/sugarscape_cg/sugarscape_cg/agents.py
@@ -14,7 +14,7 @@ def get_distance(pos_1, pos_2):
     x2, y2 = pos_2
     dx = x1 - x2
     dy = y1 - y2
-    return math.sqrt(dx ** 2 + dy ** 2)
+    return math.sqrt(dx**2 + dy**2)
 
 
 class SsAgent(Agent):
diff --git a/mesa/space.py b/mesa/space.py
--- a/mesa/space.py
+++ b/mesa/space.py
@@ -837,7 +837,7 @@ def get_neighbors(
             deltas = np.minimum(deltas, self.size - deltas)
         dists = deltas[:, 0] ** 2 + deltas[:, 1] ** 2
 
-        (idxs,) = np.where(dists <= radius ** 2)
+        (idxs,) = np.where(dists <= radius**2)
         neighbors = [
             self._index_to_agent[x] for x in idxs if include_center or dists[x] > 0
         ]


Test patch:
diff --git a/tests/test_space.py b/tests/test_space.py
--- a/tests/test_space.py
+++ b/tests/test_space.py
@@ -75,7 +75,7 @@ def test_distance_calculations(self):
 
         pos_6 = (-30, -29)
         pos_7 = (21, -5)
-        assert self.space.get_distance(pos_6, pos_7) == np.sqrt(49 ** 2 + 24 ** 2)
+        assert self.space.get_distance(pos_6, pos_7) == np.sqrt(49**2 + 24**2)
 
     def test_heading(self):
         pos_1 = (-30, -30)
Repository: projectmesa/mesa

Issue:
Bug in get_neighbors() in Mesa version 0.8.9
**Describe the bug**
<!-- A clear and concise description the bug -->

In version 0.8.9, get_neighbors() calls at one point the get_item method in space.py, where it leads to a type conversion bug, as the method checks for integer but gets a numpy.int64. 
Version 0.8.8.1 was still working. 


I fixed the bug by adding this piece of code to the get_item method in line 148:
        if isinstance(index,np.generic):
            index = np.asscalar(index)


Discussion:

Resolving patch:
diff --git a/mesa/space.py b/mesa/space.py
--- a/mesa/space.py
+++ b/mesa/space.py
@@ -31,7 +31,10 @@
     cast,
     overload,
 )
+
+# For Mypy
 from .agent import Agent
+from numbers import Real
 
 Coordinate = Tuple[int, int]
 GridContent = Union[Optional[Agent], Set[Agent]]
@@ -59,6 +62,11 @@ def wrapper(*args: Any):
     return wrapper
 
 
+def is_integer(x: Real) -> bool:
+    # Check if x is either a CPython integer or Numpy integer.
+    return isinstance(x, (int, np.integer))
+
+
 class Grid:
     """Base class for a square grid.
 
@@ -142,18 +150,18 @@ def __getitem__(
 
         x, y = index
 
-        if isinstance(x, int) and isinstance(y, int):
+        if is_integer(x) and is_integer(y):
             # grid[x, y]
             index = cast(Coordinate, index)
             x, y = self.torus_adj(index)
             return self.grid[x][y]
 
-        if isinstance(x, int):
+        if is_integer(x):
             # grid[x, :]
             x, _ = self.torus_adj((x, 0))
             x = slice(x, x + 1)
 
-        if isinstance(y, int):
+        if is_integer(y):
             # grid[:, y]
             _, y = self.torus_adj((0, y))
             y = slice(y, y + 1)


Test patch:
Repository: projectmesa/mesa

Issue:
CI: test flake: batch runner sometimes takes 6 hours then gets killed by GitHub Actions
See e.g. https://github.com/projectmesa/mesa/runs/5259005495?check_suite_focus=true.

We might want to add timeout to batch runner tests, with https://pypi.org/project/pytest-timeout/.


Discussion:
More findings at https://github.com/projectmesa/mesa/pull/1194#issuecomment-1073221814.
I tried 2 methods:
- using spawn #1199, failed because the simulation became much slower
- using explicit import of multiprocessing #1198, failed after the 3rd attempt
I have narrowed down the cause: test_batchrunnerMP.py (see #1255).

Resolving patch:
diff --git a/mesa/batchrunner.py b/mesa/batchrunner.py
--- a/mesa/batchrunner.py
+++ b/mesa/batchrunner.py
@@ -610,7 +610,7 @@ def __init__(
             )
 
 
-class BatchRunnerMP(BatchRunner):
+class BatchRunnerMP(BatchRunner):  # pragma: no cover
     """DEPRECATION WARNING: BatchRunner class has been replaced by batch_run
     Child class of BatchRunner, extended with multiprocessing support."""
 


Test patch:
diff --git a/tests/test_batchrunnerMP.py b/tests/test_batchrunnerMP.py
--- a/tests/test_batchrunnerMP.py
+++ b/tests/test_batchrunnerMP.py
@@ -87,6 +87,7 @@ class TestBatchRunnerMP(unittest.TestCase):
     """
 
     def setUp(self):
+        self.skipTest("Disabled due to consistent hangs")
         self.mock_model = MockModel
         self.model_reporters = {
             "reported_variable_value": lambda m: m.variable_model_param,
Repository: projectmesa/mesa

Issue:
Remove Sigma.js backend for network visualization
Reading #388, I conclude that Sigma.js is less featureful than D3.js. We should just stick to polishing the D3.js version.


Discussion:

Resolving patch:
diff --git a/examples/boltzmann_wealth_model_network/boltzmann_wealth_model_network/server.py b/examples/boltzmann_wealth_model_network/boltzmann_wealth_model_network/server.py
--- a/examples/boltzmann_wealth_model_network/boltzmann_wealth_model_network/server.py
+++ b/examples/boltzmann_wealth_model_network/boltzmann_wealth_model_network/server.py
@@ -29,7 +29,7 @@ def network_portrayal(G):
     return portrayal
 
 
-grid = NetworkModule(network_portrayal, 500, 500, library="sigma")
+grid = NetworkModule(network_portrayal, 500, 500)
 chart = ChartModule(
     [{"Label": "Gini", "Color": "Black"}], data_collector_name="datacollector"
 )
diff --git a/examples/virus_on_network/virus_on_network/server.py b/examples/virus_on_network/virus_on_network/server.py
--- a/examples/virus_on_network/virus_on_network/server.py
+++ b/examples/virus_on_network/virus_on_network/server.py
@@ -52,7 +52,7 @@ def get_agents(source, target):
     return portrayal
 
 
-network = NetworkModule(network_portrayal, 500, 500, library="d3")
+network = NetworkModule(network_portrayal, 500, 500)
 chart = ChartModule(
     [
         {"Label": "Infected", "Color": "#FF0000"},
diff --git a/mesa/visualization/modules/NetworkVisualization.py b/mesa/visualization/modules/NetworkVisualization.py
--- a/mesa/visualization/modules/NetworkVisualization.py
+++ b/mesa/visualization/modules/NetworkVisualization.py
@@ -2,7 +2,7 @@
 Network Visualization Module
 ============
 
-Module for rendering the network, using [sigma.js](http://sigmajs.org/) or [d3.js](https://d3js.org/) frameworks.
+Module for rendering the network, using [d3.js](https://d3js.org/) framework.
 
 """
 from mesa.visualization.ModularVisualization import VisualizationElement, D3_JS_FILE
@@ -12,19 +12,12 @@ class NetworkModule(VisualizationElement):
     package_includes = []
 
     def __init__(
-        self, portrayal_method, canvas_height=500, canvas_width=500, library="sigma"
+        self,
+        portrayal_method,
+        canvas_height=500,
+        canvas_width=500,
     ):
-        library_types = ["sigma", "d3"]
-        if library not in library_types:
-            raise ValueError(
-                f"Invalid javascript library type. Expected one of: {library_types}"
-            )
-
-        NetworkModule.package_includes = (
-            ["NetworkModule_sigma.js", "sigma.min.js"]
-            if library == "sigma"
-            else ["NetworkModule_d3.js", D3_JS_FILE]
-        )
+        NetworkModule.package_includes = ["NetworkModule_d3.js", D3_JS_FILE]
 
         self.portrayal_method = portrayal_method
         self.canvas_height = canvas_height


Test patch:
Repository: projectmesa/mesa

Issue:
Migrate D3 from v4 to v7
The current D3 version that is [used in Mesa](https://github.com/projectmesa/mesa/blob/main/mesa/visualization/templates/js/d3.min.js), version [4.13.0](https://github.com/d3/d3/releases/tag/v4.13.0), is almost 4 years old. Three new major versions have been released since. Version 5.0 and 7.0 contain relatively few breaking changes, but 6.0 contains a bit more.

- [Changes in D3 5.0](https://github.com/d3/d3/blob/main/CHANGES.md#changes-in-d3-50)
- [D3 6.0 migration guide](https://observablehq.com/@d3/d3v6-migration-guide)
- [v7.0.0 breaking changes](https://github.com/d3/d3/releases/tag/v7.0.0)


Discussion:

Resolving patch:
diff --git a/mesa/visualization/ModularVisualization.py b/mesa/visualization/ModularVisualization.py
--- a/mesa/visualization/ModularVisualization.py
+++ b/mesa/visualization/ModularVisualization.py
@@ -116,7 +116,7 @@
 if platform.system() == "Windows" and platform.python_version_tuple() >= ("3", "7"):
     asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
 
-D3_JS_FILE = "external/d3-4.13.0.min.js"
+D3_JS_FILE = "external/d3-7.4.3.min.js"
 CHART_JS_FILE = "external/chart-3.6.1.min.js"
 
 
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -92,7 +92,7 @@ def ensure_JS_dep_single(url, out_name=None):
 )
 # Important: when updating the D3 version, make sure to update the constant
 # D3_JS_FILE in mesa/visualization/ModularVisualization.py.
-d3_version = "4.13.0"
+d3_version = "7.4.3"
 ensure_JS_dep_single(
     f"https://cdnjs.cloudflare.com/ajax/libs/d3/{d3_version}/d3.min.js",
     out_name=f"d3-{d3_version}.min.js",


Test patch: