pytest-allure-host 2.0.0__tar.gz → 2.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pytest_allure_host-2.0.0 → pytest_allure_host-2.0.1}/PKG-INFO +1 -1
- {pytest_allure_host-2.0.0 → pytest_allure_host-2.0.1}/pyproject.toml +2 -2
- {pytest_allure_host-2.0.0 → pytest_allure_host-2.0.1}/pytest_allure_host/publisher.py +39 -5
- {pytest_allure_host-2.0.0 → pytest_allure_host-2.0.1}/LICENSE +0 -0
- {pytest_allure_host-2.0.0 → pytest_allure_host-2.0.1}/README.md +0 -0
- {pytest_allure_host-2.0.0 → pytest_allure_host-2.0.1}/pytest_allure_host/__init__.py +0 -0
- {pytest_allure_host-2.0.0 → pytest_allure_host-2.0.1}/pytest_allure_host/__main__.py +0 -0
- {pytest_allure_host-2.0.0 → pytest_allure_host-2.0.1}/pytest_allure_host/cli.py +0 -0
- {pytest_allure_host-2.0.0 → pytest_allure_host-2.0.1}/pytest_allure_host/config.py +0 -0
- {pytest_allure_host-2.0.0 → pytest_allure_host-2.0.1}/pytest_allure_host/plugin.py +0 -0
- {pytest_allure_host-2.0.0 → pytest_allure_host-2.0.1}/pytest_allure_host/templates.py +0 -0
- {pytest_allure_host-2.0.0 → pytest_allure_host-2.0.1}/pytest_allure_host/utils.py +0 -0
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "pytest-allure-host"
|
7
|
-
version = "2.0.
|
7
|
+
version = "2.0.1"
|
8
8
|
description = "Publish Allure static reports to private S3 behind CloudFront with history preservation"
|
9
9
|
readme = "README.md"
|
10
10
|
license = "MIT"
|
@@ -69,7 +69,7 @@ Changelog = "https://darrenrabbs.github.io/allurehosting/changelog/"
|
|
69
69
|
[tool.poetry]
|
70
70
|
# Duplicate minimal metadata for backward compatibility with Poetry 1.x commands; primary metadata is under [project].
|
71
71
|
name = "pytest-allure-host"
|
72
|
-
version = "2.0.
|
72
|
+
version = "2.0.1"
|
73
73
|
description = "Publish Allure static reports to private S3 behind CloudFront with history preservation"
|
74
74
|
authors = ["Allure Hosting Maintainers"]
|
75
75
|
license = "MIT"
|
@@ -975,6 +975,23 @@ def _build_runs_index_html(
|
|
975
975
|
pass_pct = f"{(p / total_exec * 100):.1f}%" if total_exec > 0 else "-"
|
976
976
|
runs_total = len(runs_list)
|
977
977
|
latest_id = latest.get("run_id", "-")
|
978
|
+
latest_time = latest.get("time")
|
979
|
+
latest_time_str = _format_epoch_utc(latest_time) if latest_time else "-"
|
980
|
+
# classify pass rate for color hints
|
981
|
+
pr_num = None
|
982
|
+
try:
|
983
|
+
pr_num = float(pass_pct.rstrip("%")) if pass_pct and pass_pct != "-" else None # nosec B105: '-' is a display sentinel, not a credential
|
984
|
+
except Exception:
|
985
|
+
pr_num = None
|
986
|
+
pr_cls = (
|
987
|
+
"ok"
|
988
|
+
if (pr_num is not None and pr_num >= 90.0)
|
989
|
+
else (
|
990
|
+
"warn"
|
991
|
+
if (pr_num is not None and pr_num >= 75.0)
|
992
|
+
else ("bad" if (pr_num is not None) else "")
|
993
|
+
)
|
994
|
+
)
|
978
995
|
# Basic cards with minimal CSS so they do not dominate layout
|
979
996
|
summary_cards_html = (
|
980
997
|
"<section id='summary-cards' aria-label='Latest run summary'>"
|
@@ -988,13 +1005,17 @@ def _build_runs_index_html(
|
|
988
1005
|
"#summary-cards .card h3{margin:0;font-size:10px;font-weight:600;color:var(--text-dim);letter-spacing:.55px;text-transform:uppercase;}"
|
989
1006
|
"#summary-cards .card .val{font-size:21px;font-weight:600;line-height:1.05;}"
|
990
1007
|
"#summary-cards .card .val small{font-size:11px;font-weight:500;color:var(--text-dim);}"
|
1008
|
+
"#summary-cards .card .val.ok{color:#0a7a0a;}#summary-cards .card .val.warn{color:#b8860b;}#summary-cards .card .val.bad{color:#b00020;}"
|
1009
|
+
"#summary-cards .card .sub{font-size:11px;color:var(--text-dim);}"
|
991
1010
|
"#summary-cards .card:focus-within,#summary-cards .card:focus-visible{outline:2px solid var(--accent);outline-offset:2px;}"
|
992
1011
|
"@media (max-width:660px){#summary-cards .card{flex:1 1 45%;}}"
|
993
1012
|
"</style>"
|
994
|
-
f"<div class='card'><h3>Pass Rate</h3><div class='val'>{pass_pct}</div></div>"
|
1013
|
+
f"<div class='card'><h3>Pass Rate</h3><div class='val {pr_cls}'>{pass_pct}</div></div>"
|
995
1014
|
f"<div class='card'><h3>Failures</h3><div class='val'>{f}</div></div>"
|
1015
|
+
f"<div class='card'><h3>Tests</h3><div class='val'>{total_exec}</div><div class='sub'>P:{p} F:{f} B:{b}</div></div>"
|
996
1016
|
f"<div class='card'><h3>Runs</h3><div class='val'>{runs_total}</div></div>"
|
997
|
-
f"<div class='card'><h3>Latest</h3><div class='val'>{latest_id}</div></div>"
|
1017
|
+
f"<div class='card'><h3>Latest</h3><div class='val'><a href='../{latest_id}/' title='Open latest run'>{latest_id}</a></div><div class='sub'><a href='../latest/'>latest/</a></div></div>"
|
1018
|
+
f"<div class='card'><h3>Updated</h3><div class='val'><small>{latest_time_str}</small></div></div>"
|
998
1019
|
"</section>"
|
999
1020
|
)
|
1000
1021
|
parts: list[str] = [
|
@@ -1013,8 +1034,21 @@ def _build_runs_index_html(
|
|
1013
1034
|
"[data-theme='dark'] .link-btn{background:#262c34;border:1px solid #3a434e;color:var(--text);}"
|
1014
1035
|
"[data-theme='dark'] .link-btn:hover{background:#34404c;border-color:#4a5663;}"
|
1015
1036
|
"[data-theme='dark'] .pfb-pass{color:#4ade80;}[data-theme='dark'] .pfb-fail{color:#f87171;}[data-theme='dark'] .pfb-broken{color:#fbbf24;}", # adjust status colors for contrast
|
1016
|
-
|
1017
|
-
|
1037
|
+
# Header/title polish
|
1038
|
+
".page-title{margin:0 0 .6rem;display:flex;flex-wrap:wrap;gap:.45rem;align-items:baseline;font-size:1.35rem;line-height:1.2;}"
|
1039
|
+
".page-title .divider{color:var(--text-dim);}"
|
1040
|
+
".page-title .chip{display:inline-block;padding:2px 8px;border:1px solid var(--border);border-radius:999px;background:var(--bg-alt);font-size:.9rem;color:var(--text-dim);}"
|
1041
|
+
"[data-theme='dark'] .page-title .chip{background:#1b1f26;border-color:#2a313b;color:var(--text-dim);}"
|
1042
|
+
"</style>"
|
1043
|
+
"<link rel='stylesheet' href='../../../../web/static/css/runs-polish.css' onerror=\"this.remove()\">"
|
1044
|
+
"</head><body>",
|
1045
|
+
(
|
1046
|
+
f"<h1 class='page-title'>"
|
1047
|
+
f"Runs <span class='divider'>—</span> "
|
1048
|
+
f"<span class='chip'>{cfg.project}</span>/<span class='chip'>{cfg.branch}</span>"
|
1049
|
+
f"</h1>"
|
1050
|
+
)
|
1051
|
+
+ f"<span style='display:none'>{legacy_title}</span>",
|
1018
1052
|
summary_cards_html,
|
1019
1053
|
(
|
1020
1054
|
"<div id='controls' style='margin:.5rem 0 1rem;display:flex;" # noqa: E501
|
@@ -1029,7 +1063,6 @@ def _build_runs_index_html(
|
|
1029
1063
|
"<button id='clear-filter' class='ctl-btn'>Clear</button>" # noqa: E501
|
1030
1064
|
"<button id='theme-toggle' class='ctl-btn' title='Toggle dark/light theme'>Dark</button>" # theme toggle button
|
1031
1065
|
# Removed Theme / Accent / Density buttons for now
|
1032
|
-
"<button id='tz-toggle' class='ctl-btn' title='Toggle time zone'>UTC</button>" # timezone toggle
|
1033
1066
|
"<button id='col-toggle' class='ctl-btn' aria-expanded='false' aria-controls='col-panel'>Columns</button>" # noqa: E501
|
1034
1067
|
"<button id='help-toggle' class='ctl-btn' aria-expanded='false' aria-controls='help-pop' title='Usage help'>?</button>" # noqa: E501
|
1035
1068
|
"<span id='stats' style='font-size:12px;color:#666'></span>"
|
@@ -1134,6 +1167,7 @@ def _build_runs_index_html(
|
|
1134
1167
|
"</script>"
|
1135
1168
|
),
|
1136
1169
|
f"<script>{RUNS_INDEX_JS_ENH}</script>",
|
1170
|
+
"<script defer src='../../../../web/static/js/runs-ux.js' onerror=\"this.remove()\"></script>",
|
1137
1171
|
# Summary toggle & dashboard scripts removed
|
1138
1172
|
"<div id='empty-msg' hidden class='empty'>No runs match the current filters.</div>",
|
1139
1173
|
"</body></html>",
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|