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
4 changes: 2 additions & 2 deletions pyneuroml/pynml.py
Original file line number Diff line number Diff line change
Expand Up @@ -874,13 +874,13 @@ def _evaluate_arguments(args):

exit(0)
elif args.validate:
file_types = ["nml"]
file_types = ["nml","xml"]
pre_args = "-validate"
exit_on_fail = True
run_multi = True

elif args.validatev1:
file_types = ["nml"]
file_types = ["nml","xml"]
pre_args = "-validatev1"
exit_on_fail = True
run_multi = True
Expand Down
7 changes: 2 additions & 5 deletions pyneuroml/runners.py
Original file line number Diff line number Diff line change
Expand Up @@ -770,14 +770,11 @@ def run_jneuroml(
return False

if report_jnml_output:
logger.debug(
logger.info(
"Successfully ran the following command using pyNeuroML v%s: \n %s"
% (__version__, command)
)
logger.debug("Output:\n\n%s" % output)

# except KeyboardInterrupt as e:
# raise e
logger.info("Output:\n\n%s" % output)

except Exception as e:
logger.error("*** Execution of jnml has failed! ***")
Expand Down
13 changes: 7 additions & 6 deletions pyneuroml/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)

try:
import libsedml
except ModuleNotFoundError:
logger.warning("Please install optional dependencies to use SED-ML features:")
logger.warning("pip install pyneuroml[combine]")


MAX_COLOUR = (255, 0, 0) # type: typing.Tuple[int, int, int]
MIN_COLOUR = (255, 255, 0) # type: typing.Tuple[int, int, int]
Expand Down Expand Up @@ -721,6 +715,13 @@ def get_model_file_list(
lems_def_dir = get_model_file_list(inc, filelist, rootdir, lems_def_dir)

elif rootfile.endswith(".sedml"):

try:
import libsedml
except ModuleNotFoundError:
logger.error("Please install optional dependencies to use SED-ML features:")
logger.error("pip install pyneuroml[combine]")

if pathlib.Path(rootfile).is_absolute():
rootdoc = libsedml.readSedMLFromFile(rootfile)
else:
Expand Down
Loading