`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 小時 新手友好度 78/100
-
難度 2/5 1-3 小時 新手友好度 64/100
FinanceFlash/unvibecode#577 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
umbraco/Umbraco-CMS-MCP-Editor#274 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 75/100
ProdigyV21/ARVIO#873 ·
維護者通常 1 天內回覆
-
[FEATURE]: Set fieldPath and reason on the CEL validation rules可能已有人在做 @bjosv 今天認領。 未關閉enhancement needs-triage
難度 2/5 1-3 小時 新手友好度 72/100
valkey-io/valkey-operator#618 ·
維護者通常 3 天內回覆