Skip to content

Commit

Permalink
Release 0.2.0 (#7)
Browse files Browse the repository at this point in the history
## Summary

Release 0.2.0

### Why?

Bugfixes, improving test coverage and code quality, and fixing the local
notebook environment.

### How?

- Install pysparkplug in the notebook image without git by using
SETUPTOOLS_SCM_PRETEND_VERSION environment variable.
- Add requirements/requirements.txt to .dockerignore so it can be used
when installing pysparkplug in the notebook image.
- Prep changelog for 0.2.0
- Update notebooks with results from the latest code.
- Update notebooks/run.sh to also start the emqx message broker, and to
clean up after itself using docker compose down.
- Have unit tests queue the coverage session in noxfile.py if they run
with coverage.
- Remove invalid-enum-extension pylint error since we're now inheriting
from StrEnum.
- Added full test coverage for _topic.py in test_topic.py, and improved
minimum coverage score.
- Updated requirements files, pinning sphinx to 7.1.2 in docs.in since
sphinx-notfound-page doesn't yet support 7.2
- Created a _constants.py module for shared constants between modules,
and used it to create wildcard constants with convenient type annotation
compatible with the Topic class.
- Removed topic.to_str() since it is redundant with str(topic).
- Added backports' implementation of StrEnum to _strenum.py to resolve
bug with how the old implementation of StrEnum was rendering enums to
string.
- Fixewd bug with incorrect wildcards used for validating and creating
topic components.
- No longer importing Literal from typing_extensions since it is in
Python 3.8.

## Checklist

Most checks are automated, but a few aren't, so make sure to go through
and tick them off, even if they don't apply. This checklist is here to
help, not deter you. Remember, "Slow is smooth, and smooth is fast".

- [X] **Unit tests**
  - Every input should have a test for it.
- Every potential raised exception should have a test ensuring it is
raised.
- [x] **Documentation**
  - New functions/classes/etc. must be added to `docs/api.rst`.
- Changed/added classes/methods/functions have appropriate
`versionadded`, `versionchanged`, or `deprecated`
[directives](http://www.sphinx-doc.org/en/stable/markup/para.html#directive-versionadded).
- The appropriate entry in `CHANGELOG.md` has been included in the
"Unreleased" section, i.e. "Added", "Changed", "Deprecated", "Removed",
"Fixed", or "Security".
- [X] **Future work**
- Future work should be documented in the contributor guide, i.e.
`.github/CONTRIBUTING.md`.

If you have any questions not answered by a quick readthrough of the
[contributor
guide](https://pysparkplug.mattefay.com/en/latest/contributor_guide.html),
add them to this PR and submit it.
  • Loading branch information
matteosox authored Aug 24, 2023
1 parent ce69a48 commit 499542e
Show file tree
Hide file tree
Showing 32 changed files with 531 additions and 106 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
*

# Except files we explicitly need, grouped by copy command
!.git
!src/pysparkplug
src/**/__pycache__/
src/**/*.egg-info/
!pyproject.toml
!README.md
!LICENSE
!requirements/requirements.txt
2 changes: 2 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,5 @@ When naming a branch, please use the syntax `username/branch-name-here`. If you
- Historian/analytics (just listens)
- Refactor all of `_payload.py`.
- Refactor `_datatype.py` for better type annotation.
- Add validation for correct combinations of group_id, edge_node_id, etc. to `Topic.__init__`.
- Unpin `sphinx` in `requirements/docs.in` once `sphinx-notfound-page` supports the breaking changes introduced in version 7.2.
3 changes: 1 addition & 2 deletions .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@ jobs:
- name: Run unit tests
run: nox --session unit_tests-${{ matrix.python-version }}

- name: Combine coverage reports
- name: Generate coverage report
run: |
coverage combine
coverage xml --fail-under 0
- name: Upload coverage reports to Codecov
Expand Down
12 changes: 7 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,21 @@
All notable changes for `pysparkplug` will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a Changelog](http://keepachangelog.com/).

## Unreleased
## 0.2.0 (2023-08-23)

### Added
- `SINGLE_LEVEL_WILDCARD` and `MULTI_LEVEL_WILDCARD` wildcards for subscribing to multiple MQTT topics, conveniently typed to pass type checking

### Changed

### Deprecated
- Refactored how dependencies are entered into the package's metadata, using `hatch-requirements-txt` referencing `requirements/requirements.txt`

### Removed
- Removed `Topic.to_string()`, since users should just use `str(topic)`.

### Fixed

### Security
- Explicitly making `MetricValue` available from the top-level package, resolving any type annotation issues.
- Fixed bug with implementation of `StrEnum` that resulted in enums not converting correctly to string. This resulted in topics not rendering to string correctly, since the `message_type` attribute was `MessageType`, an instance of `StrEnum`.
- Fixed bug with topic component validation, which was using the wrong wildcard constants `"#*"` instead of the correct `"#+"`.

## 0.1.0 (2023-08-13)

Expand Down
6 changes: 6 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Summary
ErrorCode
MQTTError
MQTTProtocol
MULTI_LEVEL_WILDCARD
Message
MessageType
Metric
Expand All @@ -30,6 +31,7 @@ Summary
NData
NDeath
QoS
SINGLE_LEVEL_WILDCARD
State
TLSConfig
Topic
Expand Down Expand Up @@ -137,3 +139,7 @@ Odds & Ends
.. autoclass:: MetricValue

.. autoexception:: MQTTError

.. autodata:: SINGLE_LEVEL_WILDCARD

.. autodata:: MULTI_LEVEL_WILDCARD
2 changes: 1 addition & 1 deletion notebook.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ WORKDIR /home/jovyan/pysparkplug

# Install requirements
COPY --chown=${NB_UID}:${NB_GID} . .
RUN pip install --quiet --no-cache-dir --editable . && \
RUN SETUPTOOLS_SCM_PRETEND_VERSION=1.0 pip install --quiet --no-cache-dir --editable . && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"
38 changes: 19 additions & 19 deletions notebooks/dcmd_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,36 @@
"import pysparkplug as psp\n",
"\n",
"\n",
"client = psp.Client()"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "9be5b6aa-67e6-4d4f-966f-e7df0ba982d5",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"host = \"emqx\"\n",
"port = 1883\n",
"username = \"\"\n",
"password = \"\"\n",
"\n",
"client = psp.Client(\n",
" username=username,\n",
" password=password,\n",
")\n",
"\n",
"client.connect(\n",
" host,\n",
" port=port,\n",
" blocking=False,\n",
")"
"client.connect(host)"
]
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 3,
"id": "fa6b1285-8462-479c-a535-7c31e76dfed1",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"group_id = \"Fab\"\n",
"edge_node_id = \"Opto3 Edge Node\"\n",
"device_id = \"LIQUID\"\n",
"name = \"CM_FEED/Auto_FlowSP\"\n",
"group_id = \"my_group\"\n",
"edge_node_id = \"my_edge_node\"\n",
"device_id = \"my_device\"\n",
"name = \"my_metric\"\n",
"value = 1.1\n",
"\n",
"metrics = (\n",
Expand All @@ -59,7 +59,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 4,
"id": "9ef61b7d-c46c-4ff4-99c4-9ec2493a08e2",
"metadata": {
"tags": []
Expand Down
91 changes: 90 additions & 1 deletion notebooks/inspect_mqtt.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,97 @@
"name": "stdout",
"output_type": "stream",
"text": [
"From spBv1.0/my_group/NBIRTH/my_edge_node (QoS=0, retain=0):\n",
" Metric(timestamp=1692826699804, name='uint8', datatype=<DataType.UINT8: 5>, value=1, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='uint16', datatype=<DataType.UINT16: 6>, value=2, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='uint32', datatype=<DataType.UINT32: 7>, value=3, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='uint64', datatype=<DataType.UINT64: 8>, value=4, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='int8', datatype=<DataType.INT8: 1>, value=-1, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='int16', datatype=<DataType.INT16: 2>, value=-2, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='int32', datatype=<DataType.INT32: 3>, value=-3, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='int64', datatype=<DataType.INT64: 4>, value=-4, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='float', datatype=<DataType.FLOAT: 9>, value=1.100000023841858, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='double', datatype=<DataType.DOUBLE: 10>, value=2.2, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='boolean', datatype=<DataType.BOOLEAN: 11>, value=True, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='string', datatype=<DataType.STRING: 12>, value='hello world', alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='datetime', datatype=<DataType.DATETIME: 13>, value=datetime.datetime(1990, 9, 3, 5, 4, 3, tzinfo=datetime.timezone.utc), alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='text', datatype=<DataType.TEXT: 14>, value='iamatext', alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='uuid', datatype=<DataType.UUID: 15>, value='iamauuid', alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='bytes', datatype=<DataType.BYTES: 17>, value=b'iamabytes', alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='file', datatype=<DataType.FILE: 18>, value=b'iamafile', alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='null_uint8', datatype=<DataType.UINT8: 5>, value=None, alias=None, is_historical=False, is_transient=False, is_null=True)\n",
" Metric(timestamp=1692826699804, name='historical_uint8', datatype=<DataType.UINT8: 5>, value=1, alias=None, is_historical=True, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='transient_uint8', datatype=<DataType.UINT8: 5>, value=1, alias=None, is_historical=False, is_transient=True, is_null=False)\n",
" Metric(timestamp=1692826699804, name='bdSeq', datatype=<DataType.INT64: 4>, value=0, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
"From spBv1.0/my_group/DBIRTH/my_edge_node/my_device (QoS=0, retain=0):\n",
" Metric(timestamp=1692826699804, name='uint8', datatype=<DataType.UINT8: 5>, value=1, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='uint16', datatype=<DataType.UINT16: 6>, value=2, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='uint32', datatype=<DataType.UINT32: 7>, value=3, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='uint64', datatype=<DataType.UINT64: 8>, value=4, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='int8', datatype=<DataType.INT8: 1>, value=-1, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='int16', datatype=<DataType.INT16: 2>, value=-2, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='int32', datatype=<DataType.INT32: 3>, value=-3, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='int64', datatype=<DataType.INT64: 4>, value=-4, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='float', datatype=<DataType.FLOAT: 9>, value=1.100000023841858, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='double', datatype=<DataType.DOUBLE: 10>, value=2.2, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='boolean', datatype=<DataType.BOOLEAN: 11>, value=True, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='string', datatype=<DataType.STRING: 12>, value='hello world', alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='datetime', datatype=<DataType.DATETIME: 13>, value=datetime.datetime(1990, 9, 3, 5, 4, 3, tzinfo=datetime.timezone.utc), alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='text', datatype=<DataType.TEXT: 14>, value='iamatext', alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='uuid', datatype=<DataType.UUID: 15>, value='iamauuid', alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='bytes', datatype=<DataType.BYTES: 17>, value=b'iamabytes', alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='file', datatype=<DataType.FILE: 18>, value=b'iamafile', alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='null_uint8', datatype=<DataType.UINT8: 5>, value=None, alias=None, is_historical=False, is_transient=False, is_null=True)\n",
" Metric(timestamp=1692826699804, name='historical_uint8', datatype=<DataType.UINT8: 5>, value=1, alias=None, is_historical=True, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='transient_uint8', datatype=<DataType.UINT8: 5>, value=1, alias=None, is_historical=False, is_transient=True, is_null=False)\n",
"From spBv1.0/my_group/NDATA/my_edge_node (QoS=0, retain=0):\n",
" Metric(timestamp=1692826699804, name='uint8', datatype=<DataType.UINT8: 5>, value=1, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='uint16', datatype=<DataType.UINT16: 6>, value=2, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='uint32', datatype=<DataType.UINT32: 7>, value=3, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='uint64', datatype=<DataType.UINT64: 8>, value=4, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='int8', datatype=<DataType.INT8: 1>, value=-1, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='int16', datatype=<DataType.INT16: 2>, value=-2, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='int32', datatype=<DataType.INT32: 3>, value=-3, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='int64', datatype=<DataType.INT64: 4>, value=-4, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='float', datatype=<DataType.FLOAT: 9>, value=1.100000023841858, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='double', datatype=<DataType.DOUBLE: 10>, value=2.2, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='boolean', datatype=<DataType.BOOLEAN: 11>, value=True, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='string', datatype=<DataType.STRING: 12>, value='hello world', alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='datetime', datatype=<DataType.DATETIME: 13>, value=datetime.datetime(1990, 9, 3, 5, 4, 3, tzinfo=datetime.timezone.utc), alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='text', datatype=<DataType.TEXT: 14>, value='iamatext', alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='uuid', datatype=<DataType.UUID: 15>, value='iamauuid', alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='bytes', datatype=<DataType.BYTES: 17>, value=b'iamabytes', alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='file', datatype=<DataType.FILE: 18>, value=b'iamafile', alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='null_uint8', datatype=<DataType.UINT8: 5>, value=None, alias=None, is_historical=False, is_transient=False, is_null=True)\n",
" Metric(timestamp=1692826699804, name='historical_uint8', datatype=<DataType.UINT8: 5>, value=1, alias=None, is_historical=True, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='transient_uint8', datatype=<DataType.UINT8: 5>, value=1, alias=None, is_historical=False, is_transient=True, is_null=False)\n",
"From spBv1.0/my_group/DDATA/my_edge_node (QoS=0, retain=0):\n",
" Metric(timestamp=1692826699804, name='uint8', datatype=<DataType.UINT8: 5>, value=1, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='uint16', datatype=<DataType.UINT16: 6>, value=2, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='uint32', datatype=<DataType.UINT32: 7>, value=3, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='uint64', datatype=<DataType.UINT64: 8>, value=4, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='int8', datatype=<DataType.INT8: 1>, value=-1, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='int16', datatype=<DataType.INT16: 2>, value=-2, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='int32', datatype=<DataType.INT32: 3>, value=-3, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='int64', datatype=<DataType.INT64: 4>, value=-4, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='float', datatype=<DataType.FLOAT: 9>, value=1.100000023841858, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='double', datatype=<DataType.DOUBLE: 10>, value=2.2, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='boolean', datatype=<DataType.BOOLEAN: 11>, value=True, alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='string', datatype=<DataType.STRING: 12>, value='hello world', alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='datetime', datatype=<DataType.DATETIME: 13>, value=datetime.datetime(1990, 9, 3, 5, 4, 3, tzinfo=datetime.timezone.utc), alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='text', datatype=<DataType.TEXT: 14>, value='iamatext', alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='uuid', datatype=<DataType.UUID: 15>, value='iamauuid', alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='bytes', datatype=<DataType.BYTES: 17>, value=b'iamabytes', alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='file', datatype=<DataType.FILE: 18>, value=b'iamafile', alias=None, is_historical=False, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='null_uint8', datatype=<DataType.UINT8: 5>, value=None, alias=None, is_historical=False, is_transient=False, is_null=True)\n",
" Metric(timestamp=1692826699804, name='historical_uint8', datatype=<DataType.UINT8: 5>, value=1, alias=None, is_historical=True, is_transient=False, is_null=False)\n",
" Metric(timestamp=1692826699804, name='transient_uint8', datatype=<DataType.UINT8: 5>, value=1, alias=None, is_historical=False, is_transient=True, is_null=False)\n",
"From spBv1.0/my_group/DDEATH/my_edge_node/my_device (QoS=0, retain=0):\n",
" DDeath(timestamp=1692826700815, seq=4)\n",
"From spBv1.0/my_group/DCMD/my_edge_node/my_device (QoS=0, retain=0):\n",
" DCmd(timestamp=1690378628005, metrics=(Metric(timestamp=1690378628004, name='my_metric', datatype=<DataType.DOUBLE: 10>, value=1.1, alias=None, is_historical=False, is_transient=False, is_null=False),))\n"
" DCmd(timestamp=1692827052224, metrics=(Metric(timestamp=1692827052224, name='my_metric', datatype=<DataType.DOUBLE: 10>, value=1.1, alias=None, is_historical=False, is_transient=False, is_null=False),))\n",
"From spBv1.0/my_group/DCMD/my_edge_node/my_device (QoS=0, retain=0):\n",
" DCmd(timestamp=1692827112789, metrics=(Metric(timestamp=1692827112789, name='my_metric', datatype=<DataType.DOUBLE: 10>, value=1.1, alias=None, is_historical=False, is_transient=False, is_null=False),))\n"
]
}
],
Expand Down
7 changes: 6 additions & 1 deletion notebooks/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,9 @@ cd "$REPO_DIR"

echo "Opening notebook environment"

docker compose run --rm -it --service-ports notebook
cleanup() {
docker compose down
}
trap cleanup EXIT

docker compose up notebook emqx
Loading

0 comments on commit 499542e

Please sign in to comment.