[codex] Add API dataset explorer tabs#346
Draft
bruAristimunha wants to merge 4 commits into
Draft
Conversation
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.
Contributor
📚 Documentation Preview📦 Download Documentation Artifact
💡 To enable live previews, add a |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
prepare_summary_tables.py.Impact
/api/eegdash/datasets/chart-data.Validation
python -m py_compile docs/plot_dataset/study_explorer.py docs/prepare_summary_tables.pyruff check docs/plot_dataset/study_explorer.py docs/prepare_summary_tables.py docs/plot_dataset/__init__.pygit diff --checkmake -C docs html-noplotcompleted successfully; existing generated-doc warnings remain unrelatedhttp://127.0.0.1:8765/for API tabs and sponsor-logo breakpoints