Skip to content

Commit be938ea

Browse files
committed
docs: sample HTML for 7.5.1
1 parent 02c66d7 commit be938ea

18 files changed

+4362
-4307
lines changed

Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ relcommit1: #: Commit the first release changes (see howto.txt).
195195
git commit -am "docs: prep for $$(python setup.py --version)"
196196

197197
relcommit2: #: Commit the latest sample HTML report (see howto.txt).
198+
git add doc/sample_html
198199
git commit -am "docs: sample HTML for $$(python setup.py --version)"
199200

200201
kit: ## Make the source distribution.

doc/sample_html/class_index.html

+82-82
Large diffs are not rendered by default.

doc/sample_html/coverage_html.js renamed to doc/sample_html/coverage_html_cb_da166b87.js

+50-4
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,32 @@ function sortColumn(th) {
8181
.forEach(tr => tr.parentElement.appendChild(tr));
8282

8383
// Save the sort order for next time.
84-
localStorage.setItem(coverage.INDEX_SORT_STORAGE, JSON.stringify({column, direction}));
84+
if (th.id !== "region") {
85+
let th_id = "file"; // Sort by file if we don't have a column id
86+
let current_direction = direction;
87+
const stored_list = localStorage.getItem(coverage.INDEX_SORT_STORAGE);
88+
if (stored_list) {
89+
({th_id, direction} = JSON.parse(stored_list))
90+
}
91+
localStorage.setItem(coverage.INDEX_SORT_STORAGE, JSON.stringify({
92+
"th_id": th.id,
93+
"direction": current_direction
94+
}));
95+
if (th.id !== th_id || document.getElementById("region")) {
96+
// Sort column has changed, unset sorting by function or class.
97+
localStorage.setItem(coverage.SORTED_BY_REGION, JSON.stringify({
98+
"by_region": false,
99+
"region_direction": current_direction
100+
}));
101+
}
102+
}
103+
else {
104+
// Sort column has changed to by function or class, remember that.
105+
localStorage.setItem(coverage.SORTED_BY_REGION, JSON.stringify({
106+
"by_region": true,
107+
"region_direction": direction
108+
}));
109+
}
85110
}
86111

87112
// Find all the elements with data-shortcut attribute, and use them to assign a shortcut key.
@@ -223,18 +248,39 @@ coverage.wire_up_sorting = function () {
223248
);
224249

225250
// Look for a localStorage item containing previous sort settings:
226-
var column = 0, direction = "ascending";
251+
let th_id = "file", direction = "ascending";
227252
const stored_list = localStorage.getItem(coverage.INDEX_SORT_STORAGE);
228253
if (stored_list) {
229-
({column, direction} = JSON.parse(stored_list));
254+
({th_id, direction} = JSON.parse(stored_list));
255+
}
256+
let by_region = false, region_direction = "ascending";
257+
const sorted_by_region = localStorage.getItem(coverage.SORTED_BY_REGION);
258+
if (sorted_by_region) {
259+
({
260+
by_region,
261+
region_direction
262+
} = JSON.parse(sorted_by_region));
230263
}
231264

232-
const th = document.querySelector("[data-sortable]").tHead.rows[0].cells[column]; // nosemgrep: eslint.detect-object-injection
265+
const region_id = "region";
266+
if (by_region && document.getElementById(region_id)) {
267+
direction = region_direction;
268+
}
269+
// If we are in a page that has a column with id of "region", sort on
270+
// it if the last sort was by function or class.
271+
let th;
272+
if (document.getElementById(region_id)) {
273+
th = document.getElementById(by_region ? region_id : th_id);
274+
}
275+
else {
276+
th = document.getElementById(th_id);
277+
}
233278
th.setAttribute("aria-sort", direction === "ascending" ? "descending" : "ascending");
234279
th.click()
235280
};
236281

237282
coverage.INDEX_SORT_STORAGE = "COVERAGE_INDEX_SORT_2";
283+
coverage.SORTED_BY_REGION = "COVERAGE_SORT_REGION";
238284

