• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

SpiNNakerManchester / SpiNNMan / 6574804013

19 Oct 2023 12:47PM UTC coverage: 51.937% (+1.2%) from 50.777%
6574804013

Pull #327

github

Christian-B
typing changes
Pull Request #327: Type Annotations and Checking

105 of 1288 branches covered (0.0%)

Branch coverage included in aggregate %.

2375 of 2375 new or added lines in 180 files covered. (100.0%)

4775 of 8108 relevant lines covered (58.89%)

0.59 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

77.78
/spinnman/messages/scp/impl/bmp_get_version.py
1
# Copyright (c) 2015 The University of Manchester
2
#
3
# Licensed under the Apache License, Version 2.0 (the "License");
4
# you may not use this file except in compliance with the License.
5
# You may obtain a copy of the License at
6
#
7
#     https://www.apache.org/licenses/LICENSE-2.0
8
#
9
# Unless required by applicable law or agreed to in writing, software
10
# distributed under the License is distributed on an "AS IS" BASIS,
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
# See the License for the specific language governing permissions and
13
# limitations under the License.
14

15
from spinn_utilities.overrides import overrides
1✔
16
from spinnman.model import VersionInfo
1✔
17
from spinnman.messages.scp.abstract_messages import (
1✔
18
    AbstractSCPRequest, BMPRequest, BMPResponse)
19
from spinnman.messages.scp import SCPRequestHeader
1✔
20
from spinnman.messages.scp.enums import SCPCommand
1✔
21

22

23
class BMPGetVersion(BMPRequest['_BMPVersion']):
1✔
24
    """
25
    An SCP request to read the version of software running on a core.
26
    """
27
    __slots__ = ()
1✔
28

29
    def __init__(self, board: int):
1✔
30
        """
31
        :param int board: The board to get the version from
32
        :raise SpinnmanInvalidParameterException:
33
            * If the chip coordinates are out of range
34
            * If the processor is out of range
35
        """
36
        super().__init__(
×
37
            board, SCPRequestHeader(command=SCPCommand.CMD_VER))
38

39
    @overrides(AbstractSCPRequest.get_scp_response)
1✔
40
    def get_scp_response(self) -> '_BMPVersion':
1✔
41
        return _BMPVersion("Read BMP version", SCPCommand.CMD_VER)
×
42

43

44
class _BMPVersion(BMPResponse[VersionInfo]):
1✔
45
    def _parse_payload(self, data: bytes, offset: int) -> VersionInfo:
1✔
46
        return VersionInfo(data, offset)
×
47

48
    @property
1✔
49
    def version_info(self) -> VersionInfo:
1✔
50
        """
51
        The version information received.
52

53
        :rtype: VersionInfo
54
        """
55
        return self._value
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc