diff --git a/neuronexus/A4x8-5mm-100-200-177/A4x8-5mm-100-200-177.json b/neuronexus/A4x8-5mm-100-200-177/A4x8-5mm-100-200-177.json index cac96f8..5dbe52a 100644 --- a/neuronexus/A4x8-5mm-100-200-177/A4x8-5mm-100-200-177.json +++ b/neuronexus/A4x8-5mm-100-200-177/A4x8-5mm-100-200-177.json @@ -1,6 +1,6 @@ { "specification": "probeinterface", - "version": "0.2.19", + "version": "0.3.2", "probes": [ { "ndim": 2, diff --git a/neuronexus/A4x8-5mm-100-400-177/A4x8-5mm-100-400-177.json b/neuronexus/A4x8-5mm-100-400-177/A4x8-5mm-100-400-177.json index f1204a6..c3567b6 100644 --- a/neuronexus/A4x8-5mm-100-400-177/A4x8-5mm-100-400-177.json +++ b/neuronexus/A4x8-5mm-100-400-177/A4x8-5mm-100-400-177.json @@ -1,6 +1,6 @@ { "specification": "probeinterface", - "version": "0.2.17", + "version": "0.3.2", "probes": [ { "ndim": 2, diff --git a/neuronexus/A4x8-5mm-100-400-703/A4x8-5mm-100-400-703.json b/neuronexus/A4x8-5mm-100-400-703/A4x8-5mm-100-400-703.json index 6bdc31d..a70ab4b 100644 --- a/neuronexus/A4x8-5mm-100-400-703/A4x8-5mm-100-400-703.json +++ b/neuronexus/A4x8-5mm-100-400-703/A4x8-5mm-100-400-703.json @@ -1,6 +1,6 @@ { "specification": "probeinterface", - "version": "0.2.17", + "version": "0.3.2", "probes": [ { "ndim": 2, diff --git a/neuronexus/A4x8-5mm-200-400-177/A4x8-5mm-200-400-177.json b/neuronexus/A4x8-5mm-200-400-177/A4x8-5mm-200-400-177.json index 8442dec..6585de6 100644 --- a/neuronexus/A4x8-5mm-200-400-177/A4x8-5mm-200-400-177.json +++ b/neuronexus/A4x8-5mm-200-400-177/A4x8-5mm-200-400-177.json @@ -1,6 +1,6 @@ { "specification": "probeinterface", - "version": "0.2.19", + "version": "0.3.2", "probes": [ { "ndim": 2, diff --git a/neuronexus/A4x8-5mm-200-400-703/A4x8-5mm-200-400-703.json b/neuronexus/A4x8-5mm-200-400-703/A4x8-5mm-200-400-703.json index c41a964..adca227 100644 --- a/neuronexus/A4x8-5mm-200-400-703/A4x8-5mm-200-400-703.json +++ b/neuronexus/A4x8-5mm-200-400-703/A4x8-5mm-200-400-703.json @@ -1,6 +1,6 @@ { "specification": "probeinterface", - "version": "0.2.19", + "version": "0.3.2", "probes": [ { "ndim": 2, diff --git a/neuronexus/A4x8-5mm-50-200-177/A4x8-5mm-50-200-177.json b/neuronexus/A4x8-5mm-50-200-177/A4x8-5mm-50-200-177.json index 61d6f61..a9364c9 100644 --- a/neuronexus/A4x8-5mm-50-200-177/A4x8-5mm-50-200-177.json +++ b/neuronexus/A4x8-5mm-50-200-177/A4x8-5mm-50-200-177.json @@ -1,6 +1,6 @@ { "specification": "probeinterface", - "version": "0.2.19", + "version": "0.3.2", "probes": [ { "ndim": 2, diff --git a/plexon/4S1024/4S1024.json b/plexon/4S1024/4S1024.json index a82348f..5f196ea 100644 --- a/plexon/4S1024/4S1024.json +++ b/plexon/4S1024/4S1024.json @@ -1,6 +1,6 @@ { "specification": "probeinterface", - "version": "0.2.23", + "version": "0.3.2", "probes": [ { "ndim": 2, diff --git a/plexon/8S1024/8S1024.json b/plexon/8S1024/8S1024.json index 5f2ef34..bb4fee8 100644 --- a/plexon/8S1024/8S1024.json +++ b/plexon/8S1024/8S1024.json @@ -1,6 +1,6 @@ { "specification": "probeinterface", - "version": "0.2.23", + "version": "0.3.2", "probes": [ { "ndim": 2, diff --git a/scripts/check_for_json_changes_in_probes.py b/scripts/check_for_json_changes_in_probes.py index dee4c1c..47a2cb6 100644 --- a/scripts/check_for_json_changes_in_probes.py +++ b/scripts/check_for_json_changes_in_probes.py @@ -1,5 +1,6 @@ from argparse import ArgumentParser from pathlib import Path +import json import shutil @@ -37,13 +38,17 @@ if old_probe_json_path.is_file(): with open(temp_probe_json_path, 'r') as f1, open(old_probe_json_path, 'r') as f2: # Read in json files - lines1 = f1.readlines() - lines2 = f2.readlines() + new_probe_dict = json.load(f1) + old_probe_dict = json.load(f2) - # We don't want to update the probes just because of a probeinterface version update. - # The probeinterface version is stored on the 3rd line of the json file, so we only - # compare the json files from line 3 and down. - if lines1[3:] == lines2[3:]: + # We don't want to update the probes just because of a probeinterface version update + # or because a `probe_ids` entry was added (both are introduced automatically by newer + # probeinterface versions), so we ignore those keys when comparing. + for probe_dict in (new_probe_dict, old_probe_dict): + probe_dict.pop("version", None) + probe_dict.pop("probe_ids", None) + + if new_probe_dict == old_probe_dict: continue else: shutil.copy(f"{temp_probe_json_path}", old_dir / probe_name)