Skip to content

Commit

Permalink
Merge pull request #5 from bendichter/add_ci
Browse files Browse the repository at this point in the history
add CI
  • Loading branch information
alejoe91 committed Apr 23, 2024
2 parents 675433f + 7ae3e90 commit 36eae45
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Validation

on:
push:
branches: [main]
pull_request:
branches: [main]


jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install jsonschema requests
18 changes: 18 additions & 0 deletions validate_probes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import glob
import jsonschema
import json
import requests

schema_url = "https://raw.githubusercontent.com/SpikeInterface/probeinterface/main/resources/probe.json.schema"

response = requests.get(schema_url)
response.raise_for_status()

files = glob.glob("*/*/*.json")

print("Validating the following files:")
for file in files:
print(file)
with open(file) as f:
data = json.load(f)
jsonschema.validate(data, response.json())

0 comments on commit 36eae45

Please sign in to comment.