From 3a5a5fa73deb8934f7472c2a38e9447c8b12e3f0 Mon Sep 17 00:00:00 2001 From: "C.A.P. Linssen" Date: Mon, 3 May 2021 20:16:48 +0200 Subject: [PATCH] GitHub Actions debugging --- .github/workflows/nestbuildmatrix.yml | 6 ++++++ pynest/nest/tests/test_visualization.py | 14 +++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nestbuildmatrix.yml b/.github/workflows/nestbuildmatrix.yml index 0d98db8f1b..3990524259 100644 --- a/.github/workflows/nestbuildmatrix.yml +++ b/.github/workflows/nestbuildmatrix.yml @@ -49,6 +49,7 @@ jobs: cpp_compiler: "clang" steps: + - uses: actions/checkout@v2 # Steps represent a sequence of tasks that will be executed as part of the job - name: Checkout repo content @@ -137,3 +138,8 @@ jobs: python extras/parse_build_log.py gha_build.sh.log ${{ github.workspace }} env: xNEST_BUILD_TYPE: FULL + + - name: tmate + if: ${{ failure() }} + uses: mxschmitt/action-tmate@v3 + diff --git a/pynest/nest/tests/test_visualization.py b/pynest/nest/tests/test_visualization.py index b49538b245..c318588934 100644 --- a/pynest/nest/tests/test_visualization.py +++ b/pynest/nest/tests/test_visualization.py @@ -88,8 +88,14 @@ def voltage_trace_verify(self, device): x_data, y_data = line.get_data() # Check that times are correct self.assertEqual(list(x_data), list(np.unique(device.get('events', 'times')))) + print("times:") + print(x_data) + print(list(np.unique(device.get('events', 'times')))) # Check that voltmeter data corresponds to the lines in the plot self.assertTrue(all(np.isclose(ref_vm, y_data))) + print("v_m:") + print(ref_vm) + print(y_data) plt.close(ax.get_figure()) @unittest.skipIf(not PLOTTING_POSSIBLE, 'Plotting impossible because matplotlib or display missing') @@ -102,13 +108,16 @@ def test_voltage_trace_from_device(self): device = nest.Create('voltmeter') nest.Connect(pg, nodes) nest.Connect(device, nodes) + wfwf = nest.Create('spike_recorder') + nest.Connect(pg,wfwf) nest.Simulate(100) # Test with data from device + print("From device:--------------------------------------") nest.voltage_trace.from_device(device) self.voltage_trace_verify(device) - # Test with fata from file + # Test with data from file vm = device.get('events') data = np.zeros([len(vm['senders']), 3]) data[:, 0] = vm['senders'] @@ -116,7 +125,10 @@ def test_voltage_trace_from_device(self): data[:, 2] = vm['V_m'] filename = os.path.join(self.nest_tmpdir(), 'voltage_trace.txt') self.filenames.append(filename) + print("FILENAME::::::::::::::::: " + str(filename)) np.savetxt(filename, data) + + print("From file:--------------------------------------") nest.voltage_trace.from_file(filename) self.voltage_trace_verify(device)