pytest-allure-host 2.0.0__py3-none-any.whl → 2.0.1__py3-none-any.whl

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.
@@ -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
- "</style></head><body>",
1017
- f"<h1 style='margin-bottom:.6rem'>{title}</h1><span style='display:none'>{legacy_title}</span>",
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>",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pytest-allure-host
3
- Version: 2.0.0
3
+ Version: 2.0.1
4
4
  Summary: Publish Allure static reports to private S3 behind CloudFront with history preservation
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE
@@ -3,11 +3,11 @@ pytest_allure_host/__main__.py,sha256=1dzo3_74YYjXLo4xf_OjbmayOAzDdTlIgCVX00tHdo
3
3
  pytest_allure_host/cli.py,sha256=43wnhhcerl20fJcfQbtWIuR7CDHI--V1oIVpwaoV_PI,10235
4
4
  pytest_allure_host/config.py,sha256=QLWhSYemmyI7cu_Y9ToR51hHwdU2lLLGqYT6IG9d1OE,4827
5
5
  pytest_allure_host/plugin.py,sha256=t_DzPQAf3Vj8W9Xmt25__iZg7ItRdJzl7tyQu01ZtSI,5079
6
- pytest_allure_host/publisher.py,sha256=c-QPZyDwK1c_e6QuYXLAF2uYXIdVMj8yVGwbP1snwUA,92763
6
+ pytest_allure_host/publisher.py,sha256=NCz8FHA7rRes4vwIfJbjfuipMmdj1MxMicYZoXkMSfc,94845
7
7
  pytest_allure_host/templates.py,sha256=tewywUUzhoLNayukhw-tOrSGtacMYSojzBKxE-cfRJE,18960
8
8
  pytest_allure_host/utils.py,sha256=rRgvPwfHX2cviczjTkPpQ1SDpsXS8xLvQaVVAdZegzo,4449
9
- pytest_allure_host-2.0.0.dist-info/METADATA,sha256=1W4JGqEbIbLqayYKsbytYVjZZNNg_6ND-saVp5YP8ZA,13621
10
- pytest_allure_host-2.0.0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
11
- pytest_allure_host-2.0.0.dist-info/entry_points.txt,sha256=PWnSY4aqAumEX4-dc1TkNHfju5VTKPUHfYPv1SdAlIA,119
12
- pytest_allure_host-2.0.0.dist-info/licenses/LICENSE,sha256=jcHN7r3njxuM4ilSLkK0fuuQAGMMkqzvYL27CYZGnWs,1084
13
- pytest_allure_host-2.0.0.dist-info/RECORD,,
9
+ pytest_allure_host-2.0.1.dist-info/METADATA,sha256=jMAFcp6u0gNz4qfl3Tx-LtCITSmGrvfwZ5KNyDZL9-A,13621
10
+ pytest_allure_host-2.0.1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
11
+ pytest_allure_host-2.0.1.dist-info/entry_points.txt,sha256=PWnSY4aqAumEX4-dc1TkNHfju5VTKPUHfYPv1SdAlIA,119
12
+ pytest_allure_host-2.0.1.dist-info/licenses/LICENSE,sha256=jcHN7r3njxuM4ilSLkK0fuuQAGMMkqzvYL27CYZGnWs,1084
13
+ pytest_allure_host-2.0.1.dist-info/RECORD,,