Skip to content

Commit 8eec0d3

Browse files
author
James Boulton
committed
fixn the test and doc updates
1 parent 74944f7 commit 8eec0d3

5 files changed

Lines changed: 280 additions & 96 deletions

File tree

.flake8

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[flake8]
2+
max-line-length = 260
3+
per-file-ignores = __init__.py:F401
4+
exclude =
5+
.git,
6+
__pycache__,
7+
.tox,
8+
venv,
9+
.venv,
10+
build,
11+
dist,
12+
*.egg-info

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,23 @@ Dashio Phone | Dashio Tablet
5252

5353
## Install
5454

55-
`pip3 install dashio`
55+
### From PyPI (Recommended)
5656

57-
Or
57+
```sh
58+
pip3 install dashio
59+
```
60+
61+
### From Source
62+
63+
For development (editable install):
64+
65+
```sh
66+
git clone https://github.com/dashio-connect/python-dashio.git
67+
cd python-dashio
68+
pip3 install -e .
69+
```
70+
71+
For regular installation:
5872

5973
```sh
6074
git clone https://github.com/dashio-connect/python-dashio.git

dashio/__init__.py

Lines changed: 42 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -32,76 +32,49 @@
3232
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
3333
SOFTWARE.
3434
"""
35-
try:
36-
from importlib.metadata import version, PackageNotFoundError
37-
except ImportError:
38-
# Python < 3.8
39-
from importlib_metadata import version, PackageNotFoundError
40-
41-
try:
42-
__version__ = version("dashio")
43-
except PackageNotFoundError:
44-
__version__ = "unknown"
45-
46-
from .device import Device
47-
from .tcp_connection import TCPConnection
48-
from .mqtt_connection import MQTTConnection
49-
from .zmq_connection import ZMQConnection
50-
from .dash_connection import DashConnection
51-
from .lte_767x_connection import Lte767xConnection
5235
from .comms_module_connection import DashIOCommsModuleConnection
53-
from .schedular import Schedular
54-
from .load_config import decode_cfg64, encode_cfg64, load_all_controls_from_config, get_control_dict_from_config, get_control_from_config
55-
# from .bleconnection import BLEConnection
56-
from .iotcontrol.enums import (
57-
Color,
58-
Icon,
59-
Precision,
60-
SoundName,
61-
Keyboard,
62-
TextAlignment,
63-
TitlePosition,
64-
SliderBarStyle,
65-
DialNumberPosition,
66-
DialStyle,
67-
ChartLineType,
68-
TimeGraphLineType,
69-
TimeGraphPositionOfKey,
70-
ButtonState,
71-
LabelStyle,
72-
KnobStyle,
73-
ChartXAxisLabelsStyle,
74-
TextFormat,
75-
DirectionStyle,
76-
ColorPickerStyle,
77-
ControlName,
78-
ButtonStyle,
79-
ButtonGroupStyle,
80-
MenuStyle,
81-
ConnectionState,
82-
BarMode,
83-
DialMode
84-
)
36+
from .dash_connection import DashConnection
37+
from .device import Device
38+
from .iotcontrol.alarm import Alarm
8539
from .iotcontrol.audio_visual_display import AudioVisualDisplay
86-
from .iotcontrol.chart import Chart, ChartLine
87-
from .iotcontrol.slider import Slider
88-
from .iotcontrol.textbox import TextBox
8940
from .iotcontrol.button import Button
90-
from .iotcontrol.time_graph import TimeGraph, TimeGraphLine, DataPoint, DataPointArray
91-
from .iotcontrol.knob import Knob
41+
from .iotcontrol.button_group import ButtonGroup
42+
from .iotcontrol.chart import Chart, ChartLine
43+
from .iotcontrol.color_picker import ColorPicker
44+
from .iotcontrol.control import Control, ControlPosition
45+
from .iotcontrol.device_view import DeviceView
9246
from .iotcontrol.dial import Dial
9347
from .iotcontrol.direction import Direction
48+
# from .bleconnection import BLEConnection
49+
from .iotcontrol.enums import (BarMode, ButtonGroupStyle, ButtonState,
50+
ButtonStyle, ChartLineType,
51+
ChartXAxisLabelsStyle, Color, ColorPickerStyle,
52+
ConnectionState, ControlName, DialMode,
53+
DialNumberPosition, DialStyle, DirectionStyle,
54+
Icon, Keyboard, KnobStyle, LabelStyle,
55+
MenuStyle, Precision, SliderBarStyle, SoundName,
56+
TextAlignment, TextFormat, TimeGraphLineType,
57+
TimeGraphPositionOfKey, TitlePosition)
58+
from .iotcontrol.event_log import EventData, EventLog
59+
from .iotcontrol.knob import Knob
60+
from .iotcontrol.label import Label
9461
from .iotcontrol.map import Map, MapLocation
95-
from .iotcontrol.alarm import Alarm
9662
from .iotcontrol.menu import Menu
9763
from .iotcontrol.selector import Selector
98-
from .iotcontrol.label import Label
99-
from .iotcontrol.device_view import DeviceView
100-
from .iotcontrol.control import Control, ControlPosition
101-
from .iotcontrol.button_group import ButtonGroup
102-
from .iotcontrol.event_log import EventData, EventLog
103-
from .iotcontrol.color_picker import ColorPicker
64+
from .iotcontrol.slider import Slider
10465
from .iotcontrol.table import Table, TableRow
66+
from .iotcontrol.textbox import TextBox
67+
from .iotcontrol.time_graph import (DataPoint, DataPointArray, TimeGraph,
68+
TimeGraphLine)
69+
from .load_config import (decode_cfg64, encode_cfg64,
70+
get_control_dict_from_config,
71+
get_control_from_config,
72+
load_all_controls_from_config)
73+
from .lte_767x_connection import Lte767xConnection
74+
from .mqtt_connection import MQTTConnection
75+
from .schedular import Schedular
76+
from .tcp_connection import TCPConnection
77+
from .zmq_connection import ZMQConnection
10578

10679
__all__ = [
10780
'Device',
@@ -173,3 +146,11 @@
173146
'EventLog',
174147
'ColorPicker'
175148
]
149+
150+
151+
from importlib.metadata import PackageNotFoundError, version
152+
153+
try:
154+
__version__ = version("dashio")
155+
except PackageNotFoundError:
156+
__version__ = "unknown"

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,13 @@ authors = [
1212
]
1313
license = "MIT"
1414
classifiers = [
15-
"Programming Language :: Python :: 3.9",
1615
"Programming Language :: Python :: 3.10",
1716
"Programming Language :: Python :: 3.11",
1817
"Programming Language :: Python :: 3.12",
1918
"Programming Language :: Python :: 3.13",
2019
"Operating System :: OS Independent",
2120
]
22-
requires-python = ">=3.9"
21+
requires-python = ">=3.10"
2322
dependencies = [
2423
"paho-mqtt>=2.0.0",
2524
"pyzmq",
@@ -74,4 +73,5 @@ no_implicit_reexport = true
7473

7574
[tool.flake8]
7675
max-line-length = 260
77-
per-file-ignores = "__init__.py:F401"
76+
per-file-ignores = "__init__.py:F401"
77+
exclude = [".git", "__pycache__", ".tox", "venv", ".venv", "build", "dist", "*.egg-info"]

0 commit comments

Comments
 (0)