aerosense-ai / data-gateway

Data influx for Aerosense.
https://www.aerosense.ai/
Other
3 stars 1 forks source link

Support multiple nodes #69

Closed cortadocodes closed 2 years ago

cortadocodes commented 2 years ago

Summary

Upgrade data-gateway to handle data from multiple nodes instead of one. This pull request pulls together the changes from the following pull requests - view each one for their individual release notes:

Breaking changes and changes separate from these PRs are listed below.

Contents (#69)

IMPORTANT: There are 2 breaking changes.

New features

Operations

Refactoring


Upgrade instructions

💥 Remove incorrectly parameterised default sensor name `MICROPHONE_SENSOR_NAME` is no longer exported This was removed because it was a misnomer (actually should have been called `DEFAULT_MICROPHONE_SENSOR_NAME`). It's very unlikely this will cause any onward breaking changes, but if using that variable externally, the user should instead access `data_gateway.configuration.DEFAULT_SENSOR_NAMES[0]` which is the same thing.
💥 Update configuration for multiple nodes per #64 Configuration values nested and separated by concerns. - Users should consult docs for the new configuration format. Older `configuration.json` files will no longer work so need to be updated. - Periods are now calculated rather than being configurable, to eliminate duplication. Users should configure the relevant frequency parameters for the sensors. - The `session_data` key was converted to `session` - The ambiguous `hardware_version` key was removed and replaced with gateway.receiver_firmware_version` and `nodes[node_id].node_firmware_version` - The `packet_key` is no longer present, instead use `Configuration().get_packet_key(node_id)`
codecov-commenter commented 2 years ago

Codecov Report

Merging #69 (8c51f08) into main (14d516b) will decrease coverage by 17.54%. The diff coverage is 39.16%.

@@             Coverage Diff             @@
##             main      #69       +/-   ##
===========================================
- Coverage   78.94%   61.39%   -17.55%     
===========================================
  Files          13       15        +2     
  Lines         755     1119      +364     
===========================================
+ Hits          596      687       +91     
- Misses        159      432      +273     
Impacted Files Coverage Δ
data_gateway/__init__.py 100.00% <ø> (ø)
data_gateway/new_packet_reader.py 0.00% <0.00%> (ø)
data_gateway/packet_reader.py 50.41% <47.54%> (+2.60%) :arrow_up:
data_gateway/data_gateway.py 88.88% <53.84%> (+0.81%) :arrow_up:
data_gateway/configuration.py 94.11% <93.45%> (-5.89%) :arrow_down:
data_gateway/cli.py 91.57% <94.44%> (+1.99%) :arrow_up:
data_gateway/persistence.py 94.69% <100.00%> (+0.20%) :arrow_up:
data_gateway/serial_port.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9fd7503...8c51f08. Read the comment docs.