Skip to content

Commit

Permalink
Merge branch 'master' into transceiver-tinkering
Browse files Browse the repository at this point in the history
  • Loading branch information
dkfellows committed Feb 23, 2018
2 parents ed8c7b2 + 9ba397a commit aa8e886
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 14 deletions.
4 changes: 2 additions & 2 deletions spinnman/connections/connection_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def run(self):
self._run_step(handler)
except Exception:
if not self._done:
logger.warn("problem when dispatching message",
exc_info=True)
logger.warning("problem when dispatching message",
exc_info=True)
self._callback_pool.close()
self._callback_pool.join()

Expand Down
4 changes: 2 additions & 2 deletions spinnman/connections/udp_packet_connections/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def set_receive_buffer_size(sock, size):
except Exception:
# The OS said no, but we might still be able to work right with
# the defaults. Just warn and hope...
logger.warn("failed to configure UDP socket to have a large "
"receive buffer", exc_info=True)
logger.warning("failed to configure UDP socket to have a large "
"receive buffer", exc_info=True)


def bind_socket(sock, host, port):
Expand Down
2 changes: 1 addition & 1 deletion spinnman/processes/fill_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def fill_memory(self, x, y, base_address, data, size, data_type):
"The size of {} bytes to fill is not divisible by the size of"
" the data of {} bytes".format(size, data_type.value))
if base_address % ALIGNMENT:
logger.warn(
logger.warning(
"Unaligned fill starting at %d; please use aligned fills",
base_address)

Expand Down
4 changes: 2 additions & 2 deletions spinnman/processes/get_machine_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def _make_chip(self, width, height, chip_info):
elif core_states[virtual_core_id] == CPUState.IDLE:
processors.append(Processor(virtual_core_id))
else:
logger.warn(
logger.warning(
"Not using core {}, {}, {} in state {}",
chip_info.x, chip_info.y, virtual_core_id,
core_states[virtual_core_id])
Expand Down Expand Up @@ -157,7 +157,7 @@ def get_machine_details(self, boot_x, boot_y, width, height):
# Warn about unexpected missing chips
for (x, y) in p2p_table.iterchips():
if (x, y) not in self._chip_info:
logger.warn(
logger.warning(
"Chip {}, {} was expected but didn't reply", x, y)

# Build a Machine
Expand Down
2 changes: 1 addition & 1 deletion spinnman/processes/load_routes_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def load_routes(self, x, y, routes, app_id):
table_address = 0x67800000
process = WriteMemoryProcess(self._next_connection_selector)
process.write_memory_from_bytearray(
(x, y, 0), table_address, routing_data, 0, len(routing_data))
x, y, 0, table_address, routing_data, 0, len(routing_data))

# Allocate space in the router table
self._send_request(RouterAlloc(x, y, app_id, n_entries),
Expand Down
10 changes: 5 additions & 5 deletions spinnman/transceiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ def discover_scamp_connections(self):
self._scp_sender_connections.append(conn)
self._all_connections.add(conn)
else:
logger.warn(
logger.warning(
"Additional Ethernet connection on {} at chip {}, {} "
"cannot be contacted", chip.ip_address, chip.x, chip.y)

Expand Down Expand Up @@ -1506,7 +1506,7 @@ def power_on_machine(self):
""" Power on the whole machine
"""
if not self._bmp_connections:
logger.warn("No BMP connections, so can't power on")
logger.warning("No BMP connections, so can't power on")
for bmp_connection in self._bmp_connections:
self.power_on(bmp_connection.boards, bmp_connection.cabinet,
bmp_connection.frame)
Expand All @@ -1526,7 +1526,7 @@ def power_off_machine(self):
""" Power off the whole machine
"""
if not self._bmp_connections:
logger.warn("No BMP connections, so can't power off")
logger.warning("No BMP connections, so can't power off")
for bmp_connection in self._bmp_connections:
self.power_off(bmp_connection.boards, bmp_connection.cabinet,
bmp_connection.frame)
Expand Down Expand Up @@ -1987,7 +1987,7 @@ def stop_application(self, app_id):
process = SendSingleCommandProcess(self._scamp_connection_selector)
process.execute(AppStop(app_id))
else:
logger.warn(
logger.warning(
"You are calling a app stop on a turned off machine. "
"Please fix and try again")

Expand Down Expand Up @@ -2624,7 +2624,7 @@ def set_router_diagnostic_filter(self, x, y, position, diagnostic_filter):
"position", str(position),
"the range of the position of a router filter is 0 and 16.")
if position <= ROUTER_DEFAULT_FILTERS_MAX_POSITION:
logger.warn(
logger.warning(
"You are planning to change a filter which is set by default. "
"By doing this, other runs occurring on this machine will be "
"forced to use this new configuration until the machine is "
Expand Down
6 changes: 5 additions & 1 deletion unittests/test_import_all_test.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import unittest

import spinn_utilities.package_loader as package_loader
Expand All @@ -6,4 +7,7 @@
class ImportAllModule(unittest.TestCase):

def test_import_all(self):
package_loader.load_module("spinnman")
if os.environ.get('CONTINUOUS_INTEGRATION', 'false').lower() == 'true':
package_loader.load_module("spinnman", remove_pyc_files=False)
else:
package_loader.load_module("spinnman", remove_pyc_files=True)

0 comments on commit aa8e886

Please sign in to comment.