239285
// Loaded on index.html
240286
coverage.index_ready = function () {

doc/sample_html/function_index.html

+454-454
Large diffs are not rendered by default.

doc/sample_html/index.html

+20-20
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
<head>
44
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
55
<title>Cog coverage</title>
6-
<link rel="icon" sizes="32x32" href="favicon_32.png">
7-
<link rel="stylesheet" href="style.css" type="text/css">
8-
<script src="coverage_html.js" defer></script>
6+
<link rel="icon" sizes="32x32" href="favicon_32_cb_58284776.png">
7+
<link rel="stylesheet" href="style_cb_8e611ae1.css" type="text/css">
8+
<script src="coverage_html_cb_da166b87.js" defer></script>
99
</head>
1010
<body class="indexfile">
1111
<header>
1212
<div class="content">
1313
<h1>Cog coverage:
14-
<span class="pc_cov">38.64%</span>
14+
<span class="pc_cov">38.68%</span>
1515
</h1>
1616
<aside id="help_panel_wrapper">
1717
<input id="help_panel_state" type="checkbox">
1818
<label for="help_panel_state">
19-
<img id="keyboard_icon" src="keybd_closed.png" alt="Show/hide keyboard shortcuts">
19+
<img id="keyboard_icon" src="keybd_closed_cb_ce680311.png" alt="Show/hide keyboard shortcuts">
2020
</label>
2121
<div id="help_panel">
2222
<p class="legend">Shortcuts on this page</p>
@@ -55,22 +55,22 @@ <h2>
5555
<a class="button" href="class_index.html">Classes</a>
5656
</h2>
5757
<p class="text">
58-
<a class="nav" href="https://coverage.readthedocs.io/en/7.5.0">coverage.py v7.5.0</a>,
59-
created at 2024-04-23 13:00 -0400
58+
<a class="nav" href="https://coverage.readthedocs.io/en/7.5.1">coverage.py v7.5.1</a>,
59+
created at 2024-05-04 10:30 -0400
6060
</p>
6161
</div>
6262
</header>
6363
<main id="index">
6464
<table class="index" data-sortable>
6565
<thead>
6666
<tr class="tablehead" title="Click to sort">
67-
<th class="name left" aria-sort="none" data-shortcut="f">File<span class="arrows"></span></th>
68-
<th aria-sort="none" data-default-sort-order="descending" data-shortcut="s">statements<span class="arrows"></span></th>
69-
<th aria-sort="none" data-default-sort-order="descending" data-shortcut="m">missing<span class="arrows"></span></th>
70-
<th aria-sort="none" data-default-sort-order="descending" data-shortcut="x">excluded<span class="arrows"></span></th>
71-
<th aria-sort="none" data-default-sort-order="descending" data-shortcut="b">branches<span class="arrows"></span></th>
72-
<th aria-sort="none" data-default-sort-order="descending" data-shortcut="p">partial<span class="arrows"></span></th>
73-
<th class="right" aria-sort="none" data-shortcut="c">coverage<span class="arrows"></span></th>
67+
<th id="file" class="name left" aria-sort="none" data-shortcut="f">File<span class="arrows"></span></th>
68+
<th id="statements" aria-sort="none" data-default-sort-order="descending" data-shortcut="s">statements<span class="arrows"></span></th>
69+
<th id="missing" aria-sort="none" data-default-sort-order="descending" data-shortcut="m">missing<span class="arrows"></span></th>
70+
<th id="excluded" aria-sort="none" data-default-sort-order="descending" data-shortcut="x">excluded<span class="arrows"></span></th>
71+
<th id="branches" aria-sort="none" data-default-sort-order="descending" data-shortcut="b">branches<span class="arrows"></span></th>
72+
<th id="partial" aria-sort="none" data-default-sort-order="descending" data-shortcut="p">partial<span class="arrows"></span></th>
73+
<th id="coverage" class="right" aria-sort="none" data-shortcut="c">coverage<span class="arrows"></span></th>
7474
</tr>
7575
</thead>
7676
<tbody>
@@ -148,23 +148,23 @@ <h2>
148148
</tr>
149149
<tr class="region">
150150
<td class="name left"><a href="z_7b071bdc2a35fa80_whiteutils_py.html">cogapp/whiteutils.py</a></td>
151-
<td>43</td>
151+
<td>44</td>
152152
<td>5</td>
153153
<td>0</td>
154154
<td>34</td>
155155
<td>4</td>
156-
<td class="right" data-ratio="68 77">88.31%</td>
156+
<td class="right" data-ratio="69 78">88.46%</td>
157157
</tr>
158158
</tbody>
159159
<tfoot>
160160
<tr class="total">
161161
<td class="name left">Total</td>
162-
<td>1579</td>
162+
<td>1580</td>
163163
<td>961</td>
164164
<td>3</td>
165165
<td>292</td>
166166
<td>35</td>
167-
<td class="right" data-ratio="723 1871">38.64%</td>
167+
<td class="right" data-ratio="724 1872">38.68%</td>
168168
</tr>
169169
</tfoot>
170170
</table>
@@ -175,8 +175,8 @@ <h2>
175175
<footer>
176176
<div class="content">
177177
<p>
178-
<a class="nav" href="https://coverage.readthedocs.io/en/7.5.0">coverage.py v7.5.0</a>,
179-
created at 2024-04-23 13:00 -0400
178+
<a class="nav" href="https://coverage.readthedocs.io/en/7.5.1">coverage.py v7.5.1</a>,
179+
created at 2024-05-04 10:30 -0400
180180
</p>
181181
</div>
182182
<aside class="hidden">

doc/sample_html/status.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"note":"This file is an internal implementation detail to speed up HTML report generation. Its format can change at any time. You might be looking for the JSON report: https://coverage.rtfd.io/cmd.html#cmd-json","format":5,"version":"7.5.0","globals":"6209e941d022650f2b874068b895003a","files":{"z_7b071bdc2a35fa80___init___py":{"hash":"669207c1fb29be3e8be6ce0639506cab","index":{"url":"z_7b071bdc2a35fa80___init___py.html","file":"cogapp/__init__.py","description":"","nums":{"precision":2,"n_files":1,"n_statements":1,"n_excluded":0,"n_missing":0,"n_branches":0,"n_partial_branches":0,"n_missing_branches":0}}},"z_7b071bdc2a35fa80___main___py":{"hash":"6d9d0d551879aa3e73791f40c5739845","index":{"url":"z_7b071bdc2a35fa80___main___py.html","file":"cogapp/__main__.py","description":"","nums":{"precision":2,"n_files":1,"n_statements":3,"n_excluded":0,"n_missing":3,"n_branches":0,"n_partial_branches":0,"n_missing_branches":0}}},"z_7b071bdc2a35fa80_cogapp_py":{"hash":"3b620625b0506d140beda5c04a03a961","index":{"url":"z_7b071bdc2a35fa80_cogapp_py.html","file":"cogapp/cogapp.py","description":"","nums":{"precision":2,"n_files":1,"n_statements":483,"n_excluded":1,"n_missing":228,"n_branches":208,"n_partial_branches":28,"n_missing_branches":140}}},"z_7b071bdc2a35fa80_makefiles_py":{"hash":"e73ea90ac9a2e7af9d1fdb188ea22dfe","index":{"url":"z_7b071bdc2a35fa80_makefiles_py.html","file":"cogapp/makefiles.py","description":"","nums":{"precision":2,"n_files":1,"n_statements":22,"n_excluded":0,"n_missing":18,"n_branches":14,"n_partial_branches":0,"n_missing_branches":14}}},"z_7b071bdc2a35fa80_test_cogapp_py":{"hash":"f7e93bafb25b733e134d8c75e2d3cc24","index":{"url":"z_7b071bdc2a35fa80_test_cogapp_py.html","file":"cogapp/test_cogapp.py","description":"","nums":{"precision":2,"n_files":1,"n_statements":854,"n_excluded":2,"n_missing":598,"n_branches":24,"n_partial_branches":1,"n_missing_branches":21}}},"z_7b071bdc2a35fa80_test_makefiles_py":{"hash":"b2e0cdd09c01a8b0e4bdae02e1cfa856","index":{"url":"z_7b071bdc2a35fa80_test_makefiles_py.html","file":"cogapp/test_makefiles.py","description":"","nums":{"precision":2,"n_files":1,"n_statements":68,"n_excluded":0,"n_missing":51,"n_branches":6,"n_partial_branches":0,"n_missing_branches":6}}},"z_7b071bdc2a35fa80_test_whiteutils_py":{"hash":"4511a89ca54b865d6397d6b7d315c35c","index":{"url":"z_7b071bdc2a35fa80_test_whiteutils_py.html","file":"cogapp/test_whiteutils.py","description":"","nums":{"precision":2,"n_files":1,"n_statements":68,"n_excluded":0,"n_missing":50,"n_branches":0,"n_partial_branches":0,"n_missing_branches":0}}},"z_7b071bdc2a35fa80_utils_py":{"hash":"f8df213bfbf38327877cdb9699b0ec41","index":{"url":"z_7b071bdc2a35fa80_utils_py.html","file":"cogapp/utils.py","description":"","nums":{"precision":2,"n_files":1,"n_statements":37,"n_excluded":0,"n_missing":8,"n_branches":6,"n_partial_branches":2,"n_missing_branches":2}}},"z_7b071bdc2a35fa80_whiteutils_py":{"hash":"c68cfd051fc76896fdb23127cf2ca0ea","index":{"url":"z_7b071bdc2a35fa80_whiteutils_py.html","file":"cogapp/whiteutils.py","description":"","nums":{"precision":2,"n_files":1,"n_statements":43,"n_excluded":0,"n_missing":5,"n_branches":34,"n_partial_branches":4,"n_missing_branches":4}}}}}
1+
{"note":"This file is an internal implementation detail to speed up HTML report generation. Its format can change at any time. You might be looking for the JSON report: https://coverage.rtfd.io/cmd.html#cmd-json","format":5,"version":"7.5.1","globals":"b6d62a4c6ebf32368f078323bb24aaf8","files":{"z_7b071bdc2a35fa80___init___py":{"hash":"70a508cdcdeb999b005ef6bbb19ef352","index":{"url":"z_7b071bdc2a35fa80___init___py.html","file":"cogapp/__init__.py","description":"","nums":{"precision":2,"n_files":1,"n_statements":1,"n_excluded":0,"n_missing":0,"n_branches":0,"n_partial_branches":0,"n_missing_branches":0}}},"z_7b071bdc2a35fa80___main___py":{"hash":"6d9d0d551879aa3e73791f40c5739845","index":{"url":"z_7b071bdc2a35fa80___main___py.html","file":"cogapp/__main__.py","description":"","nums":{"precision":2,"n_files":1,"n_statements":3,"n_excluded":0,"n_missing":3,"n_branches":0,"n_partial_branches":0,"n_missing_branches":0}}},"z_7b071bdc2a35fa80_cogapp_py":{"hash":"5ba0c64e49e07207b0c428615ecf9962","index":{"url":"z_7b071bdc2a35fa80_cogapp_py.html","file":"cogapp/cogapp.py","description":"","nums":{"precision":2,"n_files":1,"n_statements":483,"n_excluded":1,"n_missing":228,"n_branches":208,"n_partial_branches":28,"n_missing_branches":140}}},"z_7b071bdc2a35fa80_makefiles_py":{"hash":"eaf4689c0c47697806b20a0a782f9e2a","index":{"url":"z_7b071bdc2a35fa80_makefiles_py.html","file":"cogapp/makefiles.py","description":"","nums":{"precision":2,"n_files":1,"n_statements":22,"n_excluded":0,"n_missing":18,"n_branches":14,"n_partial_branches":0,"n_missing_branches":14}}},"z_7b071bdc2a35fa80_test_cogapp_py":{"hash":"10bdcf9d7378f460315a89e0163729dc","index":{"url":"z_7b071bdc2a35fa80_test_cogapp_py.html","file":"cogapp/test_cogapp.py","description":"","nums":{"precision":2,"n_files":1,"n_statements":854,"n_excluded":2,"n_missing":598,"n_branches":24,"n_partial_branches":1,"n_missing_branches":21}}},"z_7b071bdc2a35fa80_test_makefiles_py":{"hash":"a4a125d4209ab0e413c7c49768fd322f","index":{"url":"z_7b071bdc2a35fa80_test_makefiles_py.html","file":"cogapp/test_makefiles.py","description":"","nums":{"precision":2,"n_files":1,"n_statements":68,"n_excluded":0,"n_missing":51,"n_branches":6,"n_partial_branches":0,"n_missing_branches":6}}},"z_7b071bdc2a35fa80_test_whiteutils_py":{"hash":"59819ec39ae83287b478821e619c36df","index":{"url":"z_7b071bdc2a35fa80_test_whiteutils_py.html","file":"cogapp/test_whiteutils.py","description":"","nums":{"precision":2,"n_files":1,"n_statements":68,"n_excluded":0,"n_missing":50,"n_branches":0,"n_partial_branches":0,"n_missing_branches":0}}},"z_7b071bdc2a35fa80_utils_py":{"hash":"e49fdb51d89dd0fe016bf8a9e73315fa","index":{"url":"z_7b071bdc2a35fa80_utils_py.html","file":"cogapp/utils.py","description":"","nums":{"precision":2,"n_files":1,"n_statements":37,"n_excluded":0,"n_missing":8,"n_branches":6,"n_partial_branches":2,"n_missing_branches":2}}},"z_7b071bdc2a35fa80_whiteutils_py":{"hash":"828c0e3a8398ba557c1f936ae3093939","index":{"url":"z_7b071bdc2a35fa80_whiteutils_py.html","file":"cogapp/whiteutils.py","description":"","nums":{"precision":2,"n_files":1,"n_statements":44,"n_excluded":0,"n_missing":5,"n_branches":34,"n_partial_branches":4,"n_missing_branches":4}}}}}
File renamed without changes.

