Skip to content

Commit

Permalink
remane AbstractTransceiver to just Transceiver
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Aug 14, 2023
1 parent 87c14d1 commit 56f4ddf
Show file tree
Hide file tree
Showing 10 changed files with 102 additions and 102 deletions.
10 changes: 5 additions & 5 deletions spinnman/data/spinnman_data_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from spinn_utilities.log import FormatAdapter
from spinn_utilities.overrides import overrides
from spinn_machine.data.machine_data_writer import MachineDataWriter
from spinnman.transceiver import AbstractTransceiver
from spinnman.transceiver import Transceiver
from .spinnman_data_view import _SpiNNManDataModel, SpiNNManDataView

logger = FormatAdapter(logging.getLogger(__name__))
Expand Down Expand Up @@ -98,11 +98,11 @@ def set_transceiver(self, transceiver):
"""
Sets the transceiver object.
:param AbstractTransceiver transceiver:
:raises TypeError: If the transceiver is not a AbstractTransceiver
:param Transceiver transceiver:
:raises TypeError: If the transceiver is not a Transceiver subclass
"""
if not isinstance(transceiver, AbstractTransceiver):
raise TypeError("transceiver should be a AbstractTransceiver")
if not isinstance(transceiver, Transceiver):
raise TypeError("transceiver should be a Transceiver subclass")
if self.__data._transceiver:
raise NotImplementedError(
"Over writing and existing transceiver not supported")
Expand Down
2 changes: 1 addition & 1 deletion spinnman/extended/extended_transceiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class ExtendedTransceiver(object, metaclass=AbstractBase):
It is undetermined if these will work with Spin2 boards.
If any method here is considered important to keep please move it to
AbstractTransceiver
Transceiver and its implementations
"""
__slots__ = []

Expand Down
4 changes: 2 additions & 2 deletions spinnman/spalloc/spalloc_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from spinnman.exceptions import SpinnmanTimeoutException
from spinnman.exceptions import SpallocException
from spinnman.transceiver import (
AbstractTransceiver, create_transceiver_from_connections)
Transceiver, create_transceiver_from_connections)
from .spalloc_state import SpallocState
from .proxy_protocol import ProxyProtocol
from .session import Session, SessionAware
Expand Down Expand Up @@ -636,7 +636,7 @@ def _keepalive_handle(self, handle):
self.__keepalive_handle = handle

@overrides(SpallocJob.create_transceiver)
def create_transceiver(self) -> AbstractTransceiver:
def create_transceiver(self) -> Transceiver:
if self.get_state() != SpallocState.READY:
raise SpallocException("job not ready to execute scripts")
proxies = [
Expand Down
6 changes: 3 additions & 3 deletions spinnman/spalloc/spalloc_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from spinn_utilities.abstract_base import AbstractBase, abstractmethod
from spinn_utilities.abstract_context_manager import AbstractContextManager
from spinnman.constants import SCP_SCAMP_PORT
from spinnman.transceiver.abstract_transceiver import AbstractTransceiver
from spinnman.transceiver.abstract_transceiver import Transceiver
from spinnman.connections.udp_packet_connections import UDPConnection
from .spalloc_state import SpallocState
from .spalloc_boot_connection import SpallocBootConnection
Expand Down Expand Up @@ -121,12 +121,12 @@ def open_udp_listener_connection(self) -> UDPConnection:
"""

@abstractmethod
def create_transceiver(self) -> AbstractTransceiver:
def create_transceiver(self) -> Transceiver:
"""
Create a transceiver that will talk to this job. The transceiver will
only be configured to talk to the SCP ports of the boards of the job.
:rtype: AbstractTransceiver
:rtype: Transceiver
"""

@abstractmethod
Expand Down
4 changes: 2 additions & 2 deletions spinnman/transceiver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from .abstract_transceiver import AbstractTransceiver
from .transceiver import Transceiver
from .mockable_transceiver import MockableTransceiver
from .transceiver_factory import (
create_transceiver_from_connections, create_transceiver_from_hostname)

__all__ = ["AbstractTransceiver", "create_transceiver_from_connections",
__all__ = ["Transceiver", "create_transceiver_from_connections",
"create_transceiver_from_hostname", "MockableTransceiver"]
Loading

0 comments on commit 56f4ddf

Please sign in to comment.