Commit b0e8411
committed
Navigate to model pages from GitHub activity scatter plot (#316)
* Bump pre-commit hooks and site dependencies
- ruff v0.14.13 -> v0.14.14
- eslint v10.0.0-rc.0 -> v10.0.0-rc.2
- check-jsonschema 0.36.0 -> 0.36.1
- typos v1.42.0 -> v1.42.3
- svelte 5.47.0 -> 5.49.1
- svelte-check -> svelte-check-rs 0.7.3
- matterviz 0.2.2 -> 0.2.3
- vitest 4.0.17 -> 4.0.18
- typescript-eslint 8.53.0 -> 8.54.0
* Remove unnecessary type: ignore comments
- SevenNetCalculator kwargs typing fixed upstream
- mace_calc.models typing fixed
- pmv.structure_3d typing fixed
- FrechetCellFilter typing fixed
- PET calculator compute_energy typing fixed
* Replace abc.abstractmethod with NotImplementedError in Files enum
Files base class can't use abc.abstractmethod since it uses a custom
metaclass (MetaFiles), not ABCMeta. Replace with explicit
NotImplementedError to enforce implementation in subclasses.
- Remove abc import from enums.py
- Add type annotation to energy.py dict access
- Update test SubFiles to implement url/label properties
* Navigate to model pages from GitHub activity scatter plot and set color scale to log
Add model_key field to GitHub activity data to enable direct navigation
to model detail pages when clicking points in the scatter plot.
- fetch-mlip-repos-github-activity.ts: Extract model_key from YAML,
skip superseded/aborted models, update cache with current model info
- GitHubActivityScatter.svelte: Use goto() to navigate to /models/{slug},
add color_scale prop, fix GitHubMetricKey type to exclude model_key,
improve tooltip null checks
- types.ts: Add model_key to GitHubActivityData type
- TableControls.svelte: Remove obsolete ts-expect-error, fix Label type
- Regenerate mlip-github-activity.json with model_key fields
Cleanup site routes and tests
- +error.svelte: Add light theme filter for images
- +layout.svelte: Simplify heading selector, remove redundant CSS,
adjust breakpoint and nav styling
- +page.svelte: Consolidate matterviz imports
- data/+page.svelte: Add types to snapshot restore
- models/+page.svelte: Add types to snapshot restore, consolidate imports
- test_fetch.py: Fix iter_content mock signature (add decode_unicode)
DRY improvements across codebase
- test_fetch.py: Extract make_mock_response() helper (removes 3x duplication)
- fetch-mlip-repos-github-activity.ts: Extract is_cache_fresh() helper,
use update_info() for consistent object spreading
- GitHubActivityScatter.svelte: Extract format string constant,
consolidate point_label object to single line
- data/+page.svelte, models/+page.svelte: Use ReturnType<typeof capture_state>
to infer snapshot restore type instead of manual duplication
* Fix svelte-check warnings and TypeScript errors
- Fix a11y heading hierarchy: change h3 to h2 in phonons, discovery, model pages
- Fix RadarChart a11y: add role="button", keyboard handler, tabindex for interactive SVG
- Fix +error.svelte type narrowing: use !online instead of online === false
- Fix api/+page.svelte: add typed import.meta.glob for markdown modules
- Simplify GitHubActivityScatter tooltip type assertion
- Update table-export tests with proper html-to-image mocking
* Fix test failures after heading hierarchy changes
- Update PhononsPage test to expect h2 instead of h3
- Remove vi.resetModules() from table-export tests (interferes with vi.mock)
Make h2 assertion resilient to additional headings
Fix table-export test isolation issues
- Add async beforeEach to re-establish html-to-image mocks after clearAllMocks
- Use vi.restoreAllMocks() in afterEach to ensure clean spy state between tests
- Fix mock leakage between parameterized test iterations
Fix RadarChart keyboard handler to use proper coordinates
- Extract move_to_position helper for shared click/keyboard logic
- Add handle_keyboard_click that moves to SVG center (equal weights)
- Fixes NaN coordinates from casting KeyboardEvent to MouseEvent1 parent 2f85048 commit b0e8411
File tree
34 files changed
+384
-269
lines changed- .github/workflows
- matbench_discovery
- models
- eqV2
- mace
- pet
- sevennet
- scripts/attic
- site
- scripts
- src
- lib
- routes
- api
- data
- models
- [slug]
- tasks
- discovery
- phonons
- tests
- lib
- routes
- tests
- remote
34 files changed
+384
-269
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | 44 | | |
51 | 45 | | |
52 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
232 | 231 | | |
233 | 232 | | |
234 | 233 | | |
235 | | - | |
236 | 234 | | |
237 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
238 | 239 | | |
239 | 240 | | |
240 | | - | |
241 | 241 | | |
242 | 242 | | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
243 | 246 | | |
244 | 247 | | |
245 | 248 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
| 167 | + | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | | - | |
99 | | - | |
| 97 | + | |
100 | 98 | | |
101 | 99 | | |
102 | 100 | | |
| |||
144 | 142 | | |
145 | 143 | | |
146 | 144 | | |
147 | | - | |
148 | | - | |
149 | | - | |
| 145 | + | |
150 | 146 | | |
151 | 147 | | |
152 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
0 commit comments