-
Notifications
You must be signed in to change notification settings - Fork 11
Description
osb-model-validation/omv/common/inout.py
Line 123 in 064de65
| inform( |
I was looking at the output of validate and noticed that it repeats the error message, making it harder to understand. Eg:
omv test .test.validate.omt
[omv]
[omv] Running the tests defined in .test.validate.omt
[omv] ===============================================
[omv] No mep file specified. Will only run simulation using: jNeuroML_validate
[omv] Found 1 experiment(s) to run on engine: jNeuroML_validate
Found path: /home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/cat_mig.channel.nml
Found path: /home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/cal_mig.channel.nml
Found path: /home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/can_mig.channel.nml
Found path: /home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/cadad.channel.nml
Found path: /home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/h_kole.channel.nml
[omv] Running with jNeuroML_validate, using: ['/home/asinha/.local/share/virtualenvs/neuroml-dev-313/bin/jnml', '-validate', '/home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/cat_mig.channel.nml', '/home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/cal_mig.channel.nml', '/home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/can_mig.channel.nml', '/home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/cadad.channel.nml', '/home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/h_kole.channel.nml']...
[omv] Running the commands: [/home/asinha/.local/share/virtualenvs/neuroml-dev-313/bin/jnml -validate /home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/cat_mig.channel.nml /home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/cal_mig.channel.nml /home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/can_mig.channel.nml /home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/cadad.channel.nml /home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/h_kole.channel.nml] in (/home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels; cwd=/home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels; shell=False; env={'JNML_HOME': PosixPath('/home/asinha/.local/share/virtualenvs/neuroml-dev-313/bin')})
[omv] CalledProcessError running commands: ['/home/asinha/.local/share/virtualenvs/neuroml-dev-313/bin/jnml', '-validate', '/home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/cat_mig.channel.nml', '/home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/cal_mig.channel.nml', '/home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/can_mig.channel.nml', '/home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/cadad.channel.nml', '/home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/h_kole.channel.nml'] in /home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels (return code: 1), output:
b'####################################################################\n jNeuroML v0.14.0\nValidating: /home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/cat_mig.channel.nml\nValid against schema and all tests\nNo warnings\nValidating: /home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/cal_mig.channel.nml\nFile: /home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/cal_mig.channel.nml is not valid against the schema: /Schemas/NeuroML2/NeuroML_v2.3.1.xsd!!\n Error when parsing against Schema (class org.xml.sax.SAXParseException): \n\n cvc-complex-type.2.4.a: Invalid content was found starting with element \'{"http://www.neuroml.org/schema/neuroml2":ConductanceScalingCaDependent}\'.\n One of \'{"http://www.neuroml.org/schema/neuroml2":notes, "http://www.neuroml.org/schema/neuroml2":property, "http://www.neuroml.org/schema/neuroml2":annotation, "http://www.neuroml.org/schema/neuroml2":q10ConductanceScaling, "http://www.neuroml.org/schema/neuroml2":gate, "http://www.neuroml.org/schema/neuroml2":gateHHrates, "http://www.neuroml.org/schema/neuroml2":gateHHratesTau, "http://www.neuroml.org/schema/neuroml2":gateHHtauInf, "http://www.neuroml.org/schema/neuroml2":gateHHratesInf, "http://www.neuroml.org/schema/neuroml2":gateHHratesTauInf, "http://www.neuroml.org/schema/neuroml2":gateHHInstantaneous, "http://www.neuroml.org/schema/neuroml2":gateFractional}\' is expected.\n\n Note 1: if the above mentioned element is not a part of the core NeuroML elements, then the document can\'t be validated against the Schema. This may not matter if a definition in LEMS is available for that element (e.g. a new ComponentType has been defined and included) and the model should be able to run in simulators that support new LEMS elements.\n\n Note 2: If the element giving trouble is a core NeuroML element, remember that when validating with the NeuroML Schema, the order of the elements is important. Try switching the order of the above mentioned elements in line with how they are defined in the Schema, keeping elements of the same type together.\n\nValidating: /home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/can_mig.channel.nml\nFile: /home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/can_mig.channel.nml is not valid against the schema: /Schemas/NeuroML2/NeuroML_v2.3.1.xsd!!\n Error when parsing against Schema (class org.xml.sax.SAXParseException): \n\n cvc-complex-type.2.4.a: Invalid content was found starting with element \'{"http://www.neuroml.org/schema/neuroml2":ConductanceScalingCaDependent}\'.\n One of \'{"http://www.neuroml.org/schema/neuroml2":notes, "http://www.neuroml.org/schema/neuroml2":property, "http://www.neuroml.org/schema/neuroml2":annotation, "http://www.neuroml.org/schema/neuroml2":q10ConductanceScaling, "http://www.neuroml.org/schema/neuroml2":gate, "http://www.neuroml.org/schema/neuroml2":gateHHrates, "http://www.neuroml.org/schema/neuroml2":gateHHratesTau, "http://www.neuroml.org/schema/neuroml2":gateHHtauInf, "http://www.neuroml.org/schema/neuroml2":gateHHratesInf, "http://www.neuroml.org/schema/neuroml2":gateHHratesTauInf, "http://www.neuroml.org/schema/neuroml2":gateHHInstantaneous, "http://www.neuroml.org/schema/neuroml2":gateFractional}\' is expected.\n\n Note 1: if the above mentioned element is not a part of the core NeuroML elements, then the document can\'t be validated against the Schema. This may not matter if a definition in LEMS is available for that element (e.g. a new ComponentType has been defined and included) and the model should be able to run in simulators that support new LEMS elements.\n\n Note 2: If the element giving trouble is a core NeuroML element, remember that when validating with the NeuroML Schema, the order of the elements is important. Try switching the order of the above mentioned elements in line with how they are defined in the Schema, keeping elements of the same type together.\n\nValidating: /home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/cadad.channel.nml\nFile: /home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/cadad.channel.nml is not valid against the schema: /Schemas/NeuroML2/NeuroML_v2.3.1.xsd!!\n Error when parsing against Schema (class org.xml.sax.SAXParseException): \n\n cvc-complex-type.2.4.a: Invalid content was found starting with element \'{"http://www.neuroml.org/schema/neuroml2":Text}\'.\n One of \'{"http://www.neuroml.org/schema/neuroml2":Requirement, "http://www.neuroml.org/schema/neuroml2":InstanceRequirement, "http://www.neuroml.org/schema/neuroml2":Dynamics}\' is expected.\n\n Note 1: if the above mentioned element is not a part of the core NeuroML elements, then the document can\'t be validated against the Schema. This may not matter if a definition in LEMS is available for that element (e.g. a new ComponentType has been defined and included) and the model should be able to run in simulators that support new LEMS elements.\n\n Note 2: If the element giving trouble is a core NeuroML element, remember that when validating with the NeuroML Schema, the order of the elements is important. Try switching the order of the above mentioned elements in line with how they are defined in the Schema, keeping elements of the same type together.\n\nValidating: /home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/h_kole.channel.nml\nValid against schema and all tests\nNo warnings\n\nValidated 5 files: 2 passed, 3 failed\n\n\n####################################################################\n'
[omv] Error: Command '['/home/asinha/.local/share/virtualenvs/neuroml-dev-313/bin/jnml', '-validate', '/home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/cat_mig.channel.nml', '/home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/cal_mig.channel.nml', '/home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/can_mig.channel.nml', '/home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/cadad.channel.nml', '/home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/h_kole.channel.nml']' returned non-zero exit status 1.
[omv] --------------------------------------
[omv] ERROR running engine jNeuroML_validate
[omv] --------------------------------------
[omv] +++++++++++++++++++++ Error info ++++++++++++++++++
[omv] Return code: 1
[omv] Output: ####################################################################
[omv] .test.validate.omt > jNeuroML v0.14.0
[omv] .test.validate.omt > Validating: /home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/cat_mig.channel.nml
[omv] .test.validate.omt > Valid against schema and all tests
[omv] .test.validate.omt > No warnings
[omv] .test.validate.omt > Validating: /home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/cal_mig.channel.nml
[omv] .test.validate.omt > File: /home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/cal_mig.channel.nml is not valid against the schema: /Schemas/NeuroML2/NeuroML_v2.3.1.xsd!!
[omv] .test.validate.omt > Error when parsing against Schema (class org.xml.sax.SAXParseException):
[omv] .test.validate.omt >
[omv] .test.validate.omt > cvc-complex-type.2.4.a: Invalid content was found starting with element '{"http://www.neuroml.org/schema/neuroml2":ConductanceScalingCaDependent}'.
[omv] .test.validate.omt > One of '{"http://www.neuroml.org/schema/neuroml2":notes, "http://www.neuroml.org/schema/neuroml2":property, "http://www.neuroml.org/schema/neuroml2":annotation, "http://www.neuroml.org/schema/neuroml2":q10ConductanceScaling, "http://www.neuroml.org/schema/neuroml2":gate, "http://www.neuroml.org/schema/neuroml2":gateHHrates, "http://www.neuroml.org/schema/neuroml2":gateHHratesTau, "http://www.neuroml.org/schema/neuroml2":gateHHtauInf, "http://www.neuroml.org/schema/neuroml2":gateHHratesInf, "http://www.neuroml.org/schema/neuroml2":gateHHratesTauInf, "http://www.neuroml.org/schema/neuroml2":gateHHInstantaneous, "http://www.neuroml.org/schema/neuroml2":gateFractional}' is expected.
[omv] .test.validate.omt >
[omv] .test.validate.omt > Note 1: if the above mentioned element is not a part of the core NeuroML elements, then the document can't be validated against the Schema. This may not matter if a definition in LEMS is available for that element (e.g. a new ComponentType has been defined and included) and the model should be able to run in simulators that support new LEMS elements.
[omv] .test.validate.omt >
[omv] .test.validate.omt > Note 2: If the element giving trouble is a core NeuroML element, remember that when validating with the NeuroML Schema, the order of the elements is important. Try switching the order of the above mentioned elements in line with how they are defined in the Schema, keeping elements of the same type together.
[omv] .test.validate.omt >
[omv] .test.validate.omt > Validating: /home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/can_mig.channel.nml
[omv] .test.validate.omt > File: /home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/can_mig.channel.nml is not valid against the schema: /Schemas/NeuroML2/NeuroML_v2.3.1.xsd!!
[omv] .test.validate.omt > Error when parsing against Schema (class org.xml.sax.SAXParseException):
[omv] .test.validate.omt >
[omv] .test.validate.omt > cvc-complex-type.2.4.a: Invalid content was found starting with element '{"http://www.neuroml.org/schema/neuroml2":ConductanceScalingCaDependent}'.
[omv] .test.validate.omt > One of '{"http://www.neuroml.org/schema/neuroml2":notes, "http://www.neuroml.org/schema/neuroml2":property, "http://www.neuroml.org/schema/neuroml2":annotation, "http://www.neuroml.org/schema/neuroml2":q10ConductanceScaling, "http://www.neuroml.org/schema/neuroml2":gate, "http://www.neuroml.org/schema/neuroml2":gateHHrates, "http://www.neuroml.org/schema/neuroml2":gateHHratesTau, "http://www.neuroml.org/schema/neuroml2":gateHHtauInf, "http://www.neuroml.org/schema/neuroml2":gateHHratesInf, "http://www.neuroml.org/schema/neuroml2":gateHHratesTauInf, "http://www.neuroml.org/schema/neuroml2":gateHHInstantaneous, "http://www.neuroml.org/schema/neuroml2":gateFractional}' is expected.
[omv] .test.validate.omt >
[omv] .test.validate.omt > Note 1: if the above mentioned element is not a part of the core NeuroML elements, then the document can't be validated against the Schema. This may not matter if a definition in LEMS is available for that element (e.g. a new ComponentType has been defined and included) and the model should be able to run in simulators that support new LEMS elements.
[omv] .test.validate.omt >
[omv] .test.validate.omt > Note 2: If the element giving trouble is a core NeuroML element, remember that when validating with the NeuroML Schema, the order of the elements is important. Try switching the order of the above mentioned elements in line with how they are defined in the Schema, keeping elements of the same type together.
[omv] .test.validate.omt >
[omv] .test.validate.omt > Validating: /home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/cadad.channel.nml
[omv] .test.validate.omt > File: /home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/cadad.channel.nml is not valid against the schema: /Schemas/NeuroML2/NeuroML_v2.3.1.xsd!!
[omv] .test.validate.omt > Error when parsing against Schema (class org.xml.sax.SAXParseException):
[omv] .test.validate.omt >
[omv] .test.validate.omt > cvc-complex-type.2.4.a: Invalid content was found starting with element '{"http://www.neuroml.org/schema/neuroml2":Text}'.
[omv] .test.validate.omt > One of '{"http://www.neuroml.org/schema/neuroml2":Requirement, "http://www.neuroml.org/schema/neuroml2":InstanceRequirement, "http://www.neuroml.org/schema/neuroml2":Dynamics}' is expected.
[omv] .test.validate.omt >
[omv] .test.validate.omt > Note 1: if the above mentioned element is not a part of the core NeuroML elements, then the document can't be validated against the Schema. This may not matter if a definition in LEMS is available for that element (e.g. a new ComponentType has been defined and included) and the model should be able to run in simulators that support new LEMS elements.
[omv] .test.validate.omt >
[omv] .test.validate.omt > Note 2: If the element giving trouble is a core NeuroML element, remember that when validating with the NeuroML Schema, the order of the elements is important. Try switching the order of the above mentioned elements in line with how they are defined in the Schema, keeping elements of the same type together.
[omv] .test.validate.omt >
[omv] .test.validate.omt > Validating: /home/asinha/Documents/02_Code/00_mine/models/Macaque_auditory_thalamocortical_model_data/NeuroML2/channels/h_kole.channel.nml
[omv] .test.validate.omt > Valid against schema and all tests
[omv] .test.validate.omt > No warnings
[omv] .test.validate.omt >
[omv] .test.validate.omt > Validated 5 files: 2 passed, 3 failed
[omv] .test.validate.omt >
[omv] .test.validate.omt >
[omv] .test.validate.omt > ####################################################################
[omv] .test.validate.omt >
[omv] +++++++++++++++++++++++++++++++++++++++++++++++++++
[omv]
[omv] Test failed: .test.validate.omt
[omv] ===============================
[omv] Failed due to non passing tests
I see that the code in the line referenced enough uses inform to print the error twice. Do we need this, or can we remove one of them to make the error only be printed once?