layrz-sdk 3.1.13__tar.gz → 3.1.15__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of layrz-sdk might be problematic. Click here for more details.

Files changed (102) hide show
  1. layrz_sdk-3.1.15/.github/workflows/checks.yml +50 -0
  2. layrz_sdk-3.1.15/.github/workflows/deploy.yml +32 -0
  3. layrz_sdk-3.1.15/.gitignore +19 -0
  4. layrz_sdk-3.1.15/.vscode/extensions.json +9 -0
  5. layrz_sdk-3.1.15/CHANGELOG.md +391 -0
  6. layrz_sdk-3.1.15/CODE_OF_CONDUCT.md +29 -0
  7. layrz_sdk-3.1.15/CONTRIBUTING.md +26 -0
  8. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/PKG-INFO +3 -1
  9. layrz_sdk-3.1.15/layrz_sdk/constants.py +19 -0
  10. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/__init__.py +9 -0
  11. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/asset.py +11 -0
  12. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/case.py +5 -1
  13. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/device.py +5 -0
  14. layrz_sdk-3.1.15/layrz_sdk/entities/modbus/__init__.py +9 -0
  15. layrz_sdk-3.1.15/layrz_sdk/entities/modbus/config.py +19 -0
  16. layrz_sdk-3.1.15/layrz_sdk/entities/modbus/parameter.py +110 -0
  17. layrz_sdk-3.1.15/layrz_sdk/entities/modbus/schema.py +10 -0
  18. layrz_sdk-3.1.15/layrz_sdk/entities/modbus/status.py +16 -0
  19. layrz_sdk-3.1.15/layrz_sdk/entities/modbus/wait.py +134 -0
  20. layrz_sdk-3.1.15/layrz_sdk/entities/static_position.py +17 -0
  21. layrz_sdk-3.1.15/layrz_sdk/entities/telemetry/__init__.py +6 -0
  22. layrz_sdk-3.1.15/layrz_sdk/entities/telemetry/assetmessage.py +159 -0
  23. layrz_sdk-3.1.15/layrz_sdk/entities/telemetry/devicemessage.py +122 -0
  24. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk.egg-info/PKG-INFO +3 -1
  25. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk.egg-info/SOURCES.txt +20 -0
  26. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk.egg-info/requires.txt +2 -0
  27. layrz_sdk-3.1.15/manual_deploy.py +18 -0
  28. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/pyproject.toml +3 -1
  29. layrz_sdk-3.1.15/tests/__init__.py +0 -0
  30. layrz_sdk-3.1.15/uv.lock +1048 -0
  31. layrz_sdk-3.1.13/layrz_sdk/constants.py +0 -5
  32. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/LICENSE +0 -0
  33. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/README.md +0 -0
  34. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/__init__.py +0 -0
  35. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/asset_operation_mode.py +0 -0
  36. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/broadcast_request.py +0 -0
  37. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/broadcast_response.py +0 -0
  38. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/broadcast_result.py +0 -0
  39. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/broadcast_status.py +0 -0
  40. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/case_ignored_status.py +0 -0
  41. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/case_status.py +0 -0
  42. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/charts/axis_config.py +0 -0
  43. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/charts/bar_chart.py +0 -0
  44. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/charts/chart_alignment.py +0 -0
  45. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/charts/chart_color.py +0 -0
  46. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/charts/chart_configuration.py +0 -0
  47. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/charts/chart_data_serie.py +0 -0
  48. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/charts/chart_data_serie_type.py +0 -0
  49. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/charts/chart_data_type.py +0 -0
  50. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/charts/chart_render_technology.py +0 -0
  51. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/charts/column_chart.py +0 -0
  52. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/charts/html_chart.py +0 -0
  53. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/charts/line_chart.py +0 -0
  54. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/charts/map_center_type.py +0 -0
  55. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/charts/map_chart.py +0 -0
  56. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/charts/map_point.py +0 -0
  57. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/charts/number_chart.py +0 -0
  58. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/charts/pie_chart.py +0 -0
  59. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/charts/radar_chart.py +0 -0
  60. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/charts/radial_bar_chart.py +0 -0
  61. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/charts/scatter_chart.py +0 -0
  62. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/charts/scatter_serie.py +0 -0
  63. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/charts/scatter_serie_item.py +0 -0
  64. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/charts/table_chart.py +0 -0
  65. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/charts/table_header.py +0 -0
  66. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/charts/table_row.py +0 -0
  67. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/charts/timeline_chart.py +0 -0
  68. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/charts/timeline_serie.py +0 -0
  69. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/charts/timeline_serie_item.py +0 -0
  70. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/checkpoint.py +0 -0
  71. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/comment.py +0 -0
  72. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/custom_field.py +0 -0
  73. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/custom_report_page.py +0 -0
  74. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/event.py +0 -0
  75. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/geofence.py +0 -0
  76. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/last_message.py +0 -0
  77. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/message.py +0 -0
  78. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/outbound_service.py +0 -0
  79. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/position.py +0 -0
  80. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/presence_type.py +0 -0
  81. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/report.py +0 -0
  82. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/report_col.py +0 -0
  83. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/report_configuration.py +0 -0
  84. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/report_data_type.py +0 -0
  85. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/report_format.py +0 -0
  86. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/report_header.py +0 -0
  87. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/report_page.py +0 -0
  88. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/report_row.py +0 -0
  89. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/sensor.py +0 -0
  90. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/text_alignment.py +0 -0
  91. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/trigger.py +0 -0
  92. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/user.py +0 -0
  93. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/entities/waypoint.py +0 -0
  94. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/helpers/__init__.py +0 -0
  95. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/helpers/color.py +0 -0
  96. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/lcl/__init__.py +0 -0
  97. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/lcl/core.py +0 -0
  98. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk/py.typed +0 -0
  99. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk.egg-info/dependency_links.txt +0 -0
  100. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/layrz_sdk.egg-info/top_level.txt +0 -0
  101. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/setup.cfg +0 -0
  102. {layrz_sdk-3.1.13 → layrz_sdk-3.1.15}/tests/test_lcl.py +0 -0
@@ -0,0 +1,50 @@
1
+ name: "Checks before merging"
2
+
3
+ on:
4
+ pull_request:
5
+ types:
6
+ - opened
7
+ - synchronize
8
+ - reopened
9
+ branches:
10
+ - '*'
11
+
12
+ jobs:
13
+ lint:
14
+ runs-on: ubuntu-latest
15
+ container:
16
+ image: ghcr.io/goldenm-software/python-builder:uv-3.13-x86
17
+ options: --user root
18
+ credentials:
19
+ username: ${{ github.repository_owner }}
20
+ password: ${{ secrets.GITHUB_TOKEN }}
21
+
22
+ steps:
23
+ - name: Checkout
24
+ uses: actions/checkout@v4
25
+
26
+ - name: Lint
27
+ run: |
28
+ uv sync --only-group dev
29
+ uv run ruff check
30
+ uv run mypy .
31
+
32
+ uniitest:
33
+ needs: lint
34
+ runs-on: ubuntu-latest
35
+ container:
36
+ image: ghcr.io/goldenm-software/python-builder:uv-3.13-x86
37
+ options: --user root
38
+ credentials:
39
+ username: ${{ github.repository_owner }}
40
+ password: ${{ secrets.GITHUB_TOKEN }}
41
+
42
+ steps:
43
+ - name: Checkout
44
+ uses: actions/checkout@v4
45
+
46
+ - name: Install dependencies
47
+ run: |
48
+ uv sync
49
+ uv run pytest ./tests/
50
+
@@ -0,0 +1,32 @@
1
+ name: "Deploy package"
2
+
3
+ on:
4
+ push:
5
+ branches: [ "main" ]
6
+
7
+ jobs:
8
+ build:
9
+ permissions:
10
+ id-token: write
11
+ contents: read
12
+ repository-projects: read
13
+ packages: read
14
+
15
+ runs-on: ubuntu-latest
16
+ container:
17
+ image: ghcr.io/goldenm-software/python-builder:uv-3.13-x86
18
+ options: --user root
19
+ credentials:
20
+ username: ${{ github.repository_owner }}
21
+ password: ${{ secrets.GITHUB_TOKEN }}
22
+
23
+ steps:
24
+ - name: Checkout
25
+ uses: actions/checkout@v4
26
+
27
+ - name: Build and upload
28
+ run: |
29
+ uv venv --python 3.13
30
+ uv sync --only-group dev
31
+ uv run python -m build
32
+ uv run python -m twine upload -u ${{ secrets.LAYRZ_PYPI_USERNAME }} -p ${{ secrets.LAYRZ_PYPI_PASSWORD }} dist/*
@@ -0,0 +1,19 @@
1
+ /dist
2
+ /build
3
+ /*.egg-info
4
+ /.pypirc
5
+ /test.py
6
+ /**/*.pyc
7
+ /.venv
8
+ /site
9
+
10
+ /**/*/__pycache__
11
+
12
+ tests.py
13
+ *.xlsx
14
+
15
+ .ruff_cache
16
+ .mypy_cache
17
+ .pytest_cache
18
+
19
+ .env
@@ -0,0 +1,9 @@
1
+ {
2
+ "recommendations": [
3
+ "ms-python.python",
4
+ "charliermarsh.ruff",
5
+ "ms-python.vscode-pylance",
6
+ "njpwerner.autodocstring",
7
+ "oderwat.indent-rainbow"
8
+ ]
9
+ }
@@ -0,0 +1,391 @@
1
+ # Changelog
2
+
3
+ ## 3.1.15
4
+
5
+ - Added some parameters on `Asset` and `Device` classes
6
+ - Added `AssetMessage` and `DeviceMessage` classes to handle messages related to assets and devices
7
+
8
+ ## 3.1.14
9
+
10
+ - Some changes related to the `Case` entity
11
+
12
+ ## 3.1.12
13
+
14
+ - Adjustment of all typings
15
+
16
+ ## 3.1.11
17
+
18
+ - Fixes on data casting in `Message` class
19
+
20
+ ## 3.1.10
21
+
22
+ - Updated docstrings to provide more information about types and usage
23
+
24
+ ## 3.1.9
25
+
26
+ - Changed `json` to `parsed` on `BroadcastResponse` and `BroadcastRequest` to avoid confusion with the `json` property from `pydantic.BaseModel`
27
+
28
+ ## 3.1.8
29
+
30
+ - Replaced `str` in favor of using `Path` object to manage paths on `Report` export methods
31
+
32
+ ## 3.1.7
33
+
34
+ - Removed validation of asset type `SINGLE`
35
+
36
+ ## 3.1.6
37
+
38
+ - Fixes on model validate on `Asset` class
39
+
40
+ ## 3.1.5
41
+
42
+ - Changed `width` on `ReportHeader` from `int` to `float` due to backwards compatibility
43
+
44
+ ## 3.1.4
45
+
46
+ - Fixed iteration searching for the primary device on `Asset` class
47
+
48
+ ## 3.1.3
49
+
50
+ - Fixes on `Asset` entity validation, found by @simonjrojas!
51
+
52
+ ## 3.1.2
53
+
54
+ - Set as optional the `asset_type` argument in `Asset` class
55
+
56
+ ## 3.1.1
57
+
58
+ - Small fixes on some models to backwards compatibility
59
+
60
+ ## 3.1.0
61
+
62
+ - Migrated all models to Pydantic
63
+ - Removed models `Transaction`.
64
+ - Added `mypy` to the project to enforce type checking
65
+ - Migrated from `uniitest` to `pytest` to the project to enforce unit testing
66
+
67
+ ## 3.0.14
68
+
69
+ - Fixes on `GET_CUSTOM_FIELD` LCL function, now accepts a default value as the second argument (Fallback as '')
70
+
71
+ ## 3.0.13
72
+
73
+ - Added `LastMessage` entity to be used in `Trigger`s
74
+
75
+ ## 3.0.12
76
+
77
+ - Moved `Geofence` model from `checkpoints` to `general`
78
+ - Added `PresenceType` enum to be used in `Event` model
79
+
80
+ ## 3.0.11
81
+
82
+ - Added way to standarize the `int` and `float` arguments to `float`. Allowing comparison between `int` and `float` values in LCL formulas
83
+
84
+ ## 3.0.10
85
+
86
+ - Removed Self type annotation from all classes
87
+
88
+ ## 3.0.9
89
+
90
+ - Added different return data of Report when password is set
91
+
92
+ ## 3.0.8
93
+
94
+ - New linter and formatter using ruff
95
+ - Added typings on all classes and functions available
96
+ - New Report export format PDF (Not implemented yet)
97
+ - Added new way to encrypt .xslx files directly using the `Report` class
98
+
99
+ ## 3.0.7
100
+
101
+ - Added the value of `AssetOperationMode.ZONE`
102
+ - Added a check for `Asset.operation_mode == ASSETMULTIPLE` while savind the list of child's
103
+ - Clarified the deprecation of `ReportRow.height`
104
+
105
+ ## 3.0.6
106
+
107
+ - Changed print in `LineChart` to a `log.warning` and `log.fatal` in case of error
108
+
109
+ ## 3.0.3
110
+
111
+ - Implemented new chart rendering library `syncfusion_flutter_charts` for Flutter.
112
+ - Changed rendering method for `LineChart`, now you should provide the `technology` to select the rendering library.
113
+
114
+ ## 3.0.2
115
+
116
+ - Fixed issue with `IF()` LCL function, now only validates the nullability of the first argument.
117
+ - Added new `VERSION()` LCL Function to get the current version of the package
118
+
119
+ ## 3.0.1
120
+
121
+ - Added None validation on every LCL function, when any of the arguments is None, the function will return None
122
+ - Added unit tests for all LCL functions
123
+
124
+ ## 3.0.0
125
+
126
+ - Removed shared namespace to improve compatibility with other packages
127
+
128
+ ## 2.2.4
129
+
130
+ - Defined new class `ReportConfiguration` to handle the configuration of the report in Python scripts
131
+
132
+ ## 2.2.3
133
+
134
+ - Property `text_color` deprectated in `ReportCol`, replaced by a luminance-based color using the background color
135
+ - Property `text_color` deprectated in `ReportHeader`, replaced by a luminance-based color using the background color
136
+ - Property `width` deprectated in `ReportHeader`, replaced by the function `autofit()` to automatically fit the header width
137
+ - New entity `CustomReportPage` that receives a custom builder function to build the page
138
+ - Property `export_format` deprecated in `Report`, replaced to an argument of the function `export()`
139
+
140
+ ## 2.2.2
141
+
142
+ - Updated `AssetOperationMode` to support `STATIC` and removal of `FAILOVER` mode
143
+
144
+ ## 2.2.1
145
+
146
+ - Bug fixes related to removing __ from all classes
147
+
148
+ ## 2.2.0
149
+
150
+ - Removed support to Python 3.12 due to a shared namespace issue.
151
+ - Reorganized classes to better support.
152
+ - Added typings to all classes and functions.
153
+
154
+ ## 2.1.5
155
+
156
+ - Added declarative typing on all LCL functions
157
+ - Added support for timezone in `UNIX_TO_STR` LCL function
158
+
159
+ ## 2.1.3
160
+
161
+ - Changed build mode to pyproject.toml
162
+ - Updated `LcLCore.perform()` function to receive additional globals and locals in their arguments
163
+
164
+ ## v2.1.2
165
+
166
+ - Add UNIX_TO_STR LCL function
167
+
168
+ ## v2.1.1
169
+
170
+ - Added `compact` in the json return format in reports
171
+
172
+ ## v2.1.0
173
+
174
+ - Add bold format option to Col class
175
+ - Add freeze header option to Page class
176
+
177
+ ## v2.0.1
178
+
179
+ - Fixes on package namespace
180
+
181
+ ## v2.0.0
182
+
183
+ - Deprecated `lcl.core` module
184
+ - Changed `layrzsdk` to `layrz.sdk` package (With unified Layrz namespace)
185
+
186
+ ## v1.4.5
187
+
188
+ - Added CaseIgnoredStatus to init file
189
+
190
+ ## v1.4.4
191
+
192
+ - Added CaseIgnoredStatus to Case entity
193
+
194
+ ## v1.4.3
195
+
196
+ - Added new ChartType: TableChart and NumberChart
197
+ - Starting to replace documentation format from unstructured to a structured format
198
+
199
+ ## v1.4.2
200
+
201
+ - Fix, added SUBSTRING LCL to global functions
202
+
203
+ ## v1.4.1
204
+
205
+ - Fixed LineChart xAxis Datetime conversion for CanvasJS, now will multiply the timestamp by 1000 to use milliseconds
206
+
207
+ ## v1.4.0
208
+
209
+ - Added support for Flutter `graphic` library
210
+ - LineChart
211
+ - AreaChart (Replaced previous AreaChart to a temporal extend of LineChart)
212
+ - BarChart
213
+ - ColumnChart
214
+ - PieChart
215
+ - MapChart
216
+ - ScatterChart
217
+ - RadialBarChart
218
+
219
+ - Future deprecations:
220
+ - HTMLChart
221
+ - TimelineChart
222
+ - RadarChart
223
+
224
+ ## v1.3.9
225
+
226
+ - Internal changes related to GitLab CI automation
227
+
228
+ ## v1.3.8
229
+
230
+ - Added SUBSTRING LCL function
231
+
232
+ ## v.1.3.7
233
+
234
+ - Added sequence in cases
235
+
236
+ ## v1.3.6
237
+
238
+ - Added new Map Chart
239
+ - Added required entity MapPoint
240
+ - Added required enum MapCenterType
241
+ - Added new HTML Chart
242
+
243
+ ## v1.3.5
244
+
245
+ - Bug fix related to formula perform, added PRIMARY_DEVICE to simulation environment
246
+
247
+ ## v1.3.4
248
+
249
+ - Added Transaction entity for REPCOM reports
250
+
251
+ ## v1.3.3
252
+
253
+ - Added PRIMARY_DEVICE() function to Layrz Compute Language
254
+
255
+ ## v1.3.2
256
+
257
+ - Updated styles of charts return object to ApexCharts or CanvasJS
258
+ - Replaced all .rst files to .md files
259
+
260
+ ## v1.3.1
261
+
262
+ - Removed markerSize (in CanvasJS) for dashed series
263
+
264
+ ## v1.3.0
265
+
266
+ - Added support for CanvasJS Javascript Library
267
+ - Deprecated to_apexcharts property in charts.
268
+ - New method render() in charts with support for multiple Javascript rendering library
269
+ - Added color helpers in layrzsdk.helpers
270
+
271
+ ## v1.2.6
272
+
273
+ - Removed dataLabels in almost all charts (Except Pie and RadialBar)
274
+
275
+ ## v1.2.5
276
+
277
+ - Optimizations for Javascript renderer
278
+
279
+ ## v1.2.4
280
+
281
+ - Added dashed attribute to ChartDataSerie
282
+ - Added the Possibility to mix charts, only available for:
283
+ - LineChart
284
+ - AreaChart
285
+ - ColumnChart
286
+ - ScatterChart (Only as serie, not as main chart)
287
+
288
+ ## v1.2.3
289
+
290
+ - Added new value in BroadcastStatus
291
+
292
+ ## v1.2.2
293
+
294
+ - Updated ReportCol entity to set new default values
295
+ - New entity ReportDataType
296
+ - Possibility to export directly to the Report class
297
+ - Re-organized entities/ folder
298
+ - Added Broadcasts entities
299
+
300
+ ## v1.2.1
301
+
302
+ - Added Report Col entity
303
+
304
+ ## v1.2.0
305
+
306
+ - Added reports entities
307
+
308
+ ## v1.1.4
309
+
310
+ - Bug fixes
311
+
312
+ ## v1.1.3
313
+
314
+ - Bug fixes
315
+
316
+ ## v1.1.2
317
+
318
+ - Bug fixes
319
+
320
+ ## v1.1.1
321
+
322
+ - Bug fixes
323
+
324
+ ## v1.1.0
325
+
326
+ - Reorganized files
327
+ - Added new Charts entities
328
+
329
+ ## v1.0.14
330
+
331
+ - Added CONTAINS, STARTS_WITH, ENDS_WITH functions to the Layrz Computed Language
332
+
333
+ ## v1.0.13
334
+
335
+ - Fixed missing import into `layrzsdk.entities.__init__.py`
336
+
337
+ ## v1.0.12
338
+
339
+ - Added Geofence, Comment, Waypoint and Checkpoint entities
340
+
341
+ ## v1.0.11
342
+
343
+ - Added User, Comment and Case entities
344
+
345
+ ## v1.0.10
346
+
347
+ - Fixes
348
+
349
+ ## v1.0.9
350
+
351
+ - Added Event and Trigger entities
352
+ - Renamed file `mesage.py` to `message.py`
353
+
354
+ ## v1.0.8
355
+
356
+ - Added title getter of all charts entities
357
+
358
+ ## v1.0.7
359
+
360
+ - Added PieChart, BarChart, and RadialBarChart entities
361
+
362
+ ## v1.0.6
363
+
364
+ - Fixed STING to STRING bug in ChartDataType enum
365
+
366
+ ## v1.0.5
367
+
368
+ - Bug fixes
369
+
370
+ ## v1.0.4
371
+
372
+ - Added data_type argument of ChartDataSerie
373
+
374
+ ## v1.0.3
375
+
376
+ - Added Chart configuration entity
377
+
378
+ ## v1.0.2
379
+
380
+ - Added entities for Range Charts:
381
+ - Line Charts
382
+ - Area Charts
383
+ - Column Charts
384
+
385
+ ## v1.0.1
386
+
387
+ - Added entities for Sensors and Triggers
388
+
389
+ ## v1.0.0
390
+
391
+ - Initial release
@@ -0,0 +1,29 @@
1
+ # Code of conduct
2
+
3
+ ## Be friendly and patient.
4
+
5
+ Our objective is contribute to community and help us together to create better code.
6
+
7
+ ## Be welcoming
8
+
9
+ We strive to be a community that welcomes and supports people of all backgrounds and identities. This includes, but is not limited to members of any race, ethnicity, culture, national origin, colour, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, age, size, family status, political belief, religion, and mental and physical ability.
10
+
11
+ ## Be considerate
12
+
13
+ Your work will be used by other people, and you in turn will depend on the work of others. Any decision you take will affect users and colleagues, and you should take those consequences into account when making decisions. Remember that we're a world-wide community, so you might not be communicating in someone else's primary language.
14
+
15
+ ## Be respectful
16
+
17
+ Not all of us will agree all the time, but disagreement is no excuse for poor behavior and poor manners. We might all experience some frustration now and then, but we cannot allow that frustration to turn into a personal attack. It’s important to remember that a community where people feel uncomfortable or threatened is not a productive one.
18
+
19
+ ## Be careful in the words that you choose
20
+
21
+ We are a community of professionals, and we conduct ourselves professionally. Be kind to others. Do not insult or put down other participants. Harassment and other exclusionary behavior aren't acceptable. This includes, but is not limited to:
22
+ * Violent threats or language directed against another person.
23
+ * Discriminatory jokes and language.
24
+ * Posting sexually explicit or violent material.
25
+ * Posting (or threatening to post) other people's personally identifying information ("doxing").
26
+ * Personal insults, especially those using racist or sexist terms.
27
+ * Unwelcome sexual attention.
28
+ * Advocating for, or encouraging, any of the above behavior.
29
+ * Repeated harassment of others. In general, if someone asks you to stop, then stop.
@@ -0,0 +1,26 @@
1
+ # Contributing
2
+
3
+ As an open source project, we welcomes contributions of many forms.
4
+
5
+ ## To request a Pull Request
6
+
7
+ Please follow the next structure of your request:
8
+
9
+ 1. **Title**: A short description of the change.
10
+
11
+ 2. **Description**: A detailed description of the change, including:
12
+ - What is the problem you are solving?
13
+ - How does your change solve the problem?
14
+ - Any additional information that might be helpful for reviewers.
15
+
16
+ 3. **Code**: The code changes you are proposing, including:
17
+ - The files you are changing.
18
+ - The specific lines of code that are being added, modified, or removed.
19
+ - Any tests you have written to verify your changes.
20
+
21
+ 4. **Testing**: A description of how you tested your changes, including:
22
+ - The environment you tested in (e.g., local, staging).
23
+ - Any specific test cases you ran.
24
+ - The results of your tests.
25
+
26
+ You can attach screenshots or other files to help illustrate your changes.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: layrz-sdk
3
- Version: 3.1.13
3
+ Version: 3.1.15
4
4
  Summary: Layrz SDK for Python
