Skip to content

Commit 99f1536

Browse files
committed
Add a footer with a generation timestamp
1 parent 13f9504 commit 99f1536

4 files changed

Lines changed: 30 additions & 1 deletion

File tree

‎conformance/results/results.html‎

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎conformance/src/reporting.py‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Generates a summary of the type checker conformant tests.
33
"""
44

5+
import datetime
56
import itertools
67
import operator
78
import tomllib
@@ -65,11 +66,17 @@ def generate_summary(root_dir: Path):
6566

6667
type_checkers = sorted(TYPE_CHECKERS, key=operator.attrgetter("name"))
6768

69+
timestamp = datetime.datetime.now(tz=datetime.UTC)
6870
groups = _get_groups(root_dir, type_checkers)
6971
totals = _get_totals(groups)
7072
versions = _get_versions(root_dir, type_checkers)
7173

72-
results = template.render(groups=groups, totals=totals, versions=versions)
74+
results = template.render(
75+
timestamp=timestamp,
76+
groups=groups,
77+
totals=totals,
78+
versions=versions,
79+
)
7380

7481
root_dir.joinpath("results", "results.html").write_text(results)
7582

‎conformance/src/templates/base.html‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ <h1>Python Type System Conformance Test Results</h1>
8888
</tr>
8989
</tfoot>
9090
</table>
91+
<footer>
92+
<p>Generated at {{ timestamp.strftime("%c %Z") }}</p>
93+
</footer>
9194
</main>
9295
<script>
9396
const selector = document.querySelector("#color-scheme");

‎conformance/src/templates/style.css‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ header {
5252
text-align: center;
5353
}
5454

55+
footer {
56+
border-block-start: 1px solid light-dark(var(--light-main-fg), var(--dark-main-fg));
57+
color: light-dark(var(--light-main-fg), var(--dark-main-fg));
58+
padding-block-start: 0.5em;
59+
margin-block-start: 2em;
60+
text-align: center;
61+
}
62+
5563
main {
5664
padding: 2em;
5765
}

0 commit comments

Comments
 (0)