Interactive With JSPsych example submits a DataCollection its own schema rejects
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 82/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- react, typescript
调研方向
从 apps/playground/src/instruments/examples/interactive/Interactive-With-JSPsych/index.ts 和 ScalarInstrumentRenderer 中的提交流程入手;testing/src/specs/playground.spec.ts 展示了如何提交 playground 示例。更新示例,使其提交 trials 数组,并将其添加到 spec 中。运行 playground spec,并确认此示例提交成功。
由索引模型根据 Issue 内容生成。
描述
The playground's Interactive With JSPsych example
(apps/playground/src/instruments/examples/interactive/Interactive-With-JSPsych/index.ts) ends its
timeline with:
on_finish: () => {
done(jsPsych.data.get() as any);
};
jsPsych.data.get() returns jsPsych 8's DataCollection, a class holding its trials in a trials
field, with no toJSON. ScalarInstrumentRenderer serializes what an instrument submits with
JSON.parse(JSON.stringify(data, replacer)), so validateSubmission receives { "trials": [...] }.
The example's validationSchema is z.array(...), so the submission should always fail validation.
This comes from reading the code; it has not been reproduced in the playground.
testing/src/specs/playground.spec.ts submits the Static Assets and Legacy Script examples, but not
this one.
Suggested fix
- Call
done(jsPsych.data.get().values()).values()returns the trials array, which also removes
theas anycast and itsno-unsafe-argumentdisable. - Add the example to the interactive examples the playground spec submits.
- 主要语言
- TypeScript
- 星标
- 119
- 派生
- 19
- 平均合并
- 4 天 1 小时
- 30 天内合并 PR
- 39
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
DouglasNeuroInformatics/OpenDataCapture 的其他 Issue
-
Area: Infrastructure Chore Difficulty: Low Priority: Medium
难度 2/5 1-3 小时 新手友好度 70/100
DouglasNeuroInformatics/OpenDataCapture#1835 ·
维护者通常 1 天内回复
-
Area: Instruments Bug Difficulty: Low Priority: Low
难度 2/5 1-3 小时 新手友好度 78/100
DouglasNeuroInformatics/OpenDataCapture#1824 · 1 条评论 ·
维护者通常 1 天内回复
-
Area: Shared Bug Difficulty: Low Priority: Low
难度 2/5 1-3 小时 新手友好度 70/100
DouglasNeuroInformatics/OpenDataCapture#1813 · 1 条评论 ·
维护者通常 1 天内回复
-
Area: Shared Bug Difficulty: Low Good First Issue Priority: Low
难度 2/5 1-3 小时 新手友好度 78/100
DouglasNeuroInformatics/OpenDataCapture#1812 · 1 条评论 ·
维护者通常 1 天内回复
-
Area: Instruments Bug Difficulty: Low Priority: Low
难度 2/5 1-3 小时 新手友好度 88/100
DouglasNeuroInformatics/OpenDataCapture#1801 · 1 条评论 ·
维护者通常 1 天内回复
查看 DouglasNeuroInformatics/OpenDataCapture 的全部 Issue
相似的 Issue
-
bug
难度 1/5 1 小时以内 新手友好度 86/100
awslabs/visual-asset-management-system#937 ·
维护者通常 1 天内回复
-
t0ggles
难度 1/5 1 小时以内 新手友好度 82/100
nolimits4web/swiper#8255 · 1 条评论 ·
维护者通常 15 天内回复
-
render: --variables-file (and --variables <path>) fails with "io.readFile is not a function" since 0.8.212可能已有人在做 @miguel-heygen 今天认领。 未关闭bug triage/needs-triage
难度 2/5 1-3 小时 新手友好度 76/100
heygen-com/hyperframes#6830 ·
维护者通常 1 天内回复
-
bug launch local use
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
account: profile bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 5 天内回复