Skip to content

Commit 69444c5

Browse files
committed
Merge pull request #8 from Overdrivr/packaging
Packaging
2 parents e0cf657 + f6adc22 commit 69444c5

5 files changed

Lines changed: 99 additions & 13 deletions

File tree

MANIFEST.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
include *.md
2+
include *.png
3+
include *.svg

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This command line interface is for you if:
1515
If you recognize yourself with any of the above points, this application is for you.
1616

1717
## Overview
18-
pytelemetry-cli (this repo) is a **command line interface**. It provides a set of commands to connect to a device, read, plot and write data on it.
18+
pytelemetry-cli is a **command line interface**. It provides a set of commands to connect to a device, read, plot and write data on it.
1919
pytelemetry-cli relies on [`pytelemetry`](https://github.com/Overdrivr/pytelemetry)
2020
[![PyPI version](https://badge.fury.io/py/pytelemetry.svg)](https://badge.fury.io/py/pytelemetry)
2121
to implement the specific communication protocol.
@@ -77,10 +77,10 @@ The command line interface can be started like this
7777
python -m pytelemetrycli.cli
7878
```
7979

80-
#### help [command]
80+
### help [command]
8181
Without arguments, you get a list of all available commands. Otherwise the full `command` documentation.
8282

83-
#### ls
83+
### ls
8484
```bash
8585
Without options, prints a list of all received topics.
8686
With the --serial flag, prints a list of all available COM ports
@@ -91,7 +91,7 @@ Options:
9191
-s, --serial Use this flag to print a list of all available serial ports
9292
```
9393

94-
#### serial
94+
### serial
9595
```bash
9696
Connects pytelemetry to the serial port.
9797

@@ -101,7 +101,7 @@ Options:
101101
-b X, --bauds X Connection speed in bauds [default: 9600]
102102
```
103103

104-
#### print
104+
### print
105105
```bash
106106
Prints X last received samples from <topic>.
107107

@@ -111,28 +111,28 @@ Options:
111111
-a X, --amount X Amount of samples to display [default: 1]
112112
```
113113

114-
#### pub
114+
### pub
115115
```bash
116116
Publishes a (value | string) on <topic>.
117117

118118
Usage: pub <topic> <value> (--u8 | --u16 | --u32 | --i8 | --i16 | --i32 | --f32 | --s)
119119
```
120120

121-
#### plot
121+
### plot
122122
```bash
123123
Plots <topic> in a graph window.
124124

125125
Usage: plot <topic>
126126
```
127127

128-
#### disconnect
128+
### disconnect
129129
```bash
130130
Disconnects from any open connection.
131131

132132
Usage: disconnect
133133
```
134134

135-
#### quit
135+
### quit
136136
```bash
137137
Exits the terminal application.
138138

pytelemetrycli/cli.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
import topics
88
import runner
99
from serial.tools import list_ports
10-
import numpy as np
11-
from collections import deque
12-
from numpy.random import ranf
1310
import ui.superplot as ui
1411

1512
def docopt_cmd(func):
@@ -45,7 +42,7 @@ def __init__(self):
4542

4643
# pytelemetry setup
4744
self.transport = transports.SerialTransport()
48-
self.telemetry = tm.pytelemetry(self.transport)
45+
self.telemetry = tm.Pytelemetry(self.transport)
4946
self.topics = topics.Topics()
5047
self.runner = runner.Runner(self.transport,self.telemetry)
5148
self.telemetry.subscribe(None,self.topics.process)

setup.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[bdist_wheel]
2+
# This flag says that the code is written to work on both Python 2 and Python
3+
# 3. If at all possible, it is good practice to do this. If you cannot, you
4+
# will need to generate wheels for each Python version that you support.
5+
universal=0

setup.py

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
from setuptools import setup, find_packages, Extension
2+
from codecs import open
3+
from os import path
4+
from setuptools.dist import Distribution
5+
import pypandoc
6+
7+
pypandoc.convert('README.md', 'rst', outputfile="README.rst")
8+
9+
here = path.abspath(path.dirname(__file__))
10+
11+
# Get the long description from the README file
12+
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
13+
long_description = f.read()
14+
15+
setup(
16+
name='pytelemetrycli',
17+
18+
version='1.0.0',
19+
20+
description='command-line interface for superior communication with any embedded device.',
21+
long_description=long_description,
22+
23+
url='https://github.com/Overdrivr/pytelemetrycli',
24+
25+
author='Rémi Bèges',
26+
author_email='remi.beges@gmail.com',
27+
28+
license='MIT',
29+
30+
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
31+
classifiers=[
32+
'Development Status :: 4 - Beta',
33+
34+
# Indicate who your project is intended for
35+
'Intended Audience :: Developers',
36+
'Intended Audience :: End Users/Desktop',
37+
'Intended Audience :: Telecommunications Industry',
38+
'Topic :: Communications',
39+
'Topic :: Scientific/Engineering :: Human Machine Interfaces',
40+
'Topic :: Software Development :: Embedded Systems',
41+
'Topic :: Software Development :: Libraries :: Python Modules',
42+
43+
# Pick your license as you wish (should match "license" above)
44+
'License :: OSI Approved :: MIT License',
45+
46+
# Specify the Python versions you support here. In particular, ensure
47+
# that you indicate whether you support Python 2, Python 3 or both.
48+
'Programming Language :: Python :: 3.4',
49+
'Programming Language :: Python :: 3.5',
50+
],
51+
52+
keywords='cli plot debug lightweight communication protocol embedded telemetry remote program control',
53+
54+
# You can just specify the packages manually here if your project is
55+
# simple. Or you can use find_packages().
56+
packages=find_packages(),
57+
58+
# List run-time dependencies here. These will be installed by pip when
59+
# your project is installed. For an analysis of "install_requires" vs pip's
60+
# requirements files see:
61+
# https://packaging.python.org/en/latest/requirements.html
62+
install_requires=['pytelemetry','pyserial','docopt','pyqtgraph','numpy'],
63+
64+
# List additional groups of dependencies here (e.g. development
65+
# dependencies). You can install these using the following syntax,
66+
# for example:
67+
# $ pip install -e .[dev,test]
68+
extras_require={
69+
'dev': ['check-manifest'],
70+
'test': ['pytest','pytest-cov'],
71+
},
72+
73+
# To provide executable scripts, use entry points in preference to the
74+
# "scripts" keyword. Entry points provide cross-platform support and allow
75+
# pip to create the appropriate form of executable for the target platform.
76+
entry_points={
77+
'console_scripts': [
78+
'tlm = pytelemetrycli.cli:main',
79+
],
80+
},
81+
)

0 commit comments

Comments
 (0)