feat: Adds span labeling pipeline with prompt references, exponential magnitude slider, and 10 jsPsych plugins#1
Merged
aaronstevenwhite merged 11 commits intomainfrom Feb 10, 2026
Conversation
…and slider-rating plugins with IIFE gallery bundle.
…tion cleanup on span deletion to the span-label plugin.
…bility, MegaVeridicality, and Semantic Proto-Roles.
…mp to 0.2.0, and TypeScript strict mode fixes.
…s f-string in docs.
…enization modules.
96bd8d2 to
a18133c
Compare
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.
Description
Adds a complete span labeling pipeline from data model through deployment, 10 new jsPsych plugins, prompt span references (
[[label]]syntax), an exponential magnitude estimation slider, and an interactive gallery with 17+ demos.Motivation
The experiment framework needed token-level annotation (span labeling), additional task types beyond the initial rating/forced-choice plugins, and a way for prompts to reference highlighted spans with matching colors. Magnitude estimation also needed a better input method than a plain number field.
Type of Change
Checklist
uv run ruff check .anduv run ruff format .uv run pyrightwith no errorsuv run pytest tests/)Testing
Python (79 span + 13 prompt reference tests):
uv run pytest tests/deployment/jspsych/test_trials.py-- prompt span reference parsing, color assignment, resolver, integrationuv run pytest tests/items/test_spans.py-- span data model, composability, validationuv run pytest tests/tokenization/-- tokenizer backendsTypeScript (83 tests, 0 type errors, 0 Biome errors):
pnpm run test-- plugin info/instantiation (rating, forced-choice, span-label, cloze, magnitude), exponential slider math (8 tests), span-renderer (22 tests), randomizer, list-distributorpnpm run typecheck-- strict mode withexactOptionalPropertyTypes,noUncheckedIndexedAccesspnpm run check-- Biome lint + format cleanKey features to verify manually:
[[label]]resolves to highlighted HTML with matching stimulus colorsScreenshots (if applicable)
N/A -- interactive demos viewable via
uv run mkdocs serve