Skip to content

Commit

Permalink
updated Brian2, NEURON, pyNeuroML
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrkarr committed Feb 22, 2022
1 parent 99bf500 commit 5b7113b
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 21 deletions.
4 changes: 2 additions & 2 deletions Dockerfile-brian2
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Base OS
FROM ghcr.io/biosimulators/biosimulators_pyneuroml/pyneuroml:latest

ARG VERSION=0.0.15
ARG SIMULATOR_VERSION="2.5.0.1"
ARG VERSION=0.0.16
ARG SIMULATOR_VERSION="2.5.0.3"

# metadata
LABEL \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-netpyne
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Base OS
FROM ghcr.io/biosimulators/biosimulators_pyneuroml/neuron:latest

ARG VERSION=0.0.15
ARG VERSION=0.0.16
ARG SIMULATOR_VERSION="1.0.0.2"

# metadata
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile-neuron
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Base OS
FROM ghcr.io/biosimulators/biosimulators_pyneuroml/pyneuroml:latest

ARG VERSION=0.0.15
ARG SIMULATOR_VERSION="8.0.0"
ARG VERSION=0.0.16
ARG SIMULATOR_VERSION="8.0.2"

# metadata
LABEL \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile-pyneuroml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Base OS
FROM python:3.9-slim-buster

ARG VERSION=0.0.15
ARG SIMULATOR_VERSION="0.5.18"
ARG VERSION=0.0.16
ARG SIMULATOR_VERSION="0.5.20"

# metadata
LABEL \
Expand Down
4 changes: 2 additions & 2 deletions biosimulators-brian2.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"id": "brian2",
"name": "Brian 2",
"version": "2.5.0.1",
"version": "2.5.0.3",
"description": "Clock-driven simulator for spiking neural networks",
"urls": [{
"type": "Home page",
"url": "https://briansimulator.org"
}],
"image": {
"url": "ghcr.io/biosimulators/biosimulators_pyneuroml/brian2:2.5.0.1",
"url": "ghcr.io/biosimulators/biosimulators_pyneuroml/brian2:2.5.0.3",
"format": {
"namespace": "EDAM",
"id": "format_3973",
Expand Down
4 changes: 2 additions & 2 deletions biosimulators-neuron.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "neuron",
"name": "NEURON",
"version": "8.0.0",
"version": "8.0.2",
"description": "Empirically-based simulator for modeling neurons and networks of neurons.",
"urls": [
{
Expand All @@ -10,7 +10,7 @@
}
],
"image": {
"url": "ghcr.io/biosimulators/biosimulators_pyneuroml/neuron:8.0.0",
"url": "ghcr.io/biosimulators/biosimulators_pyneuroml/neuron:8.0.2",
"format": {
"namespace": "EDAM",
"id": "format_3973",
Expand Down
4 changes: 2 additions & 2 deletions biosimulators-pyneuroml.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "pyneuroml",
"name": "pyNeuroML",
"version": "0.5.18",
"version": "0.5.20",
"description": "Python package for reading, writing, simulating and analysing NeuroML2/LEMS models.",
"urls": [
{
Expand All @@ -10,7 +10,7 @@
}
],
"image": {
"url": "ghcr.io/biosimulators/biosimulators_pyneuroml/pyneuroml:0.5.18",
"url": "ghcr.io/biosimulators/biosimulators_pyneuroml/pyneuroml:0.5.20",
"format": {
"namespace": "EDAM",
"id": "format_3973",
Expand Down
2 changes: 1 addition & 1 deletion biosimulators_pyneuroml/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.0.15'
__version__ = '0.0.16'
7 changes: 2 additions & 5 deletions biosimulators_pyneuroml/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def set_sim_in_lems_xml(simulation_xml, task, variables, simulator=Simulator.pyn
simulation = task.simulation

# modify simulation
if simulator in [Simulator.brian2, Simulator.netpyne]:
if simulator in [Simulator.netpyne]:
length = simulation.output_end_time + (simulation.output_end_time - simulation.output_start_time) * 1 / simulation.number_of_steps
steps = (simulation.output_end_time - simulation.output_start_time) / simulation.number_of_steps
else:
Expand Down Expand Up @@ -421,10 +421,7 @@ def read_lems_output_files(output_file_configs, output_files_dirname='.', simula
:obj:`dict` of :obj:`str` => :obj:`pandas.DataFrame`: dictionary that maps the id of each output file
to a Pandas data frame with its value
"""
if simulator == Simulator.brian2:
sep = ' '
else:
sep = '\t'
sep = '\t'

results = {}
for output_file_config in output_file_configs:
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
biosimulators_utils[neuroml,lems,logging] >= 0.1.147
kisao
lxml
netpyne <= 1.0.0.2
numpy
psutil
pyneuroml >= 0.5.18, < 0.5.19
pyneuroml >= 0.5.20
5 changes: 4 additions & 1 deletion tests/test_core_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,10 @@ def _build_combine_archive(self, algorithm=None):
def _assert_variable_results(self, task, variables, results):
sim = task.simulation
self.assertTrue(set(results.keys()), set([var.id for var in variables]))
numpy.testing.assert_allclose(results['time'], numpy.linspace(sim.output_start_time, sim.output_end_time, sim.number_of_points + 1))
numpy.testing.assert_allclose(
results['time'],
numpy.linspace(sim.output_start_time, sim.output_end_time, sim.number_of_points + 1)
)
for result in results.values():
self.assertEqual(result.shape, (sim.number_of_points + 1,))
self.assertFalse(numpy.any(numpy.isnan(result)))
Expand Down

0 comments on commit 5b7113b

Please sign in to comment.