diff --git a/.github/workflows/python_actions.yml b/.github/workflows/python_actions.yml index d97e3c5..bdbf609 100644 --- a/.github/workflows/python_actions.yml +++ b/.github/workflows/python_actions.yml @@ -59,8 +59,13 @@ jobs: - name: Setup uses: ./support/actions/run-install - #- name: Setup PyNN - # uses: ./support/actions/pynn-setup + - name: Setup PyNN + uses: ./support/actions/pynn-setup + + - name: Create a spynnaker.cfg + uses: ./support/actions/configure-spynnaker + with: + virtual: true - name: Test with nbmake run: pytest --nbmake **/*ipynb \ No newline at end of file diff --git a/Play/simple.ipynb b/Play/simple.ipynb new file mode 100644 index 0000000..0ad1781 --- /dev/null +++ b/Play/simple.ipynb @@ -0,0 +1,61 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "import pyNN.spiNNaker as sim\n", + "\n", + "sim.setup(timestep=1.0)\n", + "sim.set_number_of_neurons_per_core(sim.IF_curr_exp, 100)\n", + "\n", + "pop_1 = sim.Population(1, sim.IF_curr_exp(), label=\"pop_1\")\n", + "input_pop = sim.Population(\n", + " 1, sim.SpikeSourceArray(spike_times=[0]), label=\"input\")\n", + "input_proj = sim.Projection(input_pop, pop_1, sim.OneToOneConnector(),\n", + " synapse_type=sim.StaticSynapse(weight=5, delay=1))\n", + "pop_1.record([\"spikes\", \"v\"])\n", + "simtime = 10\n", + "sim.run(simtime)\n", + "sim.end()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "outputs": [], + "source": [], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + } + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file