-
Notifications
You must be signed in to change notification settings - Fork 1
feat(reports): leftover-map origin on leftover-map comparison graphic leftover-map axis ticks independently of leftover-map axis share and leftover-map singular values (v2.92.0) #877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
seonghobae
wants to merge
40
commits into
feat/leftover-map-axis-tick-share-badge-v2910
Choose a base branch
from
feat/leftover-map-compare-plot-tick-origin-badge-v2920
base: feat/leftover-map-axis-tick-share-badge-v2910
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
86b8eaa
feat(reports): leftover-map origin on leftover-map comparison graphic…
seonghobae f13a689
test(red): reconstruct comparison graphic origin-tick contract
seonghobae ff7d467
chore(stack): converge #877 onto repaired #875 head
seonghobae 1955b70
chore(stack): converge #877 onto repaired #875
seonghobae 677643a
chore(stack): converge #877 onto repaired ancestry
seonghobae cbb2802
chore(stack): converge repaired #875 into #877
seonghobae 1e59c11
fix(reports): model comparison origin tick identity
seonghobae 70b81b3
fix(reports): render comparison origin tick identity
seonghobae 73f8bf8
chore(stack): converge #875 into #877 without force
seonghobae 2d859c9
merge: converge comparison-origin lane onto repaired v2.91.0 parent
seonghobae 73aa923
fix(stack): adopt comparison graphic badge repair in #877
seonghobae 2f89543
test(stack): carry comparison graphic badge wiring contract into #877
seonghobae a0a2b6f
chore(stack): converge #877 onto repaired #875
seonghobae ba9101f
chore(stack): converge #877 onto current #875
seonghobae cd645e4
merge(reports): converge report-axis missingness repair into origin lane
seonghobae caca41e
merge(reports): converge #877 onto #875 RED contract head
seonghobae 23c0988
chore(stack): converge current #875 into #877
seonghobae 8503b0f
test(reports): align comparison tick contract with evidence projection
seonghobae a61db0a
chore(stack): converge current #875 into #877 after tick-contract repair
seonghobae ef77654
test(i18n): require comparison tick accessibility translations
seonghobae 6e89fed
chore(stack): converge semantic RED harness onto #877
seonghobae ddaa592
chore(stack): converge #875 product repair into #877
seonghobae e428976
chore(stack): converge #877 on repaired report tick foundation
seonghobae 8b157b4
chore(stack): converge #877 on repaired comparison tick foundation
seonghobae 7ab3973
chore(stack): converge #877 on repaired comparison-strip tick foundation
seonghobae 3f3a673
chore(stack): converge #877 on repaired report-axis tick foundation
seonghobae f96eb03
chore(stack): converge #877 on repaired comparison tick share foundation
seonghobae ee44c80
chore(stack): adopt repaired tick-share foundation without losing ori…
seonghobae 686996d
chore(stack): adopt repaired report axis tick share foundation
seonghobae 2b3363d
chore(stack): converge #877 on repaired report tick-share foundation
seonghobae d08dafb
fix(i18n): translate comparison tick accessibility copy
github-actions[bot] 19856fa
chore(stack): converge #877 on repaired #875 contracts
seonghobae edcf5ba
Merge parent #875 convergence into #877
seonghobae b5d053b
merge: converge comparison origin ticks onto report-axis evidence
seonghobae 950c5de
test(reports): execute comparison origin tick projection
seonghobae 0f1adc5
merge: converge report-axis tick contract repair into origin-badge lane
seonghobae a7d57b9
chore(stack): converge v2.84 contract repair while preserving origin …
seonghobae 34b5682
merge: converge #877 on report contract repairs
seonghobae f0a99af
chore(stack): converge #877 onto #875 owner stack
seonghobae f294cc4
chore(reports): converge #877 onto repaired #875 ancestry
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| import { describe, expect, it } from "vitest"; | ||
| import { | ||
| LEFTOVER_MAP_COMPARE_PLOT_ORIGIN_TICK, | ||
| LEFTOVER_MAP_COMPARE_PLOT_ORIGIN_TICK_SHARE, | ||
| LEFTOVER_MAP_COMPARE_PLOT_ORIGIN_TICK_SINGULAR, | ||
| LEFTOVER_MAP_COMPARE_PLOT_ORIGIN_TICK_SINGULAR_SHARE, | ||
| LEFTOVER_MAP_COMPARE_PLOT_TICK, | ||
| leftoverMapComparePlotTickAxisBadge, | ||
| leftoverMapPlotTickIsOrigin, | ||
| } from "./leftoverMapPlotAxisSingular"; | ||
|
|
||
| describe("comparison-graphic origin tick projection", () => { | ||
| it("recognizes only the canonical formatted zero coordinate as origin", () => { | ||
| expect(leftoverMapPlotTickIsOrigin("0.00")).toBe(true); | ||
| expect(leftoverMapPlotTickIsOrigin("+0.00")).toBe(false); | ||
| expect(leftoverMapPlotTickIsOrigin("−0.00")).toBe(false); | ||
| expect(leftoverMapPlotTickIsOrigin("0")).toBe(false); | ||
| }); | ||
|
|
||
| it("keeps origin identity independent from persisted share and singular evidence", () => { | ||
| expect(leftoverMapComparePlotTickAxisBadge(1, "0.00", null, null).template).toBe( | ||
| LEFTOVER_MAP_COMPARE_PLOT_ORIGIN_TICK, | ||
| ); | ||
| expect(leftoverMapComparePlotTickAxisBadge(1, "0.00", null, 0.25).template).toBe( | ||
| LEFTOVER_MAP_COMPARE_PLOT_ORIGIN_TICK_SHARE, | ||
| ); | ||
| expect(leftoverMapComparePlotTickAxisBadge(1, "0.00", 1.5, null).template).toBe( | ||
| LEFTOVER_MAP_COMPARE_PLOT_ORIGIN_TICK_SINGULAR, | ||
| ); | ||
| expect(leftoverMapComparePlotTickAxisBadge(1, "0.00", 1.5, 0.25).template).toBe( | ||
| LEFTOVER_MAP_COMPARE_PLOT_ORIGIN_TICK_SINGULAR_SHARE, | ||
| ); | ||
| }); | ||
|
|
||
| it("fails invalid evidence closed without turning a non-origin tick into origin", () => { | ||
| const badge = leftoverMapComparePlotTickAxisBadge( | ||
| 2, | ||
| "+0.50", | ||
| Number.NaN, | ||
| Number.POSITIVE_INFINITY, | ||
| ); | ||
|
|
||
| expect(badge).toEqual({ | ||
| template: LEFTOVER_MAP_COMPARE_PLOT_TICK, | ||
| values: { axis: 2, value: "+0.50" }, | ||
| }); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
tests/test_grouping_comparison_graphic_origin_tick_contract.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| """Executable contract for comparison-graphic origin tick captions.""" | ||
|
|
||
| from pathlib import Path | ||
| import re | ||
|
|
||
|
|
||
| ROOT = Path(__file__).resolve().parents[1] | ||
| SINGULAR_SOURCE = ROOT / "frontend" / "src" / "leftoverMapPlotAxisSingular.ts" | ||
|
|
||
|
|
||
| def test_comparison_graphic_origin_tick_has_distinct_four_state_copy() -> None: | ||
| """Origin ticks stay distinct across empty, share-only, singular-only, and combined evidence.""" | ||
| source = SINGULAR_SOURCE.read_text(encoding="utf-8") | ||
|
|
||
| for text in ( | ||
| "leftover map comparison graphic leftover-map axis {axis} origin tick {value}", | ||
| "leftover map comparison graphic leftover-map axis {axis} origin tick {value} {share}%", | ||
| "leftover map comparison graphic leftover-map axis {axis} origin tick {value} σ {singular}", | ||
| "leftover map comparison graphic leftover-map axis {axis} origin tick {value} σ {singular} {share}%", | ||
| ): | ||
| assert text in source | ||
| assert "leftoverMapPlotTickIsOrigin" in source | ||
| assert "leftoverMapComparePlotTickAxisBadge" in source | ||
|
|
||
|
|
||
| def test_origin_is_exact_formatted_zero_not_derived_from_share_or_singular() -> None: | ||
| """Origin identity follows the canonical formatted zero tick and does not use evidence magnitude.""" | ||
| source = SINGULAR_SOURCE.read_text(encoding="utf-8") | ||
| helper = re.search( | ||
| r"export function leftoverMapPlotTickIsOrigin\(.*?\n}\n", | ||
| source, | ||
| re.DOTALL, | ||
| ) | ||
| assert helper is not None | ||
| helper_source = helper.group(0) | ||
|
|
||
| assert "formatSignedLeftoverValue(0)" in helper_source | ||
| assert "tickLabel === originLabel" in helper_source | ||
| assert "leftover_share" not in helper_source | ||
| assert "singular" not in helper_source.lower() | ||
| assert "Math.abs" not in helper_source |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.