5
5
  Author-email: "Golden M, Inc." <software@goldenm.com>
6
6
  Maintainer-email: Kenny Mochizuki <kenny@goldenm.com>, Luis Reyes <lreyes@goldenm.com>, Kasen Li <kli@goldenm.com>
@@ -21,6 +21,8 @@ Requires-Dist: xlsxwriter
21
21
  Requires-Dist: tzdata
22
22
  Requires-Dist: pydantic>=2.10.6
23
23
  Requires-Dist: typing-extensions>=4.10.0
24
+ Requires-Dist: geopy>=2.4.1
25
+ Requires-Dist: shapely>=2.1.1
24
26
  Dynamic: license-file
25
27
 
26
28
  # Layrz SDK
@@ -0,0 +1,19 @@
1
+ """Constants"""
2
+
3
+ from zoneinfo import ZoneInfo
4
+
5
+ UTC = ZoneInfo('UTC')
6
+ """ UTC timezone constant for use in datetime fields. """
7
+
8
+
9
+ REJECTED_KEYS = (
10
+ 'timestamp',
11
+ 'ident',
12
+ 'server.timestamp',
13
+ 'protocol.id',
14
+ 'channel.id',
15
+ 'device.name',
16
+ 'device.id',
17
+ 'device.type.id',
18
+ )
19
+ """ Defines the ignored raw keys from a telemetry object """
@@ -46,6 +46,7 @@ from .event import Event
46
46
  from .geofence import Geofence
