File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Validation
2
+
3
+ on :
4
+ push :
5
+ branches : [main]
6
+ pull_request :
7
+ branches : [main]
8
+
9
+
10
+ jobs :
11
+ validate :
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - uses : actions/checkout@v4
15
+ - uses : actions/setup-python@v5
16
+ - name : Install dependencies
17
+ run : |
18
+ python -m pip install --upgrade pip
19
+ pip install jsonschema requests
Original file line number Diff line number Diff line change
1
+ import glob
2
+ import jsonschema
3
+ import json
4
+ import requests
5
+
6
+ schema_url = "https://raw.githubusercontent.com/SpikeInterface/probeinterface/main/resources/probe.json.schema"
7
+
8
+ response = requests .get (schema_url )
9
+ response .raise_for_status ()
10
+
11
+ files = glob .glob ("*/*/*.json" )
12
+
13
+ print ("Validating the following files:" )
14
+ for file in files :
15
+ print (file )
16
+ with open (file ) as f :
17
+ data = json .load (f )
18
+ jsonschema .validate (data , response .json ())
You can’t perform that action at this time.
0 commit comments