doc/sample_html/z_7b071bdc2a35fa80___init___py.html

+12-12
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<head>
44
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
55
<title>Coverage for cogapp/__init__.py: 100.00%</title>
6-
<link rel="icon" sizes="32x32" href="favicon_32.png">
7-
<link rel="stylesheet" href="style.css" type="text/css">
8-
<script src="coverage_html.js" defer></script>
6+
<link rel="icon" sizes="32x32" href="favicon_32_cb_58284776.png">
7+
<link rel="stylesheet" href="style_cb_8e611ae1.css" type="text/css">
8+
<script src="coverage_html_cb_da166b87.js" defer></script>
99
</head>
1010
<body class="pyfile">
1111
<header>
@@ -17,7 +17,7 @@ <h1>
1717
<aside id="help_panel_wrapper">
1818
<input id="help_panel_state" type="checkbox">
1919
<label for="help_panel_state">
20-
<img id="keyboard_icon" src="keybd_closed.png" alt="Show/hide keyboard shortcuts">
20+
<img id="keyboard_icon" src="keybd_closed_cb_ce680311.png" alt="Show/hide keyboard shortcuts">
2121
</label>
2222
<div id="help_panel">
2323
<p class="legend">Shortcuts on this page</p>
@@ -66,8 +66,8 @@ <h2>
6666
<a id="indexLink" class="nav" href="index.html">&Hat; index</a> &nbsp; &nbsp;
6767
<a id="nextFileLink" class="nav" href="z_7b071bdc2a35fa80___main___py.html">&#xbb; next</a>
6868
&nbsp; &nbsp; &nbsp;
69-
<a class="nav" href="https://coverage.readthedocs.io/en/7.5.0">coverage.py v7.5.0</a>,
70-
created at 2024-04-23 13:00 -0400
69+
<a class="nav" href="https://coverage.readthedocs.io/en/7.5.1">coverage.py v7.5.1</a>,
70+
created at 2024-05-04 10:30 -0400
7171
</p>
7272
<aside class="hidden">
7373
<button type="button" class="button_next_chunk" data-shortcut="j"></button>
@@ -82,13 +82,13 @@ <h2>
8282
</div>
8383
</header>
8484
<main id="source">
85-
<p class="pln"><span class="n"><a id="t1" href="#t1">1</a></span><span class="t"><span class="str">""" Cog content generation tool.</span>&nbsp;</span><span class="r"></span></p>
86-
<p class="pln"><span class="n"><a id="t2" href="#t2">2</a></span><span class="t"><span class="str"> http://nedbatchelder.com/code/cog</span>&nbsp;</span><span class="r"></span></p>
85+
<p class="pln"><span class="n"><a id="t1" href="#t1">1</a></span><span class="t"><span class="str">"""Cog content generation tool.</span>&nbsp;</span><span class="r"></span></p>
86+
<p class="pln"><span class="n"><a id="t2" href="#t2">2</a></span><span class="t"><span class="str">http://nedbatchelder.com/code/cog</span>&nbsp;</span><span class="r"></span></p>
8787
<p class="pln"><span class="n"><a id="t3" href="#t3">3</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
88-
<p class="pln"><span class="n"><a id="t4" href="#t4">4</a></span><span class="t"><span class="str"> Copyright 2004-2024, Ned Batchelder.</span>&nbsp;</span><span class="r"></span></p>
88+
<p class="pln"><span class="n"><a id="t4" href="#t4">4</a></span><span class="t"><span class="str">Copyright 2004-2024, Ned Batchelder.</span>&nbsp;</span><span class="r"></span></p>
8989
<p class="pln"><span class="n"><a id="t5" href="#t5">5</a></span><span class="t"><span class="str">"""</span>&nbsp;</span><span class="r"></span></p>
9090
<p class="pln"><span class="n"><a id="t6" href="#t6">6</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
91-
<p class="run"><span class="n"><a id="t7" href="#t7">7</a></span><span class="t"><span class="key">from</span> <span class="op">.</span><span class="nam">cogapp</span> <span class="key">import</span> <span class="nam">Cog</span><span class="op">,</span> <span class="nam">CogUsageError</span><span class="op">,</span> <span class="nam">main</span>&nbsp;</span><span class="r"></span></p>
91+
<p class="run"><span class="n"><a id="t7" href="#t7">7</a></span><span class="t"><span class="key">from</span> <span class="op">.</span><span class="nam">cogapp</span> <span class="key">import</span> <span class="nam">Cog</span> <span class="key">as</span> <span class="nam">Cog</span><span class="op">,</span> <span class="nam">CogUsageError</span> <span class="key">as</span> <span class="nam">CogUsageError</span><span class="op">,</span> <span class="nam">main</span> <span class="key">as</span> <span class="nam">main</span>&nbsp;</span><span class="r"></span></p>
9292
</main>
9393
<footer>
9494
<div class="content">
@@ -97,8 +97,8 @@ <h2>
9797
<a class="nav" href="index.html">&Hat; index</a> &nbsp; &nbsp;
9898
<a class="nav" href="z_7b071bdc2a35fa80___main___py.html">&#xbb; next</a>
9999
&nbsp; &nbsp; &nbsp;
100-
<a class="nav" href="https://coverage.readthedocs.io/en/7.5.0">coverage.py v7.5.0</a>,
101-
created at 2024-04-23 13:00 -0400
100+
<a class="nav" href="https://coverage.readthedocs.io/en/7.5.1">coverage.py v7.5.1</a>,
101+
created at 2024-05-04 10:30 -0400
102102
</p>
103103
</div>
104104
</footer>

0 commit comments

Comments
 (0)