47
47
  from .last_message import LastMessage
48
48
  from .message import Message
49
+ from .modbus import ModbusConfig, ModbusParameter, ModbusSchema, ModbusStatus, ModbusWait
49
50
  from .outbound_service import OutboundService
50
51
  from .position import Position
51
52
  from .presence_type import PresenceType
@@ -58,6 +59,7 @@ from .report_header import ReportHeader
58
59
  from .report_page import ReportPage
59
60
  from .report_row import ReportRow
60
61
  from .sensor import Sensor
62
+ from .telemetry import AssetMessage, DeviceMessage
61
63
  from .text_alignment import TextAlignment
62
64
  from .trigger import Trigger
63
65
  from .user import User
@@ -126,4 +128,11 @@ __all__ = [
126
128
  'Trigger',
127
129
  'User',
128
130
  'Waypoint',
131
+ 'ModbusConfig',
132
+ 'ModbusParameter',
133
+ 'ModbusSchema',
134
+ 'ModbusStatus',
135
+ 'ModbusWait',
136
+ 'AssetMessage',
137
+ 'DeviceMessage',
129
138
  ]
@@ -14,6 +14,7 @@ from .asset_operation_mode import AssetOperationMode
14
14
  from .custom_field import CustomField
15
15
  from .device import Device
