Skip to content

Commit

Permalink
Merge branch 'development' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjayankur31 authored Sep 30, 2024
2 parents 14efdb7 + ae7d8f0 commit 5a3e4e0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ pyNeuroML
[![GitHub Org's stars](https://img.shields.io/github/stars/NeuroML?style=social)](https://github.com/NeuroML)
[![Twitter Follow](https://img.shields.io/twitter/follow/NeuroML?style=social)](https://twitter.com/NeuroML)
[![Gitter](https://badges.gitter.im/NeuroML/community.svg)](https://gitter.im/NeuroML/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![DOI](https://zenodo.org/badge/27832592.svg)](https://zenodo.org/doi/10.5281/zenodo.5744044)

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-17-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
Expand Down
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

0 comments on commit 5a3e4e0

Please sign in to comment.