Skip to content

Commit 084dee3

Browse files
authored
Fix docs, add performance report (#885)
* ignore image map if file missing * performance report
1 parent c6aa6d7 commit 084dee3

File tree

4 files changed

+312
-10
lines changed

4 files changed

+312
-10
lines changed

docs/add_image_map.py

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
from __future__ import annotations
2+
13
# rst doesn't support image maps, so we'll add one after the html has been built
4+
import os.path
25

36
fileName = "_build/html/examples.html"
47
line = 'src="_images/abmexample.jpg" />'
@@ -37,14 +40,15 @@
3740

3841
print("add image map to " + fileName)
3942

40-
with open(fileName, encoding="utf-8") as file:
41-
lines = file.readlines()
43+
if os.path.exists(fileName):
44+
with open(fileName, encoding="utf-8") as file:
45+
lines = file.readlines()
4246

43-
with open(fileName, "w") as file:
44-
for aLine in lines:
45-
if line in aLine:
46-
print("updated " + fileName)
47-
file.writelines("%s" % aLine.replace(line, lineWithMap))
48-
file.writelines("%s" % imageMap)
49-
else:
50-
file.writelines("%s" % aLine)
47+
with open(fileName, "w") as file:
48+
for aLine in lines:
49+
if line in aLine:
50+
print("updated " + fileName)
51+
file.writelines("%s" % aLine.replace(line, lineWithMap))
52+
file.writelines("%s" % imageMap)
53+
else:
54+
file.writelines("%s" % aLine)

docs/users-guide/example_models.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ ActivitySim.
3232
capabilities of ActivitySim and to provide a starting point for users to build their own
3333
models. However, they are not intended to be used as-is for policy analysis or forecasting.
3434
35+
A discussion of the runtime performance of the example models is available in the
36+
:ref:`example performance benchmarking <example-performance>` section.
3537

3638
This page describes the structure of the MTC example model in more detail.
3739

0 commit comments

Comments
 (0)