Skip to content
This repository was archived by the owner on Jun 15, 2026. It is now read-only.

Commit 7ddea3b

Browse files
committed
v1.8.2: link colors, favicon encoding, PyPI publish
1 parent c7782a5 commit 7ddea3b

13 files changed

Lines changed: 93 additions & 29 deletions

File tree

.github/workflows/publish.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Publish to PyPI
2+
on:
3+
release:
4+
types: [published]
5+
permissions:
6+
id-token: write
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
environment: pypi
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-python@v5
14+
with:
15+
python-version: "3.12"
16+
- run: pip install build
17+
- run: python -m build
18+
- uses: pypa/gh-action-pypi-publish@release/v1

CHANGELOG.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,36 @@
22

33
All notable changes are documented here. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); the project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
44

5+
## [1.8.2]
6+
7+
### Fixed
8+
- **HTML report link colors.** Links in dark mode were browser-default
9+
neon blue (#0000EE), unreadable against the dark background. Dark mode
10+
now uses #93c5fd; light mode uses #1976d2 (matching the existing accent).
11+
- **Favicon SVG rendering.** The report's inline SVG favicon used a
12+
`linearGradient` with an internal IRI reference (`url(#g)`) that doesn't
13+
resolve inside `data:` URIs, rendering the icon invisible. Replaced with
14+
a solid fill and URL-encoded angle brackets.
15+
- **Genotype column header.** Abbreviated "Genotype" to "GT" to prevent
16+
column header overlap on narrow/mobile screens.
17+
18+
### Changed
19+
- **PyPI metadata.** Homepage now points to allelix.io. Added Source and
20+
Changelog links.
21+
- **Automated PyPI publishing.** GitHub Actions workflow publishes to PyPI
22+
via Trusted Publishing on every GitHub Release.
23+
524
## [1.8.1]
625

726
### Changed
827
- **Updated sample reports.** Regenerated `examples/sample_reports/` with
928
v1.8.0 report format (5-column table, detail sidebar, dark mode).
1029

30+
### Fixed
31+
- **Test fixture genotype format.** Corrected the `test_html.py` fixture's
32+
`genotype_match` default from `A/G` to the concatenated `AG` form that
33+
production emits for SNVs.
34+
1135
## [1.8.0]
1236

1337
### Changed
@@ -1622,6 +1646,7 @@ All notable changes are documented here. Format follows [Keep a Changelog](https
16221646
- GitHub Actions CI matrix on Python 3.11 and 3.12.
16231647

16241648

1649+
[1.8.2]: https://github.com/dial481/allelix/compare/v1.8.1...v1.8.2
16251650
[1.8.1]: https://github.com/dial481/allelix/compare/v1.8.0...v1.8.1
16261651
[1.8.0]: https://github.com/dial481/allelix/compare/v1.7.0...v1.8.0
16271652
[1.7.0]: https://github.com/dial481/allelix/compare/v1.6.1...v1.7.0
@@ -1630,8 +1655,7 @@ All notable changes are documented here. Format follows [Keep a Changelog](https
16301655
[1.5.3]: https://github.com/dial481/allelix/compare/v1.5.2...v1.5.3
16311656
[1.5.2]: https://github.com/dial481/allelix/compare/v1.5.1...v1.5.2
16321657
[1.5.1]: https://github.com/dial481/allelix/compare/v1.5.0...v1.5.1
1633-
[1.5.0]: https://github.com/dial481/allelix/compare/v1.4.1...v1.5.0
1634-
[1.4.1]: https://github.com/dial481/allelix/compare/v1.4.0...v1.4.1
1658+
[1.5.0]: https://github.com/dial481/allelix/compare/v1.4.0...v1.5.0
16351659
[1.4.0]: https://github.com/dial481/allelix/compare/v1.3.1...v1.4.0
16361660
[1.3.1]: https://github.com/dial481/allelix/compare/v1.3.0...v1.3.1
16371661
[1.3.0]: https://github.com/dial481/allelix/compare/v1.2.0...v1.3.0

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ Open-source command-line toolkit for analyzing raw genotype files from consumer
1010
> HTML/JSON/terminal reports, methylation + pharmacogenomics focused
1111
> commands, report diffing, persistent config with commercial-mode
1212
> safety switch. Build auto-detection from position data (ADR-0021).
13-
> No regex on prose anywhere in production. **Latest: v1.7.0** — PLINK
14-
> export, magnitude scoring formalization (ADR-0034). Release notes:
13+
> No regex on prose anywhere in production. **Latest: v1.8.2** — HTML
14+
> report redesign with dark mode, PLINK export, and automated PyPI
15+
> publishing. Release notes:
1516
> [`CHANGELOG.md`](CHANGELOG.md).
1617
1718
## Quickstart

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Supported versions
44

5-
Only the latest minor release receives security fixes.
5+
The current and previous minor releases receive security fixes.
66

77
| Version | Supported |
88
|---------|-----------|

allelix/models.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ class Annotation:
7979
magnitude: 0-10 importance score (SNPedia-style).
8080
description: Human-readable explanation.
8181
attribution: Display name of the source ("ClinVar", "PharmGKB", ...).
82-
genotype_match: Which genotype triggers this annotation (e.g., "T/T").
82+
genotype_match: Which genotype triggers this annotation. For SNVs this
83+
is a concatenated, sorted allele pair (e.g., "AG", "TT"); the slash
84+
form (e.g., "AT/A") appears only for indels.
8385
references: PubMed IDs or URLs supporting the claim.
8486
condition: Disease or condition name, if applicable.
8587
gene: Gene symbol, if known.

allelix/reports/html.py

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ def _escape(value: str) -> str:
101101
--notice-border: #f9a825;
102102
--notice-warn-bg: #fff3e0;
103103
--notice-warn-border: #e65100;
104+
--link: #1976d2;
104105
}
105106
@media (prefers-color-scheme: dark) {
106107
:root:not([data-theme="light"]) {
@@ -119,6 +120,7 @@ def _escape(value: str) -> str:
119120
--notice-border: #f9a825;
120121
--notice-warn-bg: #331a00;
121122
--notice-warn-border: #e65100;
123+
--link: #93c5fd;
122124
}
123125
}
124126
[data-theme="dark"] {
@@ -137,6 +139,7 @@ def _escape(value: str) -> str:
137139
--notice-border: #f9a825;
138140
--notice-warn-bg: #331a00;
139141
--notice-warn-border: #e65100;
142+
--link: #93c5fd;
140143
}
141144
142145
*, *::before, *::after { box-sizing: border-box; }
@@ -152,6 +155,7 @@ def _escape(value: str) -> str:
152155
}
153156
h1 { margin-bottom: .25rem; }
154157
.subtitle { color: var(--text-muted); margin-top: 0; }
158+
a { color: var(--link); }
155159
156160
.notice {
157161
background: var(--notice-bg, #fff8e1); border-left: 4px solid var(--notice-border, #f9a825);
@@ -1024,7 +1028,7 @@ def _display_repute(g: list[Annotation]) -> str:
10241028
'<th data-sort="gene" class="sortable">'
10251029
'Gene<span class="sort-arrow"></span></th>'
10261030
'<th data-sort="genotype" class="sortable">'
1027-
'Genotype<span class="sort-arrow"></span></th>'
1031+
'GT<span class="sort-arrow"></span></th>'
10281032
'<th data-sort="repute" class="sortable">'
10291033
'Repute<span class="sort-arrow"></span></th>'
10301034
"<th>Summary</th>"
@@ -1090,16 +1094,25 @@ def _display_repute(g: list[Annotation]) -> str:
10901094
"<html lang='en'><head><meta charset='utf-8'>"
10911095
'<meta name="viewport" content="width=device-width, initial-scale=1">'
10921096
'<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,'
1093-
"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'>"
1094-
"<defs><linearGradient id='g' x1='0' y1='0' x2='1' y2='1'>"
1095-
"<stop offset='0%25' stop-color='%234f46e5'/>"
1096-
"<stop offset='100%25' stop-color='%2306b6d4'/>"
1097-
"</linearGradient></defs>"
1098-
"<path d='M16 2C9 2 8 8 8 8s2-3 8-3 8 3 8 3-1-6-8-6z"
1099-
"m0 6c-7 0-8 6-8 6s2-3 8-3 8 3 8 3-1-6-8-6z"
1100-
"m0 6c-7 0-8 6-8 6s2-3 8-3 8 3 8 3-1-6-8-6z"
1101-
"m0 6c-7 0-8 6-8 6s2-3 8-3 8 3 8 3-1-6-8-6z'"
1102-
" fill='url(%23g)' opacity='0.9'/></svg>\">"
1097+
"%3Csvg viewBox='0 0 32 32' fill='none'"
1098+
" xmlns='http://www.w3.org/2000/svg'%3E"
1099+
"%3Ccircle cx='16' cy='16' r='14' stroke='%236366f1'"
1100+
" stroke-width='1.5' opacity='0.3'/%3E"
1101+
"%3Cpath d='M10 6C10 6 22 12 22 16C22 20 10 26 10 26'"
1102+
" stroke='%236366f1' stroke-width='2'"
1103+
" stroke-linecap='round' fill='none'/%3E"
1104+
"%3Cpath d='M22 6C22 6 10 12 10 16C10 20 22 26 22 26'"
1105+
" stroke='%236366f1' stroke-width='2'"
1106+
" stroke-linecap='round' fill='none' opacity='0.4'/%3E"
1107+
"%3Ccircle cx='10' cy='10' r='2' fill='%236366f1'/%3E"
1108+
"%3Ccircle cx='22' cy='10' r='2' fill='%236366f1'"
1109+
" opacity='0.4'/%3E"
1110+
"%3Ccircle cx='16' cy='16' r='2' fill='%236366f1'"
1111+
" opacity='0.7'/%3E"
1112+
"%3Ccircle cx='22' cy='22' r='2' fill='%236366f1'/%3E"
1113+
"%3Ccircle cx='10' cy='22' r='2' fill='%236366f1'"
1114+
" opacity='0.4'/%3E"
1115+
'%3C/svg%3E">'
11031116
f"<title>{_escape(title)}</title>"
11041117
f"<style>{_CSS}</style>"
11051118
"</head><body>"

docs/adr/0028-local-version-tag-convention.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ never splits on `:`.
7474

7575
In both families, a non-empty tag that doesn't match the current
7676
version means "stale, rebuild."
77-
5. Version constants live in `allelix/annotators/_versions.py`. Bump the
77+
5. Version constants live in `allelix/databases/_versions.py`. Bump the
7878
constant when local processing logic changes in a way that would
7979
produce different cache contents from the same input data.
8080

docs/adr/0033-schema-version-bump-policy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Going forward, all new fields bump.
2727
## Consequences
2828

2929
- Any commit that adds, removes, or renames a field in the JSON report
30-
output must increment `_SCHEMA_VERSION` and update
30+
output must increment `SCHEMA_VERSION` and update
3131
`_SUPPORTED_SCHEMA_VERSIONS` in the diff loader.
3232
- The diff loader's supported-versions set grows monotonically.
3333
- ADR-0032's body is not edited (ADR immutability). This ADR supersedes

0 commit comments

Comments
 (0)