-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
81 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/tranqu/device_converter/oqtopus_to_ouqu_tp_device_converter.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import json | ||
from typing import Any | ||
|
||
from .device_converter import DeviceConverter | ||
|
||
|
||
class OqtopusToOuquTpDeviceConverter(DeviceConverter): | ||
"""Device converter for converting from Oqtopus to ouqu-tp format.""" | ||
|
||
@staticmethod | ||
def convert(device: dict[str, Any]) -> str: | ||
"""Convert a Oqtopus device to ouqu-tp format. | ||
Args: | ||
device (dict[str, Any]): The Oqtopus device to be converted. | ||
Returns: | ||
str: The converted ouqu-tp format device. | ||
""" | ||
return json.dumps(device) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters