Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,17 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ 3.9 ]
python-version: [ "3.10" ]
engine:
- Arbor
- "Brian2:2.4"
- Brian2
- EDEN
- "NEST:2.20.0"
- "NEST:3.3"
- PyNEST
- PyNEST:2.20.0
- PyNEST:3.1
- "NEURON:7.8.2"
- "PyNEURON:8.0.2"
- "NEURON"
- "PyNEURON:8.2.6"
- PyNN
- PyNN_Brian2
- PyNN_NEURON
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Run simple OMV tests
run: |
omv install pyNeuroML
omv test -V utilities/tests/.test.ex9.jnmlbrian2.omt
omv test -V utilities/tests/.test.exIzh.jnmlnetpyne.omt


- name: OMV final version info
Expand Down
1 change: 0 additions & 1 deletion omv/engines/getnetpyne.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def install_netpyne(version=None):

with working_dir(path):
if sys.version_info.major == 2:
# pip_install([]'setuptools==42.0.1')
pip_install(
[
"kiwisolver==1.0.1",
Expand Down
5 changes: 2 additions & 3 deletions omv/engines/getnrn.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import os
import sys
from subprocess import check_output as co
from distutils.core import run_setup
from omv.common.inout import inform
from omv.common.inout import pip_install

Expand All @@ -11,7 +10,7 @@
def install_neuron(version):
if not version:
if sys.version_info.major == 3:
version = "8.2.2" # for pynn 0.11.0
version = "8.2.6" # for pynn 0.11.0
else:
version = "7.6"

Expand Down Expand Up @@ -57,4 +56,4 @@ def install_neuron(version):
print(co(["make", "install"]))

os.chdir("src/nrnpython")
run_setup("./setup.py", ["install"])
print(co(["pip", "install", "."]))
4 changes: 2 additions & 2 deletions omv/validation/rx_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def __init__(self):

def generate_schema(self, schema_src):
schema = self.parse_yaml_file(schema_src)
print("generating schema from %s" % schema)
print("Generating schema from %s" % schema)
return self.rx.make_schema(schema)

def parse_yaml_file(self, fname):
Expand All @@ -18,7 +18,7 @@ def parse_yaml_file(self, fname):

def validate(self, schema_src, doc_src):
doc = self.parse_yaml_file(doc_src)
print("validating document %s" % doc)
print("Validating the document: %s" % doc)
return self.generate_schema(schema_src).check(doc)


Expand Down
10 changes: 7 additions & 3 deletions omv/validation/validate.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from os.path import splitext, basename
from os.path import splitext, basename, dirname
from omv.validation.rx_validator import RXSchemaValidator
from omv.validation.utils import topological_sort, all_types_in_schema
from pkg_resources import resource_filename


class OMVValidator(RXSchemaValidator):

def __init__(self):
super(OMVValidator, self).__init__()
self.add_osb_prefix()
Expand All @@ -18,7 +18,11 @@ def register_osb_types(self):
self.omv_types = {}
from glob import glob

typedir = resource_filename("omv", "schemata/types/")
#typedir = resource_filename("omv", "schemata/types/")
typedir = dirname(dirname(__file__)) + "/schemata/types/"

print("Type directory: %s"%typedir)

for omv in glob(typedir + "*.yaml") + glob(typedir + "/base/*.yaml"):
tag = self.prefix + splitext(basename(omv))[0]
print("registering", tag)
Expand Down
5 changes: 3 additions & 2 deletions omv/validation/validate_mep.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#!/usr/bin/env python
import sys
from omv.validation.validate import OMVValidator
from pkg_resources import resource_filename
from os.path import dirname


def validate(mep_src):
s = OMVValidator()
print("Validating document againt mep schema: ")
schema = resource_filename("omv", "schemata/mep.yaml")
#schema = resource_filename("omv", "schemata/mep.yaml")
schema = dirname(dirname(__file__)) + "/schemata/mep.yaml"
print(s.validate(schema, mep_src))


Expand Down
5 changes: 3 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = OSBModelValidation
version = 0.3.3
version = 0.3.4
author = Boris Marin, Padraig Gleeson
author_email = [email protected]
url = https://github.com/OpenSourceBrain/osb-model-validation
Expand Down Expand Up @@ -29,7 +29,6 @@ install_requires =
pathlib; python_version<'3.4'
docopt
importlib-metadata; python_version<'3.8'
setuptools

packages = find:

Expand All @@ -43,9 +42,11 @@ console_scripts =

[options.package_data]
* =
schemata/*
*.yaml
*.g



[flake8]
ignore = E501, E502, F403, F405
Loading