16
16
  from .sensor import Sensor
17
+ from .static_position import StaticPosition
17
18
 
18
19
 
19
20
  class Asset(BaseModel):
@@ -35,6 +36,16 @@ class Asset(BaseModel):
35
36
  devices: list[Device] = Field(default_factory=list, description='Defines the list of devices of the asset')
36
37
  children: list[Self] = Field(default_factory=list, description='Defines the list of children of the asset')
37
38
 
39
+ static_position: StaticPosition | None = Field(
40
+ default=None,
41
+ description='Static position of the asset',
42
+ )
43
+
44
+ points: list[StaticPosition] = Field(
45
+ default_factory=list,
46
+ description='List of static positions for the asset. The altitude of StaticPosition is not used in this case.',
47
+ )
48
+
38
49
  @model_validator(mode='before')
39
50
  def _validate_model(cls: Self, data: dict[str, Any]) -> dict[str, Any]:
40
51
  """Validate model"""
@@ -41,7 +41,11 @@ class Case(BaseModel):
41
41
  """Validate model"""
42
42
  sequence = data.get('sequence')
43
43
  if sequence is not None and isinstance(sequence, int):
44
- data['sequence'] = f'{data["trigger"].code}/{sequence}'
44
+ trigger = data['trigger']
45
+ if not isinstance(trigger, Trigger):
46
+ data['sequence'] = f'{trigger["code"]}/{data["pk"]}'
47
+ else:
48
+ data['sequence'] = f'{trigger.code}/{sequence}'
45
49
  else:
