`ProbeType.create_neuropixels_probe` warning message improvements
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- python
调研方向
从 element_array_ephys/probe.py 中的 ProbeType.create_neuropixels_probe()、create_neuropixels_probe() 和 create_neuropixels_probe_types() 开始,以报告的 DuplicateError 作为要追踪的行为。明确需要哪一种提议的行为,然后确保警告或重复项处理能够适当地引导用户,并验证重复创建 Neuropixels probe 时的行为符合文档说明。
由索引模型根据 Issue 内容生成。
描述
Bug Report
Description
In our code, we had been defining our probes using the ProbeType class as such
for probe_type in ('neuropixels 1.0 - 3A', 'neuropixels 1.0 - 3B',
'neuropixels 2.0 - SS', 'neuropixels 2.0 - MS'):
probe_element.ProbeType.create_neuropixels_probe(probe_type)
We recently updated to the latest version of element-array-ephys which broke our pipeline since the class version is now passed directly to probe_element.create_neuropixels_probe() which removes the skip_duplicates=True that the older version of the pipeline had, resulting in
File "/home/[email protected]/Datajoint_projs/U19-pipeline_python/u19_pipeline/ephys_pipeline.py", line 149, in <module>
probe_element.ProbeType.create_neuropixels_probe(probe_type)
File "/home/[email protected]/miniconda3/envs/U19-pipeline_python_env3/lib/python3.12/site-packages/element_array_ephys/probe.py", line 77, in create_neuropixels_probe
return create_neuropixels_probe(probe_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/[email protected]/miniconda3/envs/U19-pipeline_python_env3/lib/python3.12/site-packages/element_array_ephys/probe.py", line 173, in create_neuropixels_probe
ProbeType.insert1({"probe_type": probe_type})
File "/home/[email protected]/miniconda3/envs/U19-pipeline_python_env3/lib/python3.12/site-packages/datajoint/table.py", line 347, in insert1
self.insert((row,), **kwargs)
File "/home/[email protected]/miniconda3/envs/U19-pipeline_python_env3/lib/python3.12/site-packages/datajoint/table.py", line 464, in insert
raise err.suggest(
datajoint.errors.DuplicateError: ("Duplicate entry 'neuropixels 1.0 - 3A' for key 'PRIMARY'", 'To ignore duplicate entries in insert, set skip_duplicates=True')
If follow the deprecation advice and update to:
for probe_type in ('neuropixels 1.0 - 3A', 'neuropixels 1.0 - 3B',
'neuropixels 2.0 - SS', 'neuropixels 2.0 - MS'):
probe_element.create_neuropixels_probe(probe_type)
we get the same error as above since skip_dulicates=True is still not passed.
Possible solutions
There are two solutions:
- Keep the old behavior by passing a
skip_duplicates=Truetoprobe_element.create_neuropixels_probesimilar to the older behavior. - Update the Deprecation message to advise the user to replace the repeated calls of
create_neuropixels_probewith a singlecreate_neuropixels_probe_types().
- 主要语言
- Jupyter Notebook
- 星标
- 10
- 派生
- 44
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
datajoint/element-array-ephys 的其他 Issue
-
Migrate to DataJoint 2.x: 14 longblob attributes silently corrupt data, 1 attribute fails to declare未关闭
难度 4/5 3-5 天 新手友好度 58/100
datajoint/element-array-ephys#230 ·
-
enhancement
难度 3/5 1-2 天 新手友好度 45/100
datajoint/element-array-ephys#207 ·
-
bug
难度 2/5 1-3 小时 新手友好度 35/100
datajoint/element-array-ephys#154 · 1 条评论 ·
-
bug
难度 3/5 1-2 天 新手友好度 35/100
datajoint/element-array-ephys#163 ·
-
bug
难度 3/5 1-2 天 新手友好度 30/100
datajoint/element-array-ephys#162 ·
查看 datajoint/element-array-ephys 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 88/100
modelcontextprotocol/python-sdk#3648 ·
维护者通常 1 天内回复
-
bot:ai-assisted status:untriaged
难度 2/5 1-3 小时 新手友好度 85/100
midnightntwrk/midnight-js#1424 ·
维护者通常 1 天内回复
-
namespace operations
难度 1/5 1 小时以内 新手友好度 75/100
EclipseFdn/open-vsx.org#13830 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 83/100
jenkinsci/gitlab-plugin#1950 ·
-
Ramp limits of a fixed modular committable unit scale with p_nom times the number of running modules未关闭operational realism optimization
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复