Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@

#### 🚀 Enhancement

- Added four "scaled" usage metrics to the per-Dandiset table, normalizing raw usage by how much content each Dandiset actually holds: "Bytes / Size" (bytes sent per byte stored), "Views / Asset", "Downloads / Asset" and "Requests / Asset". Their denominators come from two new data sources, [dandi-cache/dandiset-id-to-number-of-assets](https://github.com/dandi-cache/dandiset-id-to-number-of-assets) and [dandi-cache/dandiset-id-to-total-size](https://github.com/dandi-cache/dandiset-id-to-total-size), which are gzipped JSONL files fetched from the GitHub raw CDN and decompressed in the browser. A failure to load either one leaves the rest of the page working. ([#241](https://github.com/dandi/usage-page/pull/241))
- Added "Total Size" and "Total Assets" columns to the end of the per-Dandiset table, so the denominators behind the scaled metrics are visible alongside them. Both show "--" for Dandisets missing from the content derivatives. ([#241](https://github.com/dandi/usage-page/pull/241))
- Added an "Ignore testing datasets" checkbox to the per-Dandiset section's gear-wheel settings panel, which leaves out the Dandisets listed in `TESTING_DANDISET_IDS` — those whose usage is dominated by automated testing of the archive, and which otherwise dominate the scaled metrics. The setting is remembered in the URL (`ignore_testing=true`), applies to the table (including its download) rather than the plot, and is shown only for the archive-wide selection, the only one whose rows are Dandisets. ([#241](https://github.com/dandi/usage-page/pull/241))
- Stopped disabling the per-Dandiset gear-wheel settings button in table view, since its panel now holds a table setting as well as the plot-only "Plot Type"; both entries carry an info icon naming the view they apply to, and the panel is titled "Settings" rather than "Plot Settings". ([#241](https://github.com/dandi/usage-page/pull/241))
- Kept the sort a user has chosen for a table when that table is re-rendered with new rows — toggling "Ignore testing datasets" or the binary/decimal prefix no longer snaps the table back to its default sort. The remembered sort is tied to the table's container and column set, so a container that goes on to show a different table (the per-asset table replacing the per-Dandiset one) still starts from that table's own default. ([#241](https://github.com/dandi/usage-page/pull/241))
- Replaced the "Download raw file" item of every table's "Data ▾" menu with "Download table", which hands back a TSV of the table as displayed — the same columns, the same formatting, and the sort order currently in effect — rather than the source file, which no longer contains the derived columns. The source file itself is still one click away under "View file on GitHub". ([#241](https://github.com/dandi/usage-page/pull/241))
- Ordered the per-Dandiset table with its scaled metrics first and the raw totals they derive from after, renamed those totals to "Total Bytes", "Total Views", "Total Downloads" and "Total Requests", and let that table use the full page width (instead of the 1100px the other tables are capped at) so all of its columns are visible at once on a wide screen. Table columns gained an optional `default_sort` flag, used to keep "Total Bytes" the column the table is sorted by on load now that it is no longer the leftmost metric. ([#241](https://github.com/dandi/usage-page/pull/241))
- Rendered a scaled metric as "--" when its denominator is unknown (a Dandiset missing from the content derivatives, such as 'undetermined') or zero, rather than as a blank, zero, or infinite value. Table rows without a value for the sorted column now always sink to the bottom, in both sort directions. ([#241](https://github.com/dandi/usage-page/pull/241))

- Surfaced the view counts now published by [dandi/access-summaries](https://github.com/dandi/access-summaries) (`number_of_views` in `by_day.tsv`, `by_region.tsv` and `by_asset.tsv`; `total_number_of_views` in `totals.json` and `archive_totals.json`) throughout the page: a new "Views" column in every sortable table (over-time, per-Dandiset histogram, per-asset histogram, per-region, AWS regions), a `Views` entry in the hover text of every plot (over-time single-series and both grouped modes, per-Dandiset and per-asset histograms, geographic scatter and choropleth), and a view count in the totals sentence above the plots with an explanatory footnote. ([#240](https://github.com/dandi/usage-page/pull/240))
- Renamed the "Usage" column of every table view to "Bytes". ([#240](https://github.com/dandi/usage-page/pull/240))
- Ordered the metric columns of every table view as "Views", "Downloads", "Requests" (after the leading "Bytes" column). ([#240](https://github.com/dandi/usage-page/pull/240))
Expand All @@ -21,12 +30,16 @@

#### 🏠 Internal

- Renamed `AGENTS.md` to `CLAUDE.md` and recorded the American-English spelling convention in it. ([#241](https://github.com/dandi/usage-page/pull/241))

- Updated the version-check CI workflow to not trigger on `package-lock.json` changes; updated `AGENTS.md` to match. ([#174](https://github.com/dandi/usage-page/pull/174))
- Updated the version-check workflow to allow dependency-only `package.json` changes (for example Dependabot dependency bumps) without requiring a package version bump. ([#189](https://github.com/dandi/usage-page/pull/189))
- Fixed version-check CI parsing in the dependency-only `package.json` branch by replacing a malformed heredoc with `node -e`, so Dependabot dependency bumps no longer fail unexpectedly. ([#181](https://github.com/dandi/usage-page/pull/181))

#### 🧪 Tests

- Added unit tests for the new gzipped-JSONL data path (`parse_dandiset_numbers_jsonl`, `decode_maybe_gzipped_response`, `fetch_maybe_gzipped_text`), the `scaled_metric` and `format_ratio` helpers, and the table renderer's handling of missing numeric values. The Chromatic fixtures now serve gzipped asset-count and total-size files, so the snapshot run exercises the client-side decompression too. ([#241](https://github.com/dandi/usage-page/pull/241))

- Extracted `escape_html`, `make_cumulative`, `fetchWithRetry`, `apply_view_mode`, `apply_geo_view_mode`, and `render_sortable_table` into a new `src/plot-helpers.ts` module and added 50 unit tests covering all six helpers; raised overall statement coverage from 5% to 13%. ([#175](https://github.com/dandi/usage-page/pull/175))
- Added `stories/PlotSections.stories.js` with Storybook stories for the over-time plot, histogram, geography, and sortable-table components in both dark and light themes. ([#175](https://github.com/dandi/usage-page/pull/175))
- Replaced the live version string in the footer with a fixed mock value (`v0.0.0+test0000`) before taking Chromatic Playwright snapshots so the baseline is not invalidated by version bumps or new commits. ([#178](https://github.com/dandi/usage-page/pull/178))
Expand Down
1 change: 1 addition & 0 deletions AGENTS.md → CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
- Always bump the version in `package.json` appropriately when any file under `src/`, or `package.json` itself, is changed
- Leave a short description of the change or addition in the top `# Upcoming` section of the `CHANGELOG.md`; include the GitHub PR link at the end of each entry in the format `([#N](https://github.com/dandi/usage-page/pull/N))`
- PR titles should be human-readable and in the past tense; they should NOT use conventional commit style
- Use American English spelling everywhere (code, comments, UI text, changelog entries, and PR descriptions): "normalize" not "normalise", "color" not "colour", "behavior" not "behaviour"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "access-page",
"version": "1.8.0",
"version": "1.9.0",
"description": "Visualizations of data usage across the archive.",
"private": true,
"type": "module",
Expand Down
8 changes: 7 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -248,14 +248,20 @@
</svg>
</button>
<div class="settings-panel" id="hist_settings_panel" aria-hidden="true">
<div class="settings-panel-title">Plot Settings</div>
<div class="settings-panel-title">Settings</div>
<div class="SubControllerContainer">
<label for="hist_plot_type">Plot Type</label>
<span class="info-icon" data-tooltip="Only applies to the plot view" tabindex="0" role="img" aria-label="Plot Type: Only applies to the plot view">i</span>
<select id="hist_plot_type">
<option value="bar">Bar</option>
<option value="line">Line</option>
</select>
</div>
<div class="SubControllerContainer" id="hist_ignore_testing_container">
<label for="ignore_testing_dandisets">Ignore testing datasets</label>
<span class="info-icon" data-tooltip="Hide datasets used for testing purposes" tabindex="0" role="img" aria-label="Ignore testing datasets: Hide datasets used for testing purposes">i</span>
<input type="checkbox" id="ignore_testing_dandisets" />
</div>
</div>
</div>
</div>
Expand Down
Loading
Loading