From 0250f6ab729a5bf8143538c3ed78b5124b96ec98 Mon Sep 17 00:00:00 2001 From: Padraig Gleeson Date: Mon, 2 Sep 2024 14:51:26 +0100 Subject: [PATCH 01/11] Use py 3.10 for all --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c5870ee..89ea1d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ 3.9 ] + python-version: [ "3.10" ] engine: - Arbor - "Brian2:2.4" From 98bd40aabf8fbcf9cc30b1bd262fee503feac8d8 Mon Sep 17 00:00:00 2001 From: Padraig Gleeson Date: Mon, 2 Sep 2024 14:54:14 +0100 Subject: [PATCH 02/11] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 89ea1d1..e9da72f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: - PyNEST:2.20.0 - PyNEST:3.1 - "NEURON:7.8.2" - - "PyNEURON:8.0.2" + - "PyNEURON:8.2.6" - PyNN - PyNN_Brian2 - PyNN_NEURON From f81ce1d4952c6c865f2dfae5de3b4db9e9350dc8 Mon Sep 17 00:00:00 2001 From: pgleeson Date: Mon, 2 Sep 2024 15:37:15 +0100 Subject: [PATCH 03/11] Just test latest neuron --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e9da72f..7bdd8b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: - PyNEST - PyNEST:2.20.0 - PyNEST:3.1 - - "NEURON:7.8.2" + - "NEURON" - "PyNEURON:8.2.6" - PyNN - PyNN_Brian2 From cab29131c29cf489078274aa6d5d6a0b778b0e00 Mon Sep 17 00:00:00 2001 From: pgleeson Date: Mon, 2 Sep 2024 15:37:55 +0100 Subject: [PATCH 04/11] No setuptools requirement --- omv/engines/getnetpyne.py | 1 - setup.cfg | 1 - 2 files changed, 2 deletions(-) diff --git a/omv/engines/getnetpyne.py b/omv/engines/getnetpyne.py index 1146bc1..91171ed 100644 --- a/omv/engines/getnetpyne.py +++ b/omv/engines/getnetpyne.py @@ -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", diff --git a/setup.cfg b/setup.cfg index c7cfb4b..9240c7f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,7 +29,6 @@ install_requires = pathlib; python_version<'3.4' docopt importlib-metadata; python_version<'3.8' - setuptools packages = find: From 9a230a89dc33b6e4b1efc7d263de4eeace063eda Mon Sep 17 00:00:00 2001 From: pgleeson Date: Mon, 2 Sep 2024 16:05:52 +0100 Subject: [PATCH 05/11] Don't use pkg_resources...; fixes install of schema docs --- .github/workflows/ci_versions.yml | 2 +- omv/validation/rx_validator.py | 4 ++-- omv/validation/validate.py | 10 +++++++--- setup.cfg | 2 ++ 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci_versions.yml b/.github/workflows/ci_versions.yml index 373970c..2f44d15 100644 --- a/.github/workflows/ci_versions.yml +++ b/.github/workflows/ci_versions.yml @@ -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 diff --git a/omv/validation/rx_validator.py b/omv/validation/rx_validator.py index aded84b..bb35040 100644 --- a/omv/validation/rx_validator.py +++ b/omv/validation/rx_validator.py @@ -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): @@ -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) diff --git a/omv/validation/validate.py b/omv/validation/validate.py index 7bf27dd..2c9ee48 100644 --- a/omv/validation/validate.py +++ b/omv/validation/validate.py @@ -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() @@ -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) diff --git a/setup.cfg b/setup.cfg index 9240c7f..a35f1cf 100644 --- a/setup.cfg +++ b/setup.cfg @@ -42,9 +42,11 @@ console_scripts = [options.package_data] * = + schemata/* *.yaml *.g + [flake8] ignore = E501, E502, F403, F405 From 26973b3b45ad1393ab624d947671d2a48c1c6fd7 Mon Sep 17 00:00:00 2001 From: pgleeson Date: Mon, 23 Sep 2024 14:26:25 +0100 Subject: [PATCH 06/11] Remove nest 2.20 - not workign with py 3.10 --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7bdd8b6..e43894a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,6 @@ jobs: - "Brian2:2.4" - Brian2 - EDEN - - "NEST:2.20.0" - "NEST:3.3" - PyNEST - PyNEST:2.20.0 From 7fdc3a52f7c2f004c313a372775fbf8dcd87b3a0 Mon Sep 17 00:00:00 2001 From: pgleeson Date: Mon, 23 Sep 2024 14:26:43 +0100 Subject: [PATCH 07/11] Remove pkg_resources --- omv/validation/validate_mep.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/omv/validation/validate_mep.py b/omv/validation/validate_mep.py index a2000b7..42808d1 100755 --- a/omv/validation/validate_mep.py +++ b/omv/validation/validate_mep.py @@ -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)) From 7faa411200626cf2fba32986a4ad4d3ba14af47a Mon Sep 17 00:00:00 2001 From: pgleeson Date: Mon, 23 Sep 2024 14:26:54 +0100 Subject: [PATCH 08/11] To v0.3.4 --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index a35f1cf..76add28 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = OSBModelValidation -version = 0.3.3 +version = 0.3.4 author = Boris Marin, Padraig Gleeson author_email = borismarin@gmail.com url = https://github.com/OpenSourceBrain/osb-model-validation From ac46e1e0741ff2047f409cbdb2791f4a002d17d9 Mon Sep 17 00:00:00 2001 From: pgleeson Date: Tue, 24 Sep 2024 12:49:08 +0100 Subject: [PATCH 09/11] Remove another test on nest 2.20 --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e43894a..20b33a1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,6 @@ jobs: - EDEN - "NEST:3.3" - PyNEST - - PyNEST:2.20.0 - PyNEST:3.1 - "NEURON" - "PyNEURON:8.2.6" From df4dd36d2c066debcb7746229aa4666fee897368 Mon Sep 17 00:00:00 2001 From: pgleeson Date: Tue, 24 Sep 2024 12:49:20 +0100 Subject: [PATCH 10/11] Fix nrn install error --- omv/engines/getnrn.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/omv/engines/getnrn.py b/omv/engines/getnrn.py index f4b3e2f..5778c05 100644 --- a/omv/engines/getnrn.py +++ b/omv/engines/getnrn.py @@ -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 @@ -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", "."])) From 6cfa63b469accb0b19e0a0b23aef13983d47b3fd Mon Sep 17 00:00:00 2001 From: Padraig Gleeson Date: Tue, 26 Nov 2024 11:18:06 +0000 Subject: [PATCH 11/11] Test with nrn 8.2.6 --- omv/engines/getnrn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omv/engines/getnrn.py b/omv/engines/getnrn.py index 5778c05..586ce71 100644 --- a/omv/engines/getnrn.py +++ b/omv/engines/getnrn.py @@ -10,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"