Skip to content

Commit

Permalink
Merge pull request #930 from SpiNNakerManchester/dict
Browse files Browse the repository at this point in the history
no need for OrderedDict
  • Loading branch information
dkfellows authored Apr 14, 2022
2 parents 164e816 + 4156df4 commit 7eed9a5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
12 changes: 6 additions & 6 deletions spinn_front_end_common/interface/java_caller.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

from collections import defaultdict, OrderedDict
from collections import defaultdict
import json
import logging
import os
Expand Down Expand Up @@ -255,12 +255,12 @@ def _json_placement(self, placement, transceiver):
:rtype: dict
"""
vertex = placement.vertex
json_placement = OrderedDict()
json_placement = dict()
json_placement["x"] = placement.x
json_placement["y"] = placement.y
json_placement["p"] = placement.p

json_vertex = OrderedDict()
json_vertex = dict()
json_vertex["label"] = vertex.label
if isinstance(vertex, AbstractReceiveBuffersToHost) and \
vertex.get_recorded_region_ids():
Expand All @@ -281,7 +281,7 @@ def _json_iptag(self, iptag):
:param ~pacman.model.tags.IPTag iptag:
:rtype: dict
"""
json_tag = OrderedDict()
json_tag = dict()
json_tag["x"] = iptag.destination_x
json_tag["y"] = iptag.destination_y
json_tag["boardAddress"] = iptag.board_address
Expand Down Expand Up @@ -318,15 +318,15 @@ def _write_gather(self, placements, transceiver, path):
json_obj = list()
for ethernet in self._chipxy_by_ethernet:
by_chip = placements_by_ethernet[ethernet]
json_gather = OrderedDict()
json_gather = dict()
json_gather["x"] = ethernet[0]
json_gather["y"] = ethernet[1]
json_gather["p"] = self._gatherer_cores[ethernet]
json_gather["iptag"] = self._json_iptag(
self._gatherer_iptags[ethernet])
json_chips = list()
for chip_xy in self._chipxy_by_ethernet[ethernet]:
json_chip = OrderedDict()
json_chip = dict()
json_chip["x"] = chip_xy[0]
json_chip["y"] = chip_xy[1]
json_chip["p"] = self._monitor_cores[chip_xy]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import logging
import struct
from threading import Thread
from collections import OrderedDict
from spinn_utilities.log import FormatAdapter
from spinnman.messages.eieio.data_messages import (
EIEIODataMessage, KeyPayloadDataElement)
Expand Down Expand Up @@ -233,7 +232,7 @@ def __read_database_callback(self, db_reader):
"""
self.__handle_possible_rerun_state()

vertex_sizes = OrderedDict()
vertex_sizes = dict()
run_time_ms = db_reader.get_configuration_parameter_value(
"runtime")
machine_timestep_ms = db_reader.get_configuration_parameter_value(
Expand Down Expand Up @@ -420,8 +419,8 @@ def __do_receive_packet(self, packet):
logger.warning("problem handling received packet", exc_info=True)

def __handle_time_packet(self, packet):
key_times_labels = OrderedDict()
atoms_times_labels = OrderedDict()
key_times_labels = dict()
atoms_times_labels = dict()
while packet.is_next_element:
element = packet.next_element
time = element.payload
Expand Down

0 comments on commit 7eed9a5

Please sign in to comment.