Skip to content

Make rig work in 2025 #272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Make rig work in 2025 #272

wants to merge 10 commits into from

Conversation

mossblaser
Copy link
Member

@mossblaser mossblaser commented May 7, 2025

This PR (hopefully) gets Rig into a state where it works again under recent Python 3 versions.

A few small fixes/changes for compatibility with newer Python versions here and there -- read the commit messages for a summary. Nothing substantial. A few deprecation warnings remain which I don't fancy addressing right now, but everything should at least be back in a working state.

@mundya or @neworderofjamie if you fancy some nostalgia I'd welcome a cursory glance at this PR; but feel free to ignore and I'll eventually just merge it anyway :).

Unfortunately, I'm almost certain the Travis CI stuff has expired after many years of non-use. I'm not sure if I'm motivated to fix that. Further, I am certain that the public-internet-connected SpiNN5 board (and associated proxy server) are no longer available so I'll need a volunteer to run the 'real hardware' test suite if possible (see below).

SpiNN5 hardware testing help wanted

@rowleya would you be willing to spare five minutes to give the hardware test suite a try and report back any issues? (As an incentive, this will make SpiNNer work again the next time you need to repair/change/check the big machine's wiring!)

The testing procedure goes something like:

$ python --version   # Make sure you're on a recent Python version
Python 3.13.3
$ git clone git@github.com:project-rig/rig.git
$ cd rig
$ git checkout make-work-in-2025
$ python -m venv venv
$ . ./venv/bin/activate
$ pip install -e .
$ pip install -r requirements-test.txt
$ pytest tests \
        --spinnaker SPINN_HOSTNAME 8 8 --spinn5 \
        --bmp BMP_HOSTNAME

Why bother

I'm primarily going to the trouble of doing this since it would be nice for this project to be at least able to run -- even if it isn't being updated -- as quite a few interesting tools and experiments were built on top of it. At least as long as SpiNNaker 1 hardware still draws breath :).

A more pragmatic reason for doing this is that SpiNNer (the SpiNNaker 1 wiring tool) will not work without Rig and I thought it would be nice to make Rig work in case anyone ever needs to repair/check/change the wiring in their SpiNNaker 1 machines one day.

Note this is specifically not being done as part of my current brief contract with SpiNNcloud Systems working on SpiNNaker 2 software. Nobody there has yet mentioned any plans to use Rig ;).

@rowleya
Copy link

rowleya commented May 8, 2025

It seems that pytest doesn't like the "8 8" part of the arguments (it says ERROR: file or directory not found: 8). Without that, the results are below. Note that the board was not booted before running the tests; I am not sure if that is needed?

================================================================================= test session starts ==================================================================================
platform linux -- Python 3.12.9, pytest-8.3.5, pluggy-1.5.0
rootdir: /home/jovyan/work/rig/rig
plugins: cov-6.1.1
collected 1522 items                                                                                                                                                                   

