From 345f8e7d8fcae75ae7b0cdf1363065a5811c4395 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=2EA=2E=20Bayta=C5=9F?= Date: Tue, 21 Aug 2018 09:59:19 +0200 Subject: [PATCH 1/2] Update README.md --- README.md | 53 ++++++++++++++++++++--------------------------------- 1 file changed, 20 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 1f1d5f7..430d46f 100644 --- a/README.md +++ b/README.md @@ -1,51 +1,38 @@ -Qualisys SDK for Python -================================ +# Qualisys SDK for Python -The Qualisys SDK for Python implements our RealTime(RT) and REST SDKs and works with Python 2.7 and 3. +The Qualisys SDK for Python implements our real-time (RT) and REST protocols, and works with both Python 2.7 and 3+. -Installation ------------- +## Installation -The easiest way to install the qtm package is by using [pip]((https://pip.pypa.io/en/stable/installing/)): +The Qualisys SDK for Python is available as a package named *qtm* that can be installed using [pip](https://pip.pypa.io/en/stable/installing/): -``` -python -m pip install pip --upgrade # Upgrade to latest pip -python -m pip install qtm -``` + python -m pip install pip --upgrade # Upgrade to latest pip + python -m pip install qtm -It's also possible to install from github: +The package can also be installed from the source on GitHub: -``` -python -m pip install git+https://github.com/qualisys/qualisys_python_sdk.git -``` + python -m pip install git+https://github.com/qualisys/qualisys_python_sdk.git -Or just clone the repo and copy the qtm folder into you project folder, -although this will require you to install the dependencies manually. +You can also clone the repo on your local machine and copy the *qtm* folder into you project folder. (This will require that you install dependencies manually.) -Dependencies ------------- +## Dependencies * twisted > 16.4.1 (Lower version will probably work fine, but not with python 3) * enum34 for Python versions lower than 3.4 * pywin32 for windows (can be installed with pip as pypiwin32) -Documentation -------------- +## Documentation -https://qualisys.github.io/qualisys_python_sdk/index.html +Documentation is available at: https://qualisys.github.io/qualisys_python_sdk/index.html -Examples --------- +## Examples -See the examples folder. +Example scripts can be found in the *examples* folder. -Missing RT features and limitations ------------------------------------ +## Caveats -Implementation only uses little endian, should connect to standard port 22223. -Version should be at least 1.13. - -GetCaptureC3D is not implemented. -GetCaptureQTM is not implemented. - -No support for selecting analog channel. +- Implementation only uses little endian, should connect to standard port 22223. +- Version should be at least 1.13. +- GetCaptureC3D is not implemented. +- GetCaptureQTM is not implemented. +- No support for selecting analog channel. From c3f94ee4d986c4b63fec6655087e0be7656c359e Mon Sep 17 00:00:00 2001 From: Martin Gejke Date: Tue, 4 Sep 2018 10:39:12 +0200 Subject: [PATCH 2/2] Updated tests, still refers to hardcoded path though --- setup.py | 2 +- test/rest_test.py | 2 +- test/rt_test.py | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 8e70ace..08dd288 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ ":sys_platform=='win32'": ['pypiwin32'] } -version = '1.0.1' +version = '1.0.2' setup(name='qtm', version=version, diff --git a/test/rest_test.py b/test/rest_test.py index eeb3ad1..0c5a430 100644 --- a/test/rest_test.py +++ b/test/rest_test.py @@ -81,7 +81,7 @@ def test_get_v1(self): def test_get_experimental(self): d = self.rest.get_experimental() - d.addCallback(self.assertEqual, ['command', 'settings', 'workerstate']) + d.addCallback(self.assertEqual, ['command', 'measurements', 'settings', 'workerstate']) return d def test_get_workerstate(self): diff --git a/test/rt_test.py b/test/rt_test.py index efdde75..a7d1cf8 100644 --- a/test/rt_test.py +++ b/test/rt_test.py @@ -12,6 +12,8 @@ from qtm import QRT, QRTConnection, QRTCommandException +MEASUREMENT = "e:/measurements/3d_analog_6dof_big27file.qtm" + class TestConnection(unittest.TestCase): def setUp(self): @@ -63,7 +65,7 @@ def setUp(self): self.qrt.connect(on_connect=self.on_connect, on_disconnect=None, on_event=None) yield self.defered_connection yield self.connection.take_control('password') - yield self.connection.load("d:/measurements/3d_analog_6dof_big27file.qtm") + yield self.connection.load(MEASUREMENT) yield self.connection.start(rtfromfile=True) def tearDown(self): @@ -171,7 +173,7 @@ def setUp(self): yield self.defered_connection yield self.defered_connection yield self.connection.take_control('password') - yield self.connection.load("d:/measurements/3d_analog_6dof_big27file.qtm") + yield self.connection.load(MEASUREMENT) yield self.connection.start(rtfromfile=True) def tearDown(self): @@ -268,7 +270,7 @@ def test_get_parameters(self): def test_multiple_commands(self): d = [] d.append(self.connection.take_control("password")) - d.append(self.connection.load("d:\measurements\FirstMiqusMeasurement.qtm")) + d.append(self.connection.load(MEASUREMENT)) d.append(self.connection.start(rtfromfile=True)) d.append(self.connection.stop()) d.append(self.connection.close())