Skip to content

Commit

Permalink
Merge pull request #1461 from SpiNNakerManchester/use_build
Browse files Browse the repository at this point in the history
github action fixes
  • Loading branch information
Christian-B authored Jul 12, 2024
2 parents 549948f + da4fa7d commit 0abe490
Show file tree
Hide file tree
Showing 30 changed files with 35 additions and 58 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/c_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
- name: Prepare
uses: SpiNNakerManchester/SupportScripts/actions/prepare@main
with:
python-version: "3.12"
checkout_dependencies: spinnaker_tools spinn_common SpiNNFrontEndCommon
install_dependencies: SpiNNUtils
install_module: false
Expand Down Expand Up @@ -103,7 +102,6 @@ jobs:
- name: Prepare
uses: SpiNNakerManchester/SupportScripts/actions/prepare@main
with:
python-version: "3.12"
install_dependencies: >
SpiNNUtils SpiNNMachine SpiNNMan PACMAN spalloc
SpiNNFrontEndCommon TestBase
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/python_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ jobs:
ubuntu_packages: graphviz
test_directories: unittests
coverage-package: spynnaker
flake8-packages: spynnaker unittests
flake8-packages: spynnaker unittests spynnaker_integration_tests proxy_integration_tests
pylint-packages: spynnaker
mypy-packages: spynnaker
check_prereleases: false
mypy-packages: spynnaker unittests spynnaker_integration_tests proxy_integration_tests
cfg_file: spynnaker
2 changes: 1 addition & 1 deletion proxy_integration_tests/test_python_debug/check_debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from spynnaker.pyNN.data import SpynnakerDataView
from spynnaker.pyNN.extra_algorithms.\
spynnaker_neuron_network_specification_report import (
_GRAPH_NAME) #, _GRAPH_FORMAT)
_GRAPH_NAME)
import pyNN.spiNNaker as sim


Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
[metadata]
name = sPyNNaker
version = attr: spynnaker._version.__version__
description = Tools for simulating neural models generated using PyNN 0.9 on the SpiNNaker platform
description = Tools for simulating neural models generated using PyNN on the SpiNNaker platform
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/SpiNNakerManchester/SpyNNaker
Expand Down
2 changes: 1 addition & 1 deletion spynnaker/pyNN/models/populations/population.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def _we_dont_do_this_now(*args): # pylint: disable=unused-argument

class Population(PopulationBase):
"""
PyNN 0.9 population object.
PyNN population object.
"""
# pylint: disable=redefined-builtin
__slots__ = (
Expand Down
22 changes: 0 additions & 22 deletions spynnaker_integration_tests/setup.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.
import pyNN.spiNNaker as p
from spinnaker_testbase import BaseTestCase
from testfixtures import LogCapture
from testfixtures import LogCapture # type: ignore[import]


def a_run():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.
import pyNN.spiNNaker as p
from spinnaker_testbase import BaseTestCase
from testfixtures import LogCapture
from testfixtures import LogCapture # type: ignore[import]


def a_run():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"""
Synfirechain-like example
"""
from testfixtures import LogCapture
from testfixtures import LogCapture # type: ignore[import]
import spynnaker.plot_utils as plot_utils
import spynnaker.spike_checker as spike_checker
from spinnaker_testbase import BaseTestCase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import matplotlib.pyplot as plt
import matplotlib.pyplot as plt # type: ignore[import]
import numpy
from pyNN.utility.plotting import Figure, Panel
import pyNN.spiNNaker as p
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import numpy
import csa
import csa # type: ignore[import]
from spinnaker_testbase.base_test_case import BaseTestCase
import pyNN.spiNNaker as p

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from spinnaker_testbase import BaseTestCase
from pyNN.utility.plotting import Figure, Panel
from pyNN.random import NumpyRNG
import matplotlib.pyplot as plt
import matplotlib.pyplot as plt # type: ignore[import]


def do_run(plot):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from spinnaker_testbase import BaseTestCase
from pyNN.utility.plotting import Figure, Panel
from pyNN.random import NumpyRNG
import matplotlib.pyplot as plt
import matplotlib.pyplot as plt # type: ignore[import]
from spynnaker.pyNN.utilities import neo_convertor


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@
from collections import defaultdict
from random import randint
import time
from typing import Dict
import unittest
import pyNN.spiNNaker as p
from spinnaker_testbase import BaseTestCase


class TestRecordableSpikeInjector(BaseTestCase):

_n_spikes = defaultdict(lambda: 0)
_n_spikes: Dict[int, int] = defaultdict(lambda: 0)
_n_neurons = 100

def _inject(self, label, connection):
Expand Down
4 changes: 2 additions & 2 deletions spynnaker_integration_tests/test_ignores/test_ignores.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_with_actual_ip_address(self):
self.assert_not_spin_three()

# Hack in to set the ignores with used IP address
GetMachineProcess._receive_chip_info = hacked_receive_chip_info
GetMachineProcess._receive_chip_info = hacked_receive_chip_info # type: ignore[method-assign] # noqa: E501

machine = sim.get_machine()
sim.end()
Expand Down Expand Up @@ -101,7 +101,7 @@ def test_with_actual_ip_address(self):

if __name__ == '__main__':
# Hack in to set the ignores with used IP address
GetMachineProcess._receive_chip_info = hacked_receive_chip_info
GetMachineProcess._receive_chip_info = hacked_receive_chip_info # type: ignore[method-assign] # noqa: E501

sim.setup(timestep=1.0, n_boards_required=6)
machine = sim.get_machine()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import numpy
import pyNN.spiNNaker as sim
from pyNN.space import Grid2D
import matplotlib.pyplot as plt
import matplotlib.pyplot as plt # type: ignore[import]
from spinnaker_testbase import BaseTestCase


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import numpy
import pyNN.spiNNaker as sim
from pyNN.space import Grid2D
import matplotlib.pyplot as plt
import matplotlib.pyplot as plt # type: ignore[import]
from spinnaker_testbase import BaseTestCase


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,3 @@ def do_run(self):
if __name__ == '__main__':
me = ManyBoards()
me.do_run()
me.check_all_data()
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"""
Synfirechain-like example
"""
import matplotlib.pyplot as plt
import matplotlib.pyplot as plt # type: ignore[import]
import numpy
from pyNN.utility.plotting import Figure
import spynnaker.spike_checker as spike_checker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"""
Synfirechain-like example
"""
import matplotlib.pyplot as plt
import matplotlib.pyplot as plt # type: ignore[import]
import numpy
from pyNN.utility.plotting import Figure
import spynnaker.spike_checker as spike_checker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"""
Synfirechain-like example
"""
import matplotlib.pyplot as plt
import matplotlib.pyplot as plt # type: ignore[import]
import numpy
from pyNN.utility.plotting import Figure
import spynnaker.spike_checker as spike_checker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import matplotlib.pyplot as plt
import matplotlib.pyplot as plt # type: ignore[import]
import numpy
from pyNN.utility.plotting import Figure
import spynnaker.spike_checker as spike_checker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def do_run():

# before
pre_delays_array = projections[0].get(attribute_names=["delay"],
format="nparray")
format="ndarray")
pre_delays_list = projections[0].get(attribute_names=["delay"],
format="list")
pre_weights_array = projections[0].get(attribute_names=["weight"],
Expand All @@ -61,7 +61,7 @@ def do_run():

# after
post_delays_array = projections[0].get(attribute_names=["delay"],
format="nparray")
format="ndarray")
post_delays_list = projections[0].get(attribute_names=["delay"],
format="list")
post_weights_array = projections[0].get(attribute_names=["weight"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from neo.io import PickleIO
from neo.io import PickleIO # type: ignore[import]
import pyNN.spiNNaker as sim
from spinn_front_end_common.utilities.exceptions import ConfigurationException
from spynnaker.pyNN.utilities import neo_compare
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ def test_one(self):

run_and_compare_script(
_simtime, _n_neurons,
record_spikes=True, spike_rate=2, spike_indexes=None,
record_v=True, v_rate=3, v_indexes=None,
record_exc=True, exc_rate=4, exc_indexes=None,
record_inh=True, inh_rate=5, inh_indexes=None)
record_spikes=True, spike_rate=2,
record_v=True, v_rate=3,
record_exc=True, exc_rate=4,
record_inh=True, inh_rate=5)
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import os
import numpy
import random
import matplotlib.pyplot as plt
import matplotlib.pyplot as plt # type: ignore[import]
from pyNN.utility.plotting import Figure, Panel
import pyNN.spiNNaker as p
from spynnaker.pyNN.utilities import neo_convertor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def test_run(self):


if __name__ == '__main__':
import pylab
import pylab # type: ignore[import]

(spikes_forward, spikes_backward) = do_run()
print(len(spikes_forward))
Expand Down
2 changes: 1 addition & 1 deletion unittests/model_tests/neuron/test_defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from spynnaker.pyNN.config_setup import unittest_setup
from spynnaker.pyNN.models.defaults import (
defaults, default_parameters, default_initial_values)
from testfixtures.logcapture import LogCapture
from testfixtures import LogCapture # type: ignore[import]
import re
# pylint: disable=no-member

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from testfixtures import LogCapture
from testfixtures import LogCapture # type: ignore[import]
import unittest
from spynnaker.pyNN.models.spike_source import SpikeSourceArrayVertex
import pyNN.spiNNaker as sim
Expand Down
2 changes: 2 additions & 0 deletions unittests/model_tests/neuron/test_synaptic_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ def write_memory(
return
if isinstance(data, int):
data = struct.Struct("<I").pack(data)
assert isinstance(data, (bytes, bytearray))
self._data_to_read[base_address:base_address + len(data)] = data
return (-1, -1)

@overrides(Transceiver.get_region_base_address)
def get_region_base_address(self, x: int, y: int, p: int):
Expand Down

0 comments on commit 0abe490

Please sign in to comment.