Skip to content

[codex] Add API dataset explorer tabs#346

Draft
bruAristimunha wants to merge 4 commits into
developfrom
new-figure
Draft

[codex] Add API dataset explorer tabs#346
bruAristimunha wants to merge 4 commits into
developfrom
new-figure

Conversation

@bruAristimunha

Copy link
Copy Markdown
Collaborator

Summary

  • Add an API-oriented dataset explorer generator for the documentation summary page.
  • Split the API view into two documentation tabs: API Volume and API Coverage.
  • Generate both fragments from the existing chart-data API path during prepare_summary_tables.py.
  • Adjust the homepage support-institution logo cloud so UCSD and BGU/Imperial-style wordmarks keep clear spacing and stack before crowding.

Impact

  • The dataset summary can now show API-consumable metadata coverage separately from the scatter view.
  • The new explorer does not download signal files; it uses summary metadata exposed by /api/eegdash/datasets/chart-data.
  • Homepage sponsor logos are more robust across desktop, tablet, and narrow widths.

Validation

  • python -m py_compile docs/plot_dataset/study_explorer.py docs/prepare_summary_tables.py
  • ruff check docs/plot_dataset/study_explorer.py docs/prepare_summary_tables.py docs/plot_dataset/__init__.py
  • git diff --check
  • generated API fragments parse with Node: 574 scatter points and 750 matrix rows in the built artifacts
  • make -C docs html-noplot completed successfully; existing generated-doc warnings remain unrelated
  • incremental Sphinx HTML rebuild completed successfully after the logo layout fix; existing generated-doc warnings remain unrelated
  • visual validation with Firefox/Playwright at http://127.0.0.1:8765/ for API tabs and sponsor-logo breakpoints

Drop _to_int and _read_dataset in favor of utils.safe_int and
utils.read_dataset_csv. Replace the inline recording-modality map with
utils.RECORDING_MODALITY_MAP (extended with seeg/ecog -> iEEG). Hoist
_facet_counts to a single call in _build_html and thread counts/selected
into option/legend/matrix renderers, extracting _order_recording to
collapse the duplicated _RECORDING_ORDER reorder. Introduce _VIEWS and
_FACET_SEPARATOR constants, drop the unused data-api-view/url/database
attributes on the root div, flatten the pathology if/elif on the same
predicate, and cache the NodeList plus summary refs once at init in the
explorer IIFE.
Replace the nested x_pos/y_pos closures inside _scatter_svg with module
level _log_axis_forward and _log_axis_inverse helpers, binding the per
plot constants via functools.partial at the call site. Satisfies the
no nested functions pre commit hook. Also picks up the ruff-format
quote-style touch ups on adjacent f-strings.
@github-actions

github-actions Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

📚 Documentation Preview

📦 Download Documentation Artifact

Download the documentation-html artifact from the workflow run to view the docs locally.

💡 To enable live previews, add a SURGE_TOKEN secret to this repository. See surge.sh for setup instructions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant