Skip to content

Commit 4d20786

Browse files
committed
Suggestions from Chris
1 parent fa33982 commit 4d20786

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/probeinterface/library.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ def list_manufacturers(tag=None) -> list[str]:
192192
manufacturers : list of str
193193
List of available manufacturers
194194
"""
195+
if tag is not None:
196+
assert (
197+
tag in get_tags_in_library()
198+
), f"Tag {tag} not found in library. Available tags are {get_tags_in_library()}."
195199
return list_github_folders("SpikeInterface", "probeinterface_library", ref=tag)
196200

197201

@@ -209,6 +213,13 @@ def list_probes_by_manufacturer(manufacturer: str, tag=None) -> list[str]:
209213
probes : list of str
210214
List of available probes for the given manufacturer
211215
"""
216+
if tag is not None:
217+
assert (
218+
tag in get_tags_in_library()
219+
), f"Tag {tag} not found in library. Available tags are {get_tags_in_library()}."
220+
assert manufacturer in list_manufacturers(
221+
tag=tag
222+
), f"Manufacturer {manufacturer} not found in library. Available manufacturers are {list_manufacturers(tag=tag)}."
212223
return list_github_folders("SpikeInterface", "probeinterface_library", path=manufacturer, ref=tag)
213224

214225

0 commit comments

Comments
 (0)