46
50
  data['sequence'] = f'GENERIC/{data["pk"]}'
47
51
 
@@ -2,6 +2,8 @@
2
2
 
3
3
  from pydantic import BaseModel, Field
4
4
 
5
+ from .modbus import ModbusConfig
6
+
5
7
 
6
8
  class Device(BaseModel):
7
9
  """Device entity"""
@@ -9,5 +11,8 @@ class Device(BaseModel):
9
11
  pk: int = Field(description='Defines the primary key of the device')
10
12
  name: str = Field(description='Defines the name of the device')
11
13
  ident: str = Field(description='Defines the identifier of the device')
14
+ protocol_id: int = Field(description='Defines the protocol ID of the device')
12
15
  protocol: str = Field(description='Defines the protocol of the device')
13
16
  is_primary: bool = Field(default=False, description='Defines if the device is the primary device')
17
+
18
+ modbus: ModbusConfig | None = Field(default=None, description='Modbus configuration')
@@ -0,0 +1,9 @@
1
+ """Modbus Models"""
2
+
3
+ from .config import ModbusConfig
4
+ from .parameter import ModbusParameter
5
+ from .schema import ModbusSchema
6
+ from .status import ModbusStatus
7
+ from .wait import ModbusWait
8
+
9
+ __all__ = ['ModbusConfig', 'ModbusParameter', 'ModbusSchema', 'ModbusStatus', 'ModbusWait']