From 6d7e45e7db0924b5f96c9c44e9b43a5c12dd05c2 Mon Sep 17 00:00:00 2001
From: Padraig Gleeson
Date: Wed, 22 Mar 2023 10:37:56 +0000
Subject: [PATCH 1/7] Tweak test script to pip install
---
test-ghactions.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test-ghactions.sh b/test-ghactions.sh
index 0fd0c846..df71fa6b 100755
--- a/test-ghactions.sh
+++ b/test-ghactions.sh
@@ -1,6 +1,6 @@
set -e
-python setup.py install
+pip install .
echo
echo "################################################"
From 333634a66f0f29ffe183552e49df8eb25d4e9641 Mon Sep 17 00:00:00 2001
From: Padraig Gleeson
Date: Wed, 12 Apr 2023 11:58:25 +0100
Subject: [PATCH 2/7] Ignore arm64 dir on new mac chip
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index cc71c8d6..ac99070f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -151,3 +151,4 @@ examples/results/*.dat
/tests/iv_izh2007RS0.net.nml
/tests/leak_chan.channel.nml
/tests/test_cell_analysis.cell.nml
+arm64
From 3194a9ea1093101954f12827afda8e20da28725c Mon Sep 17 00:00:00 2001
From: pgleeson
Date: Wed, 3 May 2023 13:29:15 +0100
Subject: [PATCH 3/7] Fix some issues with plot (was using marker='o' by
default)
---
pyneuroml/plot/Plot.py | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/pyneuroml/plot/Plot.py b/pyneuroml/plot/Plot.py
index 0e84a88f..9387aa6a 100644
--- a/pyneuroml/plot/Plot.py
+++ b/pyneuroml/plot/Plot.py
@@ -177,15 +177,14 @@ def generate_plot(
label = "" if not labels else labels[i]
marker = None if not markers else markers[i]
linewidth = 1 if not linewidths else linewidths[i]
- markersize = 6 if not markersizes else markersizes[i]
+ markersize = None if not markersizes else markersizes[i]
if colors:
plt.plot(
xvalues[i],
yvalues[i],
- "o",
- color=colors[i],
marker=marker,
+ color=colors[i],
markersize=markersize,
linestyle=linestyle,
linewidth=linewidth,
@@ -195,7 +194,6 @@ def generate_plot(
plt.plot(
xvalues[i],
yvalues[i],
- "o",
marker=marker,
markersize=markersize,
linestyle=linestyle,
@@ -385,7 +383,7 @@ def generate_interactive_plot(
raise ValueError("labels not provided correctly")
if not markersizes:
- markersizes = len(xvalues) * [6.0]
+ markersizes = len(xvalues) * [6]
if not markers:
markers = len(xvalues) * [0]
if not linestyles:
From 94e510810de429b8189e8a95dff82c0108e78b55 Mon Sep 17 00:00:00 2001
From: pgleeson
Date: Wed, 3 May 2023 14:05:03 +0100
Subject: [PATCH 4/7] Test without argparse requirement
---
.gitignore | 2 ++
setup.py | 1 -
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index cc0a451f..c8329ab7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -153,3 +153,5 @@ examples/results/*.dat
/tests/test_cell_analysis.cell.nml
arm64
*.neux
+/test_*plot*png
+/examples/plot.py
diff --git a/setup.py b/setup.py
index 7b665516..f5ced29f 100644
--- a/setup.py
+++ b/setup.py
@@ -92,7 +92,6 @@
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
install_requires=[
- "argparse",
"pylems>=0.5.7",
"airspeed>=0.5.5",
"neuromllite>=0.4.1", # sets dependency for libNeuroML also
From e09ec7519b0a79180c515368beff8d1c53398125 Mon Sep 17 00:00:00 2001
From: Padraig Gleeson
Date: Thu, 4 May 2023 10:03:53 +0100
Subject: [PATCH 5/7] Remove travis badge
---
README.md | 2 --
1 file changed, 2 deletions(-)
diff --git a/README.md b/README.md
index 75448d72..0ba2ee55 100644
--- a/README.md
+++ b/README.md
@@ -144,5 +144,3 @@ Builds on [Neurotune](https://github.com/NeuralEnsemble/neurotune) and [pyelectr
Built in viewer of cells in 3D? Mayavi?
More closely tied to PyNN?
-
-[](https://travis-ci.com/NeuroML/pyNeuroML)
From 3af5ab2e7bc25d2de2282b246ef9610efa4d8130 Mon Sep 17 00:00:00 2001
From: Padraig Gleeson
Date: Thu, 4 May 2023 10:38:27 +0100
Subject: [PATCH 6/7] Remove py2.7 in master tests
---
.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 a2162e05..794ab6ee 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- python-version: [2.7, 3.7, 3.8, 3.9]
+ python-version: [3.7, 3.8, 3.9]
fail-fast: false
steps:
From 0e4cbf34f8e0687e6ef6334911ffc774a7ff11cd Mon Sep 17 00:00:00 2001
From: pgleeson
Date: Thu, 4 May 2023 10:55:25 +0100
Subject: [PATCH 7/7] Add plot spike support for nest 3.0 spiketime files
---
pyneuroml/plot/PlotSpikes.py | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/pyneuroml/plot/PlotSpikes.py b/pyneuroml/plot/PlotSpikes.py
index 0534773a..647fa9c7 100644
--- a/pyneuroml/plot/PlotSpikes.py
+++ b/pyneuroml/plot/PlotSpikes.py
@@ -12,9 +12,13 @@
logger = logging.getLogger(__name__)
+FORMAT_ID_T = "id_t"
+FORMAT_ID_TIME_NEST_DAT = "id_t_nest_dat"
+FORMAT_T_ID = "t_id"
+
DEFAULTS = {
- "format": "id_t",
+ "format": FORMAT_ID_T,
"rates": False,
"save_spike_plot_to": None,
"rate_window": 50,
@@ -74,8 +78,9 @@ def process_args():
metavar="",
default=DEFAULTS["format"],
help="How the spiketimes are represented on each line of file: \n"
- + "id_t: id of cell, space(s) / tab(s), time of spike (default);\n"
- + "t_id: time of spike, space(s) / tab(s), id of cell;\n"
+ + "%s: id of cell, space(s) / tab(s), time of spike (default);\n"%FORMAT_ID_T
+ + "%s: id of cell, space(s) / tab(s), time of spike, allowing NEST dat file comments/metadata;\n"%FORMAT_ID_TIME_NEST_DAT
+ + "%s: time of spike, space(s) / tab(s), id of cell;\n"%FORMAT_T_ID
+ "sonata: SONATA format HDF5 file containing spike times",
)
@@ -288,10 +293,10 @@ def run(a=None, **kwargs):
ids_in_file[name] = []
for line in spikes_file:
- if not line.startswith("#"):
- if a.format == "id_t":
+ if not line.startswith("#") and not (line.startswith("sender") and a.format == FORMAT_ID_TIME_NEST_DAT):
+ if a.format == FORMAT_ID_T or a.format == FORMAT_ID_TIME_NEST_DAT:
[id, t] = line.split()
- elif a.format == "t_id":
+ elif a.format == FORMAT_T_ID:
[t, id] = line.split()
id_shifted = offset_id + int(float(id))
max_id = max(max_id, id_shifted)