iqmotion


Nameiqmotion JSON
Version 0.24.2 PyPI version JSON
download
home_pagehttps://github.com/iq-motion-control/iq-module-communication-python
SummaryPython libraries to talk to IQ Motion Control devices
upload_time2024-11-06 15:42:15
maintainerNone
docs_urlNone
authorBen Quan, Malik B. Parker, Raphael Van Hoffelen
requires_python>=3.7
licenselgpl-3.0
keywords iq iq control iq motion control api iq modules iq libraries
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # IQ Motion Python API

![Python Build](https://github.com/iq-motion-control/iq-module-communication-python/workflows/Python%20Build/badge.svg)
[![codecov](https://codecov.io/gh/iq-motion-control/iq-module-communication-python/branch/master/graph/badge.svg)](https://codecov.io/gh/iq-motion-control/iq-module-communication-python)
![tag](https://img.shields.io/github/v/tag/iq-motion-control/iq-module-communication-python)
![release](https://img.shields.io/github/release/iq-motion-control/iq-module-communication-python/all.svg)

This library is to talk to any IQ Control devices from mulititude of communication protocols.

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.  
To Learn more about this API, Read the [Communications API Documentation](https://iq-motion-control-iqmotion.readthedocs-hosted.com/en/latest/) 

### Prerequisites

#### Pipenv

Read the second part of [this](https://hackernoon.com/reaching-python-development-nirvana-bb5692adf30c) and [this](https://pipenv-fork.readthedocs.io/en/latest/basics.html) for more information on pipenv.

Windows and mac users:

- [installing pipenv](https://medium.com/@mahmudahsan/how-to-use-python-pipenv-in-mac-and-windows-1c6dc87b403e)

Linux users:

- [installing pipenv](https://github.com/pypa/pipenv)

### Installing

You can install this library using "pipenv" or "pip":

```bash
pipenv install iqmotion
```

or

```bash
pip install iqmotion
```

If you want to edit this library and/or run some tests, You can clone this repository locally on your computer.

### Submodule

If you are using this repository as a submodule, make sure to make a symbolic link:

```bash
ln -s python_api/iqmotion iqmotion
```

If you prefer **not** to use symbolic links, you could dynamically append the library to your system PATH at runtime by following along with the example below:

```bash
├── examples 
│   ├── api_testing.py <---------------(current python script)
│   ├── async_example.py
│   ├── multi_turn_example.py
│   └── propeller_example.py
├── iqmotion   <-----------------------(IQMOTION API LIBRARY)
│   ├── client_entries
│   │   ├── client_entry_data.py
│   │   ├── client_entry.py
│   │   ├── dictionary_client_entry.py
│   │   ├── __init__.py
│   │   └── process_client_entry.py
│   ├── clients
```

If you wanted to run api_testing.py from the examples Directory, you would need to append the iqmotion library to the system path at the top of my api_testing.py script:

```python
import sys

#  Adds the parent directory to the system path 
# (Same location that the iqmotion library is located)
sys.path.append("../") 
```

## Running the tests

You will need the following packages to run the tests:

- pytest
- pytest-cov

They should be already installed with pipenv.

You can then run the software tests with the following command:

```shell
pytest ./iqmotion/tests/ --cov-config=.coveragerc --cov=iqmotion --cov-fail-under=100
```

The test will fail if coverage is under 100%

You can run the hardware tests with the following commands:

```shell
python run_hardware_tests.py speed --usb_handle=/dev/ttyUSB0
python run_hardware_tests.py servo --usb_handle=/dev/ttyUSB0
python run_hardware_tests.py step_dir --usb_handle=/dev/ttyUSB0
```

## Clean Code

### Formatting

We use [black](https://github.com/psf/black) as a formatter. It does everything for you and it should be installed with the dev packages of pipenv.  
I recommend setting up your IDE to format with black when saving. Vscode has a known issue sometimes with new .py files where you need to run black in the terminal first
You can also run black from the terminal with:

```bash
black ./
```

### Linting

We use [pylint](https://www.pylint.org/) as a linter. It does everything for you and it should be installed with the dev packages of pipenv.  
We have a [.pylintrc](./.pylintrc) file that setups your pylint for you.

I would recommend to set up your IDE to use pylint automatically (vscode should find the .pylintrc automatically).

Sometimes pylint shouts at out some errors you do not wantc you can disbale a pylint error locally in a file/method/class with a comment like this:

```python
# pytlint: disable=my-error
```

You can also run pylint from the terminal with the following command:

```bash
pylint your_project_directory
```

## New Releases

It is really easy to create a new release, simply run the following script and follow the prompt:

(You might need to run the following command to use a bash script in windows):

```bash
dos2unix ./ci_scripts/new_release.sh
```

```bash
./ci_scripts/new_release.sh
```

## Versioning

We use [SemVer](http://semver.org/) for versioning.

## Contributing

Please read [CONTRIBUTING.md](https://github.com/iq-motion-control/iq-module-communication-python/blob/master/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.

## Authors

- **Raphael Van Hoffelen**
- **Malik B. Parker**

See also the list of [contributors](https://github.com/iq-motion-control/iq-module-communication-python/blob/master/contributors.md) who participated in this project.

## License

This project is licensed under the MIT License - see the [LICENSE](https://github.com/iq-motion-control/iq-module-communication-python/blob/master/LICENSE) file for details

## Acknowledgments

- Matt Piccoli for helping out debugging the architecture and continuously testing the API.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/iq-motion-control/iq-module-communication-python",
    "name": "iqmotion",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "IQ, IQ CONTROL, IQ MOTION CONTROL, API, IQ MODULES, IQ LIBRARIES",
    "author": "Ben Quan, Malik B. Parker, Raphael Van Hoffelen",
    "author_email": "ben.quan@vertiq.co",
    "download_url": "https://files.pythonhosted.org/packages/87/4e/155a9eed118fd318aa7a628d252661d8adc62ed930efd1138209adbf8daf/iqmotion-0.24.2.tar.gz",
    "platform": null,
    "description": "# IQ Motion Python API\n\n![Python Build](https://github.com/iq-motion-control/iq-module-communication-python/workflows/Python%20Build/badge.svg)\n[![codecov](https://codecov.io/gh/iq-motion-control/iq-module-communication-python/branch/master/graph/badge.svg)](https://codecov.io/gh/iq-motion-control/iq-module-communication-python)\n![tag](https://img.shields.io/github/v/tag/iq-motion-control/iq-module-communication-python)\n![release](https://img.shields.io/github/release/iq-motion-control/iq-module-communication-python/all.svg)\n\nThis library is to talk to any IQ Control devices from mulititude of communication protocols.\n\n## Getting Started\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes.  \nTo Learn more about this API, Read the [Communications API Documentation](https://iq-motion-control-iqmotion.readthedocs-hosted.com/en/latest/) \n\n### Prerequisites\n\n#### Pipenv\n\nRead the second part of [this](https://hackernoon.com/reaching-python-development-nirvana-bb5692adf30c) and [this](https://pipenv-fork.readthedocs.io/en/latest/basics.html) for more information on pipenv.\n\nWindows and mac users:\n\n- [installing pipenv](https://medium.com/@mahmudahsan/how-to-use-python-pipenv-in-mac-and-windows-1c6dc87b403e)\n\nLinux users:\n\n- [installing pipenv](https://github.com/pypa/pipenv)\n\n### Installing\n\nYou can install this library using \"pipenv\" or \"pip\":\n\n```bash\npipenv install iqmotion\n```\n\nor\n\n```bash\npip install iqmotion\n```\n\nIf you want to edit this library and/or run some tests, You can clone this repository locally on your computer.\n\n### Submodule\n\nIf you are using this repository as a submodule, make sure to make a symbolic link:\n\n```bash\nln -s python_api/iqmotion iqmotion\n```\n\nIf you prefer **not** to use symbolic links, you could dynamically append the library to your system PATH at runtime by following along with the example below:\n\n```bash\n\u251c\u2500\u2500 examples \n\u2502\u00a0\u00a0 \u251c\u2500\u2500 api_testing.py <---------------(current python script)\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 async_example.py\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 multi_turn_example.py\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 propeller_example.py\n\u251c\u2500\u2500 iqmotion   <-----------------------(IQMOTION API LIBRARY)\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 client_entries\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 client_entry_data.py\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 client_entry.py\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 dictionary_client_entry.py\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 __init__.py\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 process_client_entry.py\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 clients\n```\n\nIf you wanted to run api_testing.py from the examples Directory, you would need to append the iqmotion library to the system path at the top of my api_testing.py script:\n\n```python\nimport sys\n\n#  Adds the parent directory to the system path \n# (Same location that the iqmotion library is located)\nsys.path.append(\"../\") \n```\n\n## Running the tests\n\nYou will need the following packages to run the tests:\n\n- pytest\n- pytest-cov\n\nThey should be already installed with pipenv.\n\nYou can then run the software tests with the following command:\n\n```shell\npytest ./iqmotion/tests/ --cov-config=.coveragerc --cov=iqmotion --cov-fail-under=100\n```\n\nThe test will fail if coverage is under 100%\n\nYou can run the hardware tests with the following commands:\n\n```shell\npython run_hardware_tests.py speed --usb_handle=/dev/ttyUSB0\npython run_hardware_tests.py servo --usb_handle=/dev/ttyUSB0\npython run_hardware_tests.py step_dir --usb_handle=/dev/ttyUSB0\n```\n\n## Clean Code\n\n### Formatting\n\nWe use [black](https://github.com/psf/black) as a formatter. It does everything for you and it should be installed with the dev packages of pipenv.  \nI recommend setting up your IDE to format with black when saving. Vscode has a known issue sometimes with new .py files where you need to run black in the terminal first\nYou can also run black from the terminal with:\n\n```bash\nblack ./\n```\n\n### Linting\n\nWe use [pylint](https://www.pylint.org/) as a linter. It does everything for you and it should be installed with the dev packages of pipenv.  \nWe have a [.pylintrc](./.pylintrc) file that setups your pylint for you.\n\nI would recommend to set up your IDE to use pylint automatically (vscode should find the .pylintrc automatically).\n\nSometimes pylint shouts at out some errors you do not wantc you can disbale a pylint error locally in a file/method/class with a comment like this:\n\n```python\n# pytlint: disable=my-error\n```\n\nYou can also run pylint from the terminal with the following command:\n\n```bash\npylint your_project_directory\n```\n\n## New Releases\n\nIt is really easy to create a new release, simply run the following script and follow the prompt:\n\n(You might need to run the following command to use a bash script in windows):\n\n```bash\ndos2unix ./ci_scripts/new_release.sh\n```\n\n```bash\n./ci_scripts/new_release.sh\n```\n\n## Versioning\n\nWe use [SemVer](http://semver.org/) for versioning.\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](https://github.com/iq-motion-control/iq-module-communication-python/blob/master/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.\n\n## Authors\n\n- **Raphael Van Hoffelen**\n- **Malik B. Parker**\n\nSee also the list of [contributors](https://github.com/iq-motion-control/iq-module-communication-python/blob/master/contributors.md) who participated in this project.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/iq-motion-control/iq-module-communication-python/blob/master/LICENSE) file for details\n\n## Acknowledgments\n\n- Matt Piccoli for helping out debugging the architecture and continuously testing the API.\n\n\n",
    "bugtrack_url": null,
    "license": "lgpl-3.0",
    "summary": "Python libraries to talk to IQ Motion Control devices",
    "version": "0.24.2",
    "project_urls": {
        "Download": "https://github.com/iq-motion-control/iq-module-communication-python/releases",
        "Homepage": "https://github.com/iq-motion-control/iq-module-communication-python"
    },
    "split_keywords": [
        "iq",
        " iq control",
        " iq motion control",
        " api",
        " iq modules",
        " iq libraries"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "369ebed7560ec23af45e994925c59e5d8ade887d68412cb1f64f56c05d848dcc",
                "md5": "89302258b7075cbb3bf0d6e124571603",
                "sha256": "4bbd71f9a6b91268527b2a56f2adb427e8f5f631d7d7af837c419395202ae536"
            },
            "downloads": -1,
            "filename": "iqmotion-0.24.2-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "89302258b7075cbb3bf0d6e124571603",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.7",
            "size": 61993,
            "upload_time": "2024-11-06T15:42:13",
            "upload_time_iso_8601": "2024-11-06T15:42:13.565211Z",
            "url": "https://files.pythonhosted.org/packages/36/9e/bed7560ec23af45e994925c59e5d8ade887d68412cb1f64f56c05d848dcc/iqmotion-0.24.2-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "874e155a9eed118fd318aa7a628d252661d8adc62ed930efd1138209adbf8daf",
                "md5": "142bebd30d4bf0a7d159b52b524ebdbe",
                "sha256": "c96a96c4f918cc5e702e00878f5429ca05f07587be4b9ffd8d52e01defac4a2e"
            },
            "downloads": -1,
            "filename": "iqmotion-0.24.2.tar.gz",
            "has_sig": false,
            "md5_digest": "142bebd30d4bf0a7d159b52b524ebdbe",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 37661,
            "upload_time": "2024-11-06T15:42:15",
            "upload_time_iso_8601": "2024-11-06T15:42:15.056912Z",
            "url": "https://files.pythonhosted.org/packages/87/4e/155a9eed118fd318aa7a628d252661d8adc62ed930efd1138209adbf8daf/iqmotion-0.24.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-06 15:42:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "iq-motion-control",
    "github_project": "iq-module-communication-python",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": false,
    "requirements": [],
    "lcname": "iqmotion"
}
        
Elapsed time: 0.34106s