Skip to content

Commit

Permalink
Export merge
Browse files Browse the repository at this point in the history
  • Loading branch information
xnk committed Jan 13, 2021
2 parents 3a836a6 + fcc7b13 commit 3d8c269
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 10 deletions.
5 changes: 4 additions & 1 deletion README.md
Expand Up @@ -2,7 +2,10 @@

The otii_tcp_client is a Python package for controlling the [Otii Automation Toolbox](https://www.qoitech.com/automation-toolbox/).

New functionality in client v1.0.3 requiring [Otii software v2.7.2 or later](https://www.qoitech.com/download):
- `Recording` object now exposes the start time as `start_time`

New functionality in client v1.0.2 requiring [Otii software v2.7.1 or later](https://www.qoitech.com/download):
- `arc.[gs]et_src_cur_limit_enabled` commands
- `arc.[gs]et_4wire commands`
- `arc.[gs]et_4wire` commands
- `arc.enable_battery_profiling`, `arc.set_battery_profile` and `arc.wait_for_battery_data` commands
2 changes: 1 addition & 1 deletion examples/example_basic_function_check.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
import time
import sys, os
sys.path.append(os.path.normpath(os.path.join(os.path.dirname(__file__), '..')))
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), '..')))

from otii_tcp_client import otii_connection, otii_exception, otii

Expand Down
2 changes: 1 addition & 1 deletion examples/example_check_create_project.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
import time
import sys, os
sys.path.append(os.path.normpath(os.path.join(os.path.dirname(__file__), '..')))
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), '..')))

from otii_tcp_client import otii_connection, otii_exception, otii
import example_config as cfg
Expand Down
2 changes: 1 addition & 1 deletion examples/example_enable_channels_and_record.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
import time
import sys, os
sys.path.append(os.path.normpath(os.path.join(os.path.dirname(__file__), '..')))
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), '..')))

from otii_tcp_client import otii_connection, otii_exception, otii
import example_config as cfg
Expand Down
2 changes: 1 addition & 1 deletion examples/example_energy_harvesting.py
Expand Up @@ -6,7 +6,7 @@
"""
import sys, os
import time
sys.path.append(os.path.normpath(os.path.join(os.path.dirname(__file__), '..')))
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), '..')))

from otii_tcp_client import otii_connection, otii_exception, otii
import example_config as cfg
Expand Down
2 changes: 1 addition & 1 deletion examples/example_get_channel_data_and_count.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
#encoding: utf-8
import sys, os
sys.path.append(os.path.normpath(os.path.join(os.path.dirname(__file__), '..')))
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), '..')))

from otii_tcp_client import otii_connection, otii_exception, otii
import example_config as cfg
Expand Down
2 changes: 1 addition & 1 deletion examples/example_wx_python.py
Expand Up @@ -2,7 +2,7 @@
import sys, os
import wx

sys.path.append(os.path.normpath(os.path.join(os.path.dirname(__file__), '..')))
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), '..')))
from otii_tcp_client import otii_connection, otii_exception, otii

import example_config as cfg
Expand Down
2 changes: 1 addition & 1 deletion examples/example_wx_python2.py
Expand Up @@ -2,7 +2,7 @@
import sys, os
import wx

sys.path.append(os.path.normpath(os.path.join(os.path.dirname(__file__), '..')))
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), '..')))
from otii_tcp_client import otii_connection, otii_exception, otii

import example_config as cfg
Expand Down
2 changes: 1 addition & 1 deletion otii_tcp_client/__init__.py
@@ -1 +1 @@
__version__ = "1.0.2"
__version__ = "1.0.3"
4 changes: 4 additions & 0 deletions otii_tcp_client/recording.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python
import unicodedata
from otii_tcp_client import otii_connection, otii_exception
from dateutil.parser import isoparse

CHUNK_SIZE = 2000

Expand All @@ -13,6 +14,7 @@ class Recording:
Attributes:
id (int): ID of the recording.
name (string): Name of the recording.
start_time (datetime.datetime): Start of the recording or None if unsupported by TCP server.
connection (:obj:OtiiConnection): Object to handle connection to the Otii server.
"""
Expand All @@ -25,6 +27,8 @@ def __init__(self, recording_dict, connection):
"""
self.id = recording_dict["recording_id"]
self.name = recording_dict["name"]
starttimestring = recording_dict.get("start-time")
self.start_time = isoparse(starttimestring) if starttimestring else None
self.connection = connection

def delete(self):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -16,7 +16,7 @@
long_description=long_description,
url="https://www.qoitech.com/",
keywords=["qoitech", "otii", "arc", "tcp"],
install_requires=[""],
install_requires=["python-dateutil>=2.7.0"],
classifiers=[
"Development Status :: 3 - Alpha", # Chose either "3 - Alpha", "4 - Beta" or "5 - Production/Stable" as the current state of your package
"Intended Audience :: Developers", # Define that your audience are developers
Expand Down

0 comments on commit 3d8c269

Please sign in to comment.