tests/machine_control/test_bmp_controller.py ....                                                                                                                                [  0%]
tests/test_order.py .                                                                                                                                                            [  0%]
tests/test_type_casts.py ................................................................................................                                                        [  6%]
tests/test_wizard.py ..................                                                                                                                                          [  7%]
tests/utils/test_contexts.py ................................                                                                                                                    [  9%]
tests/utils/test_docstrings.py ..............                                                                                                                                    [ 10%]
tests/machine_control/test_bmp_controller.py Fx                                                                                                                                  [ 10%]
tests/machine_control/test_machine_controller.py .                                                                                                                               [ 11%]
tests/test_order.py .                                                                                                                                                            [ 11%]
tests/machine_control/test_machine_controller.py Fxxxxxxxxxxxxxx                                                                                                                 [ 12%]
tests/test_order.py .                                                                                                                                                            [ 12%]
tests/machine_control/test_machine_controller.py xxxxxxxxxxxx................................................................................................................... [ 20%]
................................................................................................................................................................................ [ 32%]
................................................................................................................................................                                 [ 41%]
tests/machine_control/test_packets.py ...........                                                                                                                                [ 42%]
tests/machine_control/test_regions.py ..........................                                                                                                                 [ 43%]
tests/machine_control/test_scp_connection.py ...............................................................................................                                     [ 50%]
tests/machine_control/test_struct_file.py ............                                                                                                                           [ 50%]
tests/machine_control/test_unbooted_ping.py ..                                                                                                                                   [ 51%]
tests/place_and_route/allocate/test_allocate_utils.py ..                                                                                                                         [ 51%]
tests/place_and_route/allocate/test_generic_allocate.py ..........                                                                                                               [ 51%]
tests/place_and_route/place/sa/test_algorithm.py ................                                                                                                                [ 52%]
tests/place_and_route/place/sa/test_python_kernel.py ............................                                                                                                [ 54%]
tests/place_and_route/place/test_breadth_first.py ......                                                                                                                         [ 55%]
tests/place_and_route/place/test_generic_place.py .............................................................................................................................. [ 63%]
............................                                                                                                                                                     [ 65%]
tests/place_and_route/place/test_hilbert.py ............                                                                                                                         [ 66%]
tests/place_and_route/place/test_place_utils.py ............                                                                                                                     [ 66%]
tests/place_and_route/place/test_rcm.py ......                                                                                                                                   [ 67%]
tests/place_and_route/place/test_sequential.py ....                                                                                                                              [ 67%]
tests/place_and_route/route/test_generic_route.py ............                                                                                                                   [ 68%]
tests/place_and_route/route/test_ner.py ............................................................................................                                             [ 74%]
tests/place_and_route/route/test_route_utils.py ..                                                                                                                               [ 74%]
tests/place_and_route/test_machine.py .........                                                                                                                                  [ 75%]
tests/place_and_route/test_routing_tree.py .....                                                                                                                                 [ 75%]
tests/place_and_route/test_utils.py ..............                                                                                                                               [ 76%]
tests/place_and_route/test_wrapper.py ........                                                                                                                                   [ 76%]
tests/routing_table/test_entries.py ...                                                                                                                                          [ 77%]
tests/routing_table/test_minimise.py ....                                                                                                                                        [ 77%]
tests/routing_table/test_remove_default_routes.py ......                                                                                                                         [ 77%]
tests/routing_table/test_routing_table_exceptions.py .                                                                                                                           [ 77%]
tests/routing_table/test_routing_table_ordered_covering.py .....................                                                                                                 [ 79%]
tests/routing_table/test_routing_table_utils.py ...............                                                                                                                  [ 80%]
tests/scripts/test_rig_boot.py .........                                                                                                                                         [ 80%]
tests/scripts/test_rig_counters.py .....................................                                                                                                         [ 83%]
tests/scripts/test_rig_discover.py ....                                                                                                                                          [ 83%]
tests/scripts/test_rig_info.py .....................                                                                                                                             [ 84%]
tests/scripts/test_rig_iobuf.py ....                                                                                                                                             [ 85%]
tests/scripts/test_rig_power.py ...............................                                                                                                                  [ 87%]
tests/scripts/test_rig_ps.py .......                                                                                                                                             [ 87%]
tests/test_bitfield.py .....................................                                                                                                                     [ 90%]
tests/test_geometry.py ...........................                                                                                                                               [ 91%]
tests/test_links.py ...                                                                                                                                                          [ 91%]
tests/test_machine_deprecated.py .                                                                                                                                               [ 92%]
tests/test_netlist.py ..                                                                                                                                                         [ 92%]
tests/test_order.py .                                                                                                                                                            [ 92%]
tests/machine_control/test_bmp_controller.py ............................................................................................................                        [ 99%]
tests/machine_control/test_machine_control_common.py ....                                                                                                                        [ 99%]
tests/machine_control/test_machine_control_utils.py ....                                                                                                                         [ 99%]
tests/machine_control/test_machine_controller.py xx                                                                                                                              [100%]

======================================================================================= FAILURES =======================================================================================
____________________________________________________________________ TestBMPControllerLive.test_read_write_fpga_reg ____________________________________________________________________

self = <test_bmp_controller.TestBMPControllerLive object at 0x735b1da06420>, live_controller = <rig.machine_control.bmp_controller.BMPController object at 0x735adaf07e90>

    @pytest.mark.order_after("bmp_power_cycle")
    def test_read_write_fpga_reg(self, live_controller):
        # The address of a read/writeable register in the FPGAs. This register
        # controls which packets are routed to external devices by the FPGA.
        # Since the mask defaults to 0s, setting this field to anything but a
        # zero value is safe. See the SpiNNaker FPGA design in the SpI/O
        # project for register definitions:
        # https://github.com/SpiNNakerManchester/spio
        PKEY_ADDR = 0x00040008
    
        # Write a value into the writeable peripheral multicast packet key
        # field of the FPGA and read it back
        for fpga_num in range(3):
            live_controller.write_fpga_reg(fpga_num, PKEY_ADDR,
                                           0xBEEF0000 | fpga_num)
        for fpga_num in range(3):
>           assert live_controller.read_fpga_reg(fpga_num, PKEY_ADDR) == \
                0xBEEF0000 | fpga_num
E           assert 4294967295 == (3203334144 | 0)
E            +  where 4294967295 = read_fpga_reg(0, 262152)
E            +    where read_fpga_reg = <rig.machine_control.bmp_controller.BMPController object at 0x735adaf07e90>.read_fpga_reg

tests/machine_control/test_bmp_controller.py:114: AssertionError
_________________________________________________________________ TestMachineControllerLive.test_get_software_version __________________________________________________________________

self = <test_machine_controller.TestMachineControllerLive object at 0x735b1d3e31d0>, controller = <rig.machine_control.machine_controller.MachineController object at 0x735adaf99340>

    def test_get_software_version(self, controller):
        """Test getting the software version data."""
        # (Assuming a 4-node board) Get the software version for a number of
        # cores.
        for x in range(2):
            for y in range(2):
                sver = controller.get_software_version(x=x, y=y, processor=0)
                assert sver.virt_cpu == 0
                assert "SpiNNaker" in sver.version_string
                assert sver.software_version >= (2, 0, 0)
>               assert sver.position == (x, y)
E               assert (255, 255) == (0, 1)
E                 
E                 At index 0 diff: 255 != 0
E                 Use -v to get more diff

tests/machine_control/test_machine_controller.py:121: AssertionError
=================================================================================== warnings summary ===================================================================================
tests/test_type_casts.py: 48 warnings
  /home/jovyan/work/rig/rig/rig/type_casts.py:170: DeprecationWarning: float_to_fix() is deprecated, see float_to_fp
    warnings.warn("float_to_fix() is deprecated, see float_to_fp",

tests/test_type_casts.py::TestFixToFloat::test_invalid_parameters[True-32-32]
tests/test_type_casts.py::TestFixToFloat::test_invalid_parameters[False-32-33]
tests/test_type_casts.py::TestFixToFloat::test_invalid_parameters[False--1-3]
tests/test_type_casts.py::TestFixToFloat::test_invalid_parameters[False-32--1]
tests/test_type_casts.py::TestFixToFloat::test_fix_to_float[255-False-8-0-255.0]
tests/test_type_casts.py::TestFixToFloat::test_fix_to_float[129-True-8-0--127.0]
tests/test_type_casts.py::TestFixToFloat::test_fix_to_float[255-False-8-1-127.5]
tests/test_type_casts.py::TestFixToFloat::test_fix_to_float[248-True-8-4--0.5]
  /home/jovyan/work/rig/rig/rig/type_casts.py:250: DeprecationWarning: fix_to_float() is deprecated, see fp_to_float
    warnings.warn("fix_to_float() is deprecated, see fp_to_float",

tests/place_and_route/test_wrapper.py::TestWrapper::test_empty[wrapper-m_or_si0]
tests/place_and_route/test_wrapper.py::TestWrapper::test_ring[wrapper-False-True-True]
tests/place_and_route/test_wrapper.py::TestWrapper::test_ring[wrapper-True-True-True]
tests/place_and_route/test_wrapper.py::TestWrapper::test_ring[wrapper-True-False-False]
  /home/jovyan/work/rig/rig/rig/place_and_route/wrapper.py:267: DeprecationWarning: rig.place_and_route.wrapper is deprecated use rig.place_and_route.place_and_route_wrapper instead in new applications.
    warnings.warn("rig.place_and_route.wrapper is deprecated "

tests/place_and_route/test_wrapper.py::TestWrapper::test_empty[wrapper-m_or_si0]
tests/place_and_route/test_wrapper.py::TestWrapper::test_ring[wrapper-False-True-True]
tests/place_and_route/test_wrapper.py::TestWrapper::test_ring[wrapper-True-True-True]
tests/place_and_route/test_wrapper.py::TestWrapper::test_ring[wrapper-True-False-False]
  /home/jovyan/work/rig/rig/rig/place_and_route/utils.py:313: DeprecationWarning: build_routing_tables() is deprecated, see rig.routing_table.routing_tree_to_tables()and rig.routing_table.minimise()
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=============================================================================== short test summary info ================================================================================
FAILED tests/machine_control/test_bmp_controller.py::TestBMPControllerLive::test_read_write_fpga_reg - assert 4294967295 == (3203334144 | 0)
FAILED tests/machine_control/test_machine_controller.py::TestMachineControllerLive::test_get_software_version - assert (255, 255) == (0, 1)
=============================================================== 2 failed, 1491 passed, 29 xfailed, 64 warnings in 17.10s ===============================================================

@mossblaser
Copy link
Member Author

Thanks so much for running that @rowleya. Re the "8 8" bit, I'd forgotten that the system size information became redundant but I obviously never updated the dev docs I copied the pytest incantation from.

Do you know what FPGA images are on the board you used to test?

I'll continue exploring later on using the access you very kindly provided out-of-band :).

@rowleya
Copy link

rowleya commented May 8, 2025

It looks like the FPGA firmware is version 2.1.2. Not sure if that helps! They are in the (private) repository SpiNNaker_hardware_tests; if you need access to that let me know.

@mossblaser
Copy link
Member Author

Ah right; so its not based on https://github.com/SpiNNakerManchester/spio/ anymore? That sounds like an interesting tale! I'm guessing the FPGA stuff may have moved on then! (Perhaps making SpiNNer work again could be more work than just fixing Python 3.11 issues!)

@rowleya
Copy link

rowleya commented May 8, 2025

Sorry, that was the BMP version! I am less sure about the FPGA firmware version. It might be that this is a board with broken FPGAs of some sort...

@rowleya
Copy link

rowleya commented May 8, 2025

Ah right; so its not based on https://github.com/SpiNNakerManchester/spio/ anymore? That sounds like an interesting tale! I'm guessing the FPGA stuff may have moved on then! (Perhaps making SpiNNer work again could be more work than just fixing Python 3.11 issues!)

I think the versions in use are still the SPIO versions. I don't think that much has changed, but there were some changes for SPIF (an interface board that connects to the FPGAs), which I think mostly adds some routing tables to the FPGAs for external device messages.

@mossblaser
Copy link
Member Author

Ah right. Hopefully that should be unimportant :). I have a feeling the register read failing in that test is one which I put in as a "minimum viable routing rule" within the FPGAs which would be a likely candidate for refinement if the external interfaces saw some real use! I'll do some sleuthing later...

Thanks very much again!

@rowleya
Copy link

rowleya commented May 8, 2025

OK, I have tried on another board now, and the BMP test passes!

Results on that board are:

================================================================================= test session starts ==================================================================================
platform linux -- Python 3.12.9, pytest-8.3.5, pluggy-1.5.0
rootdir: /home/jovyan/work/rig/rig
plugins: cov-6.1.1
collected 1522 items                                                                                                                                                                   

tests/machine_control/test_bmp_controller.py ....                                                                                                                                [  0%]
tests/test_order.py .                                                                                                                                                            [  0%]
tests/test_type_casts.py ................................................................................................                                                        [  6%]
tests/test_wizard.py ..................                                                                                                                                          [  7%]
tests/utils/test_contexts.py ................................                                                                                                                    [  9%]
tests/utils/test_docstrings.py ..............                                                                                                                                    [ 10%]
tests/machine_control/test_bmp_controller.py ..                                                                                                                                  [ 10%]
tests/machine_control/test_machine_controller.py .                                                                                                                               [ 11%]
tests/test_order.py .                                                                                                                                                            [ 11%]
tests/machine_control/test_machine_controller.py Fxxxxxxxxxxxxxx                                                                                                                 [ 12%]
tests/test_order.py .                                                                                                                                                            [ 12%]
tests/machine_control/test_machine_controller.py xxxxxxxxxxxx................................................................................................................... [ 20%]
................................................................................................................................................................................ [ 32%]
................................................................................................................................................                                 [ 41%]
tests/machine_control/test_packets.py ...........                                                                                                                                [ 42%]
tests/machine_control/test_regions.py ..........................                                                                                                                 [ 43%]
tests/machine_control/test_scp_connection.py ...............................................................................................                                     [ 50%]
tests/machine_control/test_struct_file.py ............                                                                                                                           [ 50%]
tests/machine_control/test_unbooted_ping.py ..                                                                                                                                   [ 51%]
tests/place_and_route/allocate/test_allocate_utils.py ..                                                                                                                         [ 51%]
tests/place_and_route/allocate/test_generic_allocate.py ..........                                                                                                               [ 51%]
tests/place_and_route/place/sa/test_algorithm.py ................                                                                                                                [ 52%]
tests/place_and_route/place/sa/test_python_kernel.py ............................                                                                                                [ 54%]
tests/place_and_route/place/test_breadth_first.py ......                                                                                                                         [ 55%]
tests/place_and_route/place/test_generic_place.py .............................................................................................................................. [ 63%]
............................                                                                                                                                                     [ 65%]
tests/place_and_route/place/test_hilbert.py ............                                                                                                                         [ 66%]
tests/place_and_route/place/test_place_utils.py ............                                                                                                                     [ 66%]
tests/place_and_route/place/test_rcm.py ......                                                                                                                                   [ 67%]
tests/place_and_route/place/test_sequential.py ....                                                                                                                              [ 67%]
tests/place_and_route/route/test_generic_route.py ............                                                                                                                   [ 68%]
tests/place_and_route/route/test_ner.py ............................................................................................                                             [ 74%]
tests/place_and_route/route/test_route_utils.py ..                                                                                                                               [ 74%]
tests/place_and_route/test_machine.py .........                                                                                                                                  [ 75%]
tests/place_and_route/test_routing_tree.py .....                                                                                                                                 [ 75%]
tests/place_and_route/test_utils.py ..............                                                                                                                               [ 76%]
tests/place_and_route/test_wrapper.py ........                                                                                                                                   [ 76%]
tests/routing_table/test_entries.py ...                                                                                                                                          [ 77%]
tests/routing_table/test_minimise.py ....                                                                                                                                        [ 77%]
tests/routing_table/test_remove_default_routes.py ......                                                                                                                         [ 77%]
tests/routing_table/test_routing_table_exceptions.py .                                                                                                                           [ 77%]
tests/routing_table/test_routing_table_ordered_covering.py .....................                                                                                                 [ 79%]
tests/routing_table/test_routing_table_utils.py ...............                                                                                                                  [ 80%]
tests/scripts/test_rig_boot.py .........                                                                                                                                         [ 80%]
tests/scripts/test_rig_counters.py .....................................                                                                                                         [ 83%]
tests/scripts/test_rig_discover.py ....                                                                                                                                          [ 83%]
tests/scripts/test_rig_info.py .....................                                                                                                                             [ 84%]
tests/scripts/test_rig_iobuf.py ....                                                                                                                                             [ 85%]
tests/scripts/test_rig_power.py ...............................                                                                                                                  [ 87%]
tests/scripts/test_rig_ps.py .......                                                                                                                                             [ 87%]
tests/test_bitfield.py .....................................                                                                                                                     [ 90%]
tests/test_geometry.py ...........................                                                                                                                               [ 91%]
tests/test_links.py ...                                                                                                                                                          [ 91%]
tests/test_machine_deprecated.py .                                                                                                                                               [ 92%]
tests/test_netlist.py ..                                                                                                                                                         [ 92%]
tests/test_order.py .                                                                                                                                                            [ 92%]
tests/machine_control/test_bmp_controller.py ............................................................................................................                        [ 99%]
tests/machine_control/test_machine_control_common.py ....                                                                                                                        [ 99%]
tests/machine_control/test_machine_control_utils.py ....                                                                                                                         [ 99%]
tests/machine_control/test_machine_controller.py xx                                                                                                                              [100%]

======================================================================================= FAILURES =======================================================================================
_________________________________________________________________ TestMachineControllerLive.test_get_software_version __________________________________________________________________

self = <test_machine_controller.TestMachineControllerLive object at 0x71c365efeb40>, controller = <rig.machine_control.machine_controller.MachineController object at 0x71c3231b64b0>

    def test_get_software_version(self, controller):
        """Test getting the software version data."""
        # (Assuming a 4-node board) Get the software version for a number of
        # cores.
        for x in range(2):
            for y in range(2):
                sver = controller.get_software_version(x=x, y=y, processor=0)
                assert sver.virt_cpu == 0
                assert "SpiNNaker" in sver.version_string
                assert sver.software_version >= (2, 0, 0)
>               assert sver.position == (x, y)
E               assert (255, 255) == (0, 1)
E                 
E                 At index 0 diff: 255 != 0
E                 Use -v to get more diff

tests/machine_control/test_machine_controller.py:121: AssertionError
=================================================================================== warnings summary ===================================================================================
tests/test_type_casts.py: 48 warnings
  /home/jovyan/work/rig/rig/rig/type_casts.py:170: DeprecationWarning: float_to_fix() is deprecated, see float_to_fp
    warnings.warn("float_to_fix() is deprecated, see float_to_fp",

tests/test_type_casts.py::TestFixToFloat::test_invalid_parameters[True-32-32]
tests/test_type_casts.py::TestFixToFloat::test_invalid_parameters[False-32-33]
tests/test_type_casts.py::TestFixToFloat::test_invalid_parameters[False--1-3]
tests/test_type_casts.py::TestFixToFloat::test_invalid_parameters[False-32--1]
tests/test_type_casts.py::TestFixToFloat::test_fix_to_float[255-False-8-0-255.0]
tests/test_type_casts.py::TestFixToFloat::test_fix_to_float[129-True-8-0--127.0]
tests/test_type_casts.py::TestFixToFloat::test_fix_to_float[255-False-8-1-127.5]
tests/test_type_casts.py::TestFixToFloat::test_fix_to_float[248-True-8-4--0.5]
  /home/jovyan/work/rig/rig/rig/type_casts.py:250: DeprecationWarning: fix_to_float() is deprecated, see fp_to_float
    warnings.warn("fix_to_float() is deprecated, see fp_to_float",

tests/place_and_route/test_wrapper.py::TestWrapper::test_empty[wrapper-m_or_si0]
tests/place_and_route/test_wrapper.py::TestWrapper::test_ring[wrapper-False-True-True]
tests/place_and_route/test_wrapper.py::TestWrapper::test_ring[wrapper-True-True-True]
tests/place_and_route/test_wrapper.py::TestWrapper::test_ring[wrapper-True-False-False]
  /home/jovyan/work/rig/rig/rig/place_and_route/wrapper.py:267: DeprecationWarning: rig.place_and_route.wrapper is deprecated use rig.place_and_route.place_and_route_wrapper instead in new applications.
    warnings.warn("rig.place_and_route.wrapper is deprecated "

tests/place_and_route/test_wrapper.py::TestWrapper::test_empty[wrapper-m_or_si0]
tests/place_and_route/test_wrapper.py::TestWrapper::test_ring[wrapper-False-True-True]
tests/place_and_route/test_wrapper.py::TestWrapper::test_ring[wrapper-True-True-True]
tests/place_and_route/test_wrapper.py::TestWrapper::test_ring[wrapper-True-False-False]
  /home/jovyan/work/rig/rig/rig/place_and_route/utils.py:313: DeprecationWarning: build_routing_tables() is deprecated, see rig.routing_table.routing_tree_to_tables()and rig.routing_table.minimise()
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=============================================================================== short test summary info ================================================================================
FAILED tests/machine_control/test_machine_controller.py::TestMachineControllerLive::test_get_software_version - assert (255, 255) == (0, 1)
=============================================================== 1 failed, 1493 passed, 28 xfailed, 64 warnings in 20.95s ===============================================================

@rowleya
Copy link

rowleya commented May 8, 2025

I should add that the tests then appear to crash the board! That might be why the rest after the version fail?

@mossblaser
Copy link
Member Author

Excellent!! Thank you! Is that board also reachable from the environment you gave me access to? It'll be interesting to find out what is going wrong with the SpiNNaker tests since that'll be booting the same ancient SC&MP image it had years ago!

mossblaser added 10 commits May 8, 2025 21:25
This has finally disappeared in Python 3.11. These have been replaced by rather
pedestrian path mangling from the 'rig' module filename.
The random.sample no longer accepts sets (which to be fair was always a bit of
a surprise!).
This is something of a temporary fix whilst Python 2.x support remains.
Testing of one IntEnum type value is 'in' another IntEnum type now returns true
if the matching integer appears in both. In the past this wasn't the case.
Manually making the implementation do the equivalent type checking seems
unnecessary and would be better served by a future move to a typed API.

To be clear, this change makes the test less strict by no longer checking to
see that other IntEnum types are rejected -- since they're not!
The mock library now catches this common mistake and indeed, there are several
instances in the test suite which are fixed by this commit.

Thanks mock. Thmock.
This is no longer allowed from a native Python type -- but is from a numpy
type!
We were checking the ExecInfo rather than the underlying exception. Pytest must
have removed the __str__ implementation at some point.
@mossblaser mossblaser force-pushed the make-work-in-2025 branch from 9686e22 to 1d14fd3 Compare May 8, 2025 20:25
@mossblaser
Copy link
Member Author

OK; so between one SpiNNaker board with a working BMP and another with (enough) non-crashing chips I've managed a clean run of the test suite with still 100% test coverage.

(I'm guessing the chip blacklist format has changed since the SC&MP version rig bundles -- or the blacklist is out of date??)

As I say, there are plenty of warnings and other things which ought to be tidied up if we were bringing it fully back to life -- but it now runs and that's good enough for me for now :).

Thanks again, @rowleya for getting me hardware access!

If I don't get any takers for a review I'll merge this in a few days. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants