layrz-sdk 3.0.10__tar.gz → 3.0.12__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.
- {layrz_sdk-3.0.10/layrz_sdk.egg-info → layrz_sdk-3.0.12}/PKG-INFO +2 -1
- layrz_sdk-3.0.12/layrz_sdk/entities/__init__.py +73 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/checkpoints/__init__.py +2 -2
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/checkpoints/waypoint.py +1 -1
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/events/event.py +7 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/general/__init__.py +3 -1
- {layrz_sdk-3.0.10/layrz_sdk/entities/checkpoints → layrz_sdk-3.0.12/layrz_sdk/entities/general}/geofence.py +22 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/lcl/core.py +40 -12
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12/layrz_sdk.egg-info}/PKG-INFO +2 -1
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk.egg-info/SOURCES.txt +1 -12
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk.egg-info/requires.txt +1 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/pyproject.toml +2 -1
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/tests/test_lcl.py +1 -1
- layrz_sdk-3.0.10/.github/workflows/checks.yml +0 -54
- layrz_sdk-3.0.10/.github/workflows/deploy.yml +0 -36
- layrz_sdk-3.0.10/.gitignore +0 -13
- layrz_sdk-3.0.10/.vscode/extensions.json +0 -9
- layrz_sdk-3.0.10/.vscode/settings.json +0 -15
- layrz_sdk-3.0.10/CHANGELOG.md +0 -260
- layrz_sdk-3.0.10/CODE_OF_CONDUCT.md +0 -24
- layrz_sdk-3.0.10/CONTRIBUTING.md +0 -27
- layrz_sdk-3.0.10/layrz_sdk/entities/__init__.py +0 -72
- layrz_sdk-3.0.10/lint.py +0 -41
- layrz_sdk-3.0.10/requirements-dev.txt +0 -1
- layrz_sdk-3.0.10/requirements.txt +0 -2
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/LICENSE +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/README.md +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/__init__.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/broadcasts/__init__.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/broadcasts/request.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/broadcasts/response.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/broadcasts/result.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/broadcasts/service.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/broadcasts/status.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/cases/__init__.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/cases/case.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/cases/comment.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/cases/trigger.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/charts/__init__.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/charts/alignment.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/charts/bar.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/charts/color.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/charts/column.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/charts/configuration.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/charts/data_type.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/charts/exceptions.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/charts/html.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/charts/line.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/charts/map.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/charts/number.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/charts/pie.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/charts/radar.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/charts/radial_bar.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/charts/render_technology.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/charts/scatter.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/charts/serie.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/charts/serie_type.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/charts/table.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/charts/timeline.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/checkpoints/checkpoint.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/events/__init__.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/formatting/__init__.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/formatting/text_align.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/general/asset.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/general/asset_operation_mode.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/general/custom_field.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/general/device.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/general/sensor.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/general/user.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/repcom/__init__.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/repcom/transaction.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/reports/__init__.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/reports/col.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/reports/format.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/reports/header.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/reports/page.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/reports/report.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/reports/row.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/telemetry/__init__.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/telemetry/message.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/entities/telemetry/position.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/helpers/__init__.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/helpers/color.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk/lcl/__init__.py +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk.egg-info/dependency_links.txt +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/layrz_sdk.egg-info/top_level.txt +0 -0
- {layrz_sdk-3.0.10 → layrz_sdk-3.0.12}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: layrz-sdk
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.12
|
|
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>
|
|
@@ -17,6 +17,7 @@ Description-Content-Type: text/markdown
|
|
|
17
17
|
License-File: LICENSE
|
|
18
18
|
Requires-Dist: requests
|
|
19
19
|
Requires-Dist: xlsxwriter
|
|
20
|
+
Requires-Dist: tzdata
|
|
20
21
|
|
|
21
22
|
# Layrz SDK
|
|
22
23
|
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"""Init file"""
|
|
2
|
+
|
|
3
|
+
# Broadcast entities
|
|
4
|
+
from .broadcasts import BroadcastRequest, BroadcastResponse, BroadcastResult, BroadcastStatus, OutboundService
|
|
5
|
+
|
|
6
|
+
# Cases entitites
|
|
7
|
+
from .cases import Case, CaseIgnoredStatus, CaseStatus, Comment, Trigger
|
|
8
|
+
|
|
9
|
+
# Charts entities
|
|
10
|
+
from .charts import (
|
|
11
|
+
AreaChart,
|
|
12
|
+
AxisConfig,
|
|
13
|
+
BarChart,
|
|
14
|
+
ChartAlignment,
|
|
15
|
+
ChartColor,
|
|
16
|
+
ChartConfiguration,
|
|
17
|
+
ChartDataSerie,
|
|
18
|
+
ChartDataSerieType,
|
|
19
|
+
ChartDataType,
|
|
20
|
+
ChartException,
|
|
21
|
+
ChartRenderTechnology,
|
|
22
|
+
ColumnChart,
|
|
23
|
+
HTMLChart,
|
|
24
|
+
LineChart,
|
|
25
|
+
MapCenterType,
|
|
26
|
+
MapChart,
|
|
27
|
+
MapPoint,
|
|
28
|
+
NumberChart,
|
|
29
|
+
PieChart,
|
|
30
|
+
RadarChart,
|
|
31
|
+
RadialBarChart,
|
|
32
|
+
ScatterChart,
|
|
33
|
+
ScatterSerie,
|
|
34
|
+
ScatterSerieItem,
|
|
35
|
+
TableChart,
|
|
36
|
+
TableHeader,
|
|
37
|
+
TableRow,
|
|
38
|
+
TimelineChart,
|
|
39
|
+
TimelineSerie,
|
|
40
|
+
TimelineSerieItem,
|
|
41
|
+
get_color_list,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
# Checkpoints entities
|
|
45
|
+
from .checkpoints import Checkpoint, Waypoint
|
|
46
|
+
|
|
47
|
+
# Events entities
|
|
48
|
+
from .events import Event
|
|
49
|
+
|
|
50
|
+
# Formatting entities
|
|
51
|
+
from .formatting import TextAlignment
|
|
52
|
+
|
|
53
|
+
# General entities
|
|
54
|
+
from .general import Asset, AssetOperationMode, CustomField, Device, Geofence, PresenceType, Sensor, User
|
|
55
|
+
|
|
56
|
+
# REPCOM entities
|
|
57
|
+
from .repcom import Transaction
|
|
58
|
+
|
|
59
|
+
# Reports entities
|
|
60
|
+
from .reports import (
|
|
61
|
+
CustomReportPage,
|
|
62
|
+
Report,
|
|
63
|
+
ReportCol,
|
|
64
|
+
ReportConfiguration,
|
|
65
|
+
ReportDataType,
|
|
66
|
+
ReportFormat,
|
|
67
|
+
ReportHeader,
|
|
68
|
+
ReportPage,
|
|
69
|
+
ReportRow,
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
# Telemetry entities
|
|
73
|
+
from .telemetry import Message, Position
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
from datetime import datetime
|
|
4
4
|
|
|
5
5
|
from layrz_sdk.entities.cases.trigger import Trigger
|
|
6
|
+
from layrz_sdk.entities.general.geofence import Geofence, PresenceType
|
|
6
7
|
from layrz_sdk.entities.telemetry.message import Message
|
|
7
8
|
|
|
8
9
|
|
|
@@ -17,6 +18,8 @@ class Event:
|
|
|
17
18
|
asset_id : ID of the Asset owner of the event
|
|
18
19
|
message : Telemetry information of the event
|
|
19
20
|
activated_at : Reception/triggered at
|
|
21
|
+
geofence : Geofence where the event occurred
|
|
22
|
+
presence_type : Presence type of the event
|
|
20
23
|
"""
|
|
21
24
|
|
|
22
25
|
def __init__(
|
|
@@ -26,6 +29,8 @@ class Event:
|
|
|
26
29
|
asset_id: int,
|
|
27
30
|
message: Message,
|
|
28
31
|
activated_at: datetime,
|
|
32
|
+
geofence: Geofence | None = None,
|
|
33
|
+
presence_type: PresenceType | None = None,
|
|
29
34
|
) -> None:
|
|
30
35
|
"""Constructor"""
|
|
31
36
|
self.pk = pk
|
|
@@ -33,6 +38,8 @@ class Event:
|
|
|
33
38
|
self.asset_id = asset_id
|
|
34
39
|
self.message = message
|
|
35
40
|
self.activated_at = activated_at
|
|
41
|
+
self.geofence = geofence
|
|
42
|
+
self.presence_type = presence_type
|
|
36
43
|
|
|
37
44
|
@property
|
|
38
45
|
def _readable(self) -> str | None | bool:
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
"""
|
|
1
|
+
"""General entities"""
|
|
2
|
+
|
|
2
3
|
from .asset import Asset
|
|
3
4
|
from .asset_operation_mode import AssetOperationMode
|
|
4
5
|
from .custom_field import CustomField
|
|
5
6
|
from .device import Device
|
|
7
|
+
from .geofence import Geofence, PresenceType
|
|
6
8
|
from .sensor import Sensor
|
|
7
9
|
from .user import User
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"""Geofence entity"""
|
|
2
2
|
|
|
3
|
+
from enum import Enum
|
|
4
|
+
|
|
3
5
|
|
|
4
6
|
class Geofence:
|
|
5
7
|
"""
|
|
@@ -29,3 +31,23 @@ class Geofence:
|
|
|
29
31
|
def __repr__(self) -> str | None | bool:
|
|
30
32
|
"""Readable property"""
|
|
31
33
|
return self._readable
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class PresenceType(Enum):
|
|
37
|
+
"""Presence type enum"""
|
|
38
|
+
|
|
39
|
+
ENTRANCE = 'ENTRANCE'
|
|
40
|
+
EXIT = 'EXIT'
|
|
41
|
+
|
|
42
|
+
@property
|
|
43
|
+
def _readable(self) -> str | None | bool:
|
|
44
|
+
"""Readable"""
|
|
45
|
+
return f'PresenceType.{self.value}'
|
|
46
|
+
|
|
47
|
+
def __str__(self) -> str | None | bool:
|
|
48
|
+
"""Readable property"""
|
|
49
|
+
return self._readable
|
|
50
|
+
|
|
51
|
+
def __repr__(self) -> str | None | bool:
|
|
52
|
+
"""Readable property"""
|
|
53
|
+
return self._readable
|
|
@@ -13,7 +13,7 @@ INVALID_ARGUMENTS = 'Invalid arguments - {e}'
|
|
|
13
13
|
class LclCore:
|
|
14
14
|
"""Layrz Compute Language SDK"""
|
|
15
15
|
|
|
16
|
-
def __init__(
|
|
16
|
+
def __init__(
|
|
17
17
|
self,
|
|
18
18
|
script: str = '',
|
|
19
19
|
sensors: Dict = None,
|
|
@@ -40,7 +40,7 @@ class LclCore:
|
|
|
40
40
|
self._custom_fields = custom_fields
|
|
41
41
|
self._script = script
|
|
42
42
|
|
|
43
|
-
def perform(
|
|
43
|
+
def perform(
|
|
44
44
|
self,
|
|
45
45
|
additional_globals: Dict = None,
|
|
46
46
|
additional_locals: Dict = None,
|
|
@@ -122,14 +122,26 @@ class LclCore:
|
|
|
122
122
|
|
|
123
123
|
import json
|
|
124
124
|
|
|
125
|
-
result = json.dumps(eval(self._script, global_functions, local_variables))
|
|
125
|
+
result = json.dumps(eval(self._script, global_functions, local_variables))
|
|
126
126
|
|
|
127
127
|
return result
|
|
128
|
-
except Exception as err:
|
|
128
|
+
except Exception as err:
|
|
129
129
|
import json
|
|
130
130
|
|
|
131
131
|
return json.dumps(INVALID_ARGUMENTS.format(e=err))
|
|
132
132
|
|
|
133
|
+
def _standarize_datatypes(self, args: List[Any]) -> List[Any]:
|
|
134
|
+
"""Standarize data types"""
|
|
135
|
+
result_args = []
|
|
136
|
+
|
|
137
|
+
for arg in args:
|
|
138
|
+
if isinstance(arg, (float, int)):
|
|
139
|
+
result_args.append(float(arg))
|
|
140
|
+
else:
|
|
141
|
+
result_args.append(arg)
|
|
142
|
+
|
|
143
|
+
return result_args
|
|
144
|
+
|
|
133
145
|
def GET_PARAM(self, *args: List[Any]) -> Any:
|
|
134
146
|
"""GET_PARAM Function"""
|
|
135
147
|
if len(args) > 2:
|
|
@@ -198,6 +210,8 @@ class LclCore:
|
|
|
198
210
|
if args[0] is None or args[1] is None:
|
|
199
211
|
return None
|
|
200
212
|
|
|
213
|
+
args = self._standarize_datatypes(args)
|
|
214
|
+
|
|
201
215
|
if not isinstance(args[0], type(args[1])):
|
|
202
216
|
return DIFFERENT_TYPES.format(arg1=type(args[0]).__name__, arg2=type(args[1]).__name__)
|
|
203
217
|
return args[0] == args[1]
|
|
@@ -241,7 +255,7 @@ class LclCore:
|
|
|
241
255
|
|
|
242
256
|
try:
|
|
243
257
|
result += float(num)
|
|
244
|
-
except Exception:
|
|
258
|
+
except Exception:
|
|
245
259
|
pass
|
|
246
260
|
|
|
247
261
|
return result
|
|
@@ -261,7 +275,7 @@ class LclCore:
|
|
|
261
275
|
is_first = False
|
|
262
276
|
else:
|
|
263
277
|
result -= float(num)
|
|
264
|
-
except Exception:
|
|
278
|
+
except Exception:
|
|
265
279
|
pass
|
|
266
280
|
|
|
267
281
|
return result
|
|
@@ -281,7 +295,7 @@ class LclCore:
|
|
|
281
295
|
result = float(num)
|
|
282
296
|
else:
|
|
283
297
|
result *= float(num)
|
|
284
|
-
except Exception:
|
|
298
|
+
except Exception:
|
|
285
299
|
pass
|
|
286
300
|
|
|
287
301
|
return result
|
|
@@ -301,7 +315,7 @@ class LclCore:
|
|
|
301
315
|
result = float(num)
|
|
302
316
|
else:
|
|
303
317
|
result /= float(num)
|
|
304
|
-
except Exception:
|
|
318
|
+
except Exception:
|
|
305
319
|
pass
|
|
306
320
|
|
|
307
321
|
return result
|
|
@@ -435,6 +449,8 @@ class LclCore:
|
|
|
435
449
|
if args[0] is None or args[1] is None:
|
|
436
450
|
return None
|
|
437
451
|
|
|
452
|
+
args = self._standarize_datatypes(args)
|
|
453
|
+
|
|
438
454
|
if not isinstance(args[0], type(args[1])):
|
|
439
455
|
return DIFFERENT_TYPES.format(arg1=type(args[0]).__name__, arg2=type(args[1]).__name__)
|
|
440
456
|
return args[0] >= args[1]
|
|
@@ -449,6 +465,8 @@ class LclCore:
|
|
|
449
465
|
if args[0] is None or args[1] is None:
|
|
450
466
|
return None
|
|
451
467
|
|
|
468
|
+
args = self._standarize_datatypes(args)
|
|
469
|
+
|
|
452
470
|
if not isinstance(args[0], type(args[1])):
|
|
453
471
|
return DIFFERENT_TYPES.format(arg1=type(args[0]).__name__, arg2=type(args[1]).__name__)
|
|
454
472
|
return args[0] > args[1]
|
|
@@ -463,6 +481,8 @@ class LclCore:
|
|
|
463
481
|
if args[0] is None or args[1] is None:
|
|
464
482
|
return None
|
|
465
483
|
|
|
484
|
+
args = self._standarize_datatypes(args)
|
|
485
|
+
|
|
466
486
|
if not isinstance(args[0], type(args[1])):
|
|
467
487
|
return DIFFERENT_TYPES.format(arg1=type(args[0]).__name__, arg2=type(args[1]).__name__)
|
|
468
488
|
return args[0] <= args[1]
|
|
@@ -477,6 +497,8 @@ class LclCore:
|
|
|
477
497
|
if args[0] is None or args[1] is None:
|
|
478
498
|
return None
|
|
479
499
|
|
|
500
|
+
args = self._standarize_datatypes(args)
|
|
501
|
+
|
|
480
502
|
if not isinstance(args[0], type(args[1])):
|
|
481
503
|
return DIFFERENT_TYPES.format(arg1=type(args[0]).__name__, arg2=type(args[1]).__name__)
|
|
482
504
|
return args[0] < args[1]
|
|
@@ -491,6 +513,8 @@ class LclCore:
|
|
|
491
513
|
if args[0] is None or args[1] is None:
|
|
492
514
|
return None
|
|
493
515
|
|
|
516
|
+
args = self._standarize_datatypes(args)
|
|
517
|
+
|
|
494
518
|
if not isinstance(args[0], type(args[1])):
|
|
495
519
|
return DIFFERENT_TYPES.format(arg1=type(args[0]).__name__, arg2=type(args[1]).__name__)
|
|
496
520
|
return args[0] != args[1]
|
|
@@ -510,7 +534,7 @@ class LclCore:
|
|
|
510
534
|
try:
|
|
511
535
|
byte_array = bytes.fromhex(hexa)
|
|
512
536
|
return byte_array.decode('ASCII')
|
|
513
|
-
except Exception:
|
|
537
|
+
except Exception:
|
|
514
538
|
return 'Invalid hex string'
|
|
515
539
|
|
|
516
540
|
def STR_TO_HEX(self, *args: List[Any]) -> str | None:
|
|
@@ -533,7 +557,7 @@ class LclCore:
|
|
|
533
557
|
|
|
534
558
|
try:
|
|
535
559
|
return int(int(args[0], 16))
|
|
536
|
-
except Exception:
|
|
560
|
+
except Exception:
|
|
537
561
|
return 'Invalid hex string'
|
|
538
562
|
|
|
539
563
|
def INT_TO_HEX(self, *args: List[Any]) -> str | None:
|
|
@@ -546,7 +570,7 @@ class LclCore:
|
|
|
546
570
|
|
|
547
571
|
try:
|
|
548
572
|
return hex(int(args[0]))[2:]
|
|
549
|
-
except Exception:
|
|
573
|
+
except Exception:
|
|
550
574
|
return 'Invalid int value'
|
|
551
575
|
|
|
552
576
|
def TO_FLOAT(self, *args: List[Any]) -> str | None | float:
|
|
@@ -559,7 +583,7 @@ class LclCore:
|
|
|
559
583
|
|
|
560
584
|
try:
|
|
561
585
|
return float(args[0])
|
|
562
|
-
except Exception:
|
|
586
|
+
except Exception:
|
|
563
587
|
return f'Invalid arguments - must be real number, not {type(args[0]).__name__}'
|
|
564
588
|
|
|
565
589
|
def IS_PARAMETER_PRESENT(self, *args: List[Any]) -> str | bool:
|
|
@@ -590,6 +614,8 @@ class LclCore:
|
|
|
590
614
|
if args[0] is None or args[1] is None or args[2] is None:
|
|
591
615
|
return None
|
|
592
616
|
|
|
617
|
+
args = self._standarize_datatypes(args)
|
|
618
|
+
|
|
593
619
|
if not isinstance(args[0], type(args[1])):
|
|
594
620
|
return DIFFERENT_TYPES_RANGES.format(
|
|
595
621
|
arg1=type(args[0]).__name__,
|
|
@@ -607,6 +633,8 @@ class LclCore:
|
|
|
607
633
|
if args[0] is None or args[1] is None or args[2] is None:
|
|
608
634
|
return None
|
|
609
635
|
|
|
636
|
+
args = self._standarize_datatypes(args)
|
|
637
|
+
|
|
610
638
|
if not isinstance(args[0], type(args[1])):
|
|
611
639
|
return DIFFERENT_TYPES_RANGES.format(
|
|
612
640
|
arg1=type(args[0]).__name__,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: layrz-sdk
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.12
|
|
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>
|
|
@@ -17,6 +17,7 @@ Description-Content-Type: text/markdown
|
|
|
17
17
|
License-File: LICENSE
|
|
18
18
|
Requires-Dist: requests
|
|
19
19
|
Requires-Dist: xlsxwriter
|
|
20
|
+
Requires-Dist: tzdata
|
|
20
21
|
|
|
21
22
|
# Layrz SDK
|
|
22
23
|
|
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
.gitignore
|
|
2
|
-
CHANGELOG.md
|
|
3
|
-
CODE_OF_CONDUCT.md
|
|
4
|
-
CONTRIBUTING.md
|
|
5
1
|
LICENSE
|
|
6
2
|
README.md
|
|
7
|
-
lint.py
|
|
8
3
|
pyproject.toml
|
|
9
|
-
requirements-dev.txt
|
|
10
|
-
requirements.txt
|
|
11
|
-
.github/workflows/checks.yml
|
|
12
|
-
.github/workflows/deploy.yml
|
|
13
|
-
.vscode/extensions.json
|
|
14
|
-
.vscode/settings.json
|
|
15
4
|
layrz_sdk/__init__.py
|
|
16
5
|
layrz_sdk.egg-info/PKG-INFO
|
|
17
6
|
layrz_sdk.egg-info/SOURCES.txt
|
|
@@ -52,7 +41,6 @@ layrz_sdk/entities/charts/table.py
|
|
|
52
41
|
layrz_sdk/entities/charts/timeline.py
|
|
53
42
|
layrz_sdk/entities/checkpoints/__init__.py
|
|
54
43
|
layrz_sdk/entities/checkpoints/checkpoint.py
|
|
55
|
-
layrz_sdk/entities/checkpoints/geofence.py
|
|
56
44
|
layrz_sdk/entities/checkpoints/waypoint.py
|
|
57
45
|
layrz_sdk/entities/events/__init__.py
|
|
58
46
|
layrz_sdk/entities/events/event.py
|
|
@@ -63,6 +51,7 @@ layrz_sdk/entities/general/asset.py
|
|
|
63
51
|
layrz_sdk/entities/general/asset_operation_mode.py
|
|
64
52
|
layrz_sdk/entities/general/custom_field.py
|
|
65
53
|
layrz_sdk/entities/general/device.py
|
|
54
|
+
layrz_sdk/entities/general/geofence.py
|
|
66
55
|
layrz_sdk/entities/general/sensor.py
|
|
67
56
|
layrz_sdk/entities/general/user.py
|
|
68
57
|
layrz_sdk/entities/repcom/__init__.py
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "layrz-sdk"
|
|
3
|
-
version = "3.0.
|
|
3
|
+
version = "3.0.12"
|
|
4
4
|
description = "Layrz SDK for Python"
|
|
5
5
|
authors = [
|
|
6
6
|
{name = "Golden M, Inc.", email = "software@goldenm.com"}
|
|
@@ -33,6 +33,7 @@ classifiers = [
|
|
|
33
33
|
dependencies = [
|
|
34
34
|
"requests",
|
|
35
35
|
"xlsxwriter",
|
|
36
|
+
"tzdata"
|
|
36
37
|
]
|
|
37
38
|
|
|
38
39
|
[project.urls]
|
|
@@ -541,7 +541,7 @@ class TestLclFunctions(unittest.TestCase):
|
|
|
541
541
|
formula = 'DIFFERENT("Hola", 10)'
|
|
542
542
|
lcl = LclCore(script=formula)
|
|
543
543
|
result = self._process_and_convert(lcl)
|
|
544
|
-
self.assertEqual(result, 'Invalid data types - arg1: str - arg2:
|
|
544
|
+
self.assertEqual(result, 'Invalid data types - arg1: str - arg2: float')
|
|
545
545
|
|
|
546
546
|
def test_HEX_TO_STR(self) -> None:
|
|
547
547
|
formula = 'HEX_TO_STR("48656c6c6f")'
|
|
@@ -1,54 +0,0 @@
|
|
|
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:3.11
|
|
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: Install dev dependencies
|
|
27
|
-
run: |
|
|
28
|
-
pip3 install -U -r requirements-dev.txt
|
|
29
|
-
|
|
30
|
-
- name: Lint
|
|
31
|
-
run: |
|
|
32
|
-
ruff check
|
|
33
|
-
|
|
34
|
-
uniitest:
|
|
35
|
-
needs: lint
|
|
36
|
-
runs-on: ubuntu-latest
|
|
37
|
-
container:
|
|
38
|
-
image: ghcr.io/goldenm-software/python-builder:3.11
|
|
39
|
-
options: --user root
|
|
40
|
-
credentials:
|
|
41
|
-
username: ${{ github.repository_owner }}
|
|
42
|
-
password: ${{ secrets.GITHUB_TOKEN }}
|
|
43
|
-
|
|
44
|
-
steps:
|
|
45
|
-
- name: Checkout
|
|
46
|
-
uses: actions/checkout@v4
|
|
47
|
-
|
|
48
|
-
- name: Install dependencies
|
|
49
|
-
run: |
|
|
50
|
-
pip install -U pip -r requirements.txt
|
|
51
|
-
|
|
52
|
-
- name: Run unit tests
|
|
53
|
-
run: |
|
|
54
|
-
python3 -m unittest discover -s tests -v
|
|
@@ -1,36 +0,0 @@
|
|
|
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:3.11
|
|
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
|
|
28
|
-
run: |
|
|
29
|
-
pip install --upgrade pip build twine
|
|
30
|
-
python3 -m build
|
|
31
|
-
|
|
32
|
-
- name: Upload to Python Package Index
|
|
33
|
-
uses: pypa/gh-action-pypi-publish@v1.8.10
|
|
34
|
-
with:
|
|
35
|
-
user: ${{ secrets.LAYRZ_PYPI_USERNAME }}
|
|
36
|
-
password: ${{ secrets.LAYRZ_PYPI_PASSWORD }}
|
layrz_sdk-3.0.10/.gitignore
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"[python]": {
|
|
3
|
-
"editor.codeActionsOnSave": {
|
|
4
|
-
"source.organizeImports": "explicit",
|
|
5
|
-
"source.fixAll": "explicit"
|
|
6
|
-
},
|
|
7
|
-
"editor.rulers": [120],
|
|
8
|
-
"editor.formatOnSaveMode": "file",
|
|
9
|
-
"editor.formatOnSave": true,
|
|
10
|
-
"editor.defaultFormatter": "charliermarsh.ruff"
|
|
11
|
-
},
|
|
12
|
-
"editor.tabSize": 2,
|
|
13
|
-
"editor.insertSpaces": true,
|
|
14
|
-
"editor.detectIndentation": true
|
|
15
|
-
}
|
layrz_sdk-3.0.10/CHANGELOG.md
DELETED
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## 3.0.10
|
|
4
|
-
|
|
5
|
-
- Removed Self type annotation from all classes
|
|
6
|
-
|
|
7
|
-
## 3.0.9
|
|
8
|
-
|
|
9
|
-
- Added different return data of Report when password is set
|
|
10
|
-
|
|
11
|
-
## 3.0.8
|
|
12
|
-
|
|
13
|
-
- New linter and formatter using ruff
|
|
14
|
-
- Added typings on all classes and functions available
|
|
15
|
-
- New Report export format PDF (Not implemented yet)
|
|
16
|
-
- Added new way to encrypt .xslx files directly using the
|
|
17
|
-
|
|
18
|
-
## 3.0.7
|
|
19
|
-
|
|
20
|
-
- Added the value of `AssetOperationMode.ZONE`
|
|
21
|
-
- Added a check for `Asset.operation_mode == ASSETMULTIPLE` while savind the list of child's
|
|
22
|
-
- Clarified the deprecation of `ReportRow.height`
|
|
23
|
-
|
|
24
|
-
## 3.0.6
|
|
25
|
-
|
|
26
|
-
- Changed print in `LineChart` to a `log.warning` and `log.fatal` in case of error
|
|
27
|
-
|
|
28
|
-
## 3.0.3
|
|
29
|
-
|
|
30
|
-
- Implemented new chart rendering library `syncfusion_flutter_charts` for Flutter.
|
|
31
|
-
- Changed rendering method for `LineChart`, now you should provide the `technology` to select the rendering library.
|
|
32
|
-
|
|
33
|
-
## 3.0.2
|
|
34
|
-
|
|
35
|
-
- Fixed issue with `IF()` LCL function, now only validates the nullability of the first argument.
|
|
36
|
-
- Added new `VERSION()` LCL Function to get the current version of the package
|
|
37
|
-
|
|
38
|
-
## 3.0.1
|
|
39
|
-
|
|
40
|
-
- Added None validation on every LCL function, when any of the arguments is None, the function will return None
|
|
41
|
-
- Added unit tests for all LCL functions
|
|
42
|
-
|
|
43
|
-
## 3.0.0
|
|
44
|
-
|
|
45
|
-
- Removed shared namespace to improve compatibility with other packages
|
|
46
|
-
|
|
47
|
-
## 2.2.4
|
|
48
|
-
|
|
49
|
-
- Defined new class `ReportConfiguration` to handle the configuration of the report in Python scripts
|
|
50
|
-
|
|
51
|
-
## 2.2.3
|
|
52
|
-
|
|
53
|
-
- Property `text_color` deprectated in `ReportCol`, replaced by a luminance-based color using the background color
|
|
54
|
-
- Property `text_color` deprectated in `ReportHeader`, replaced by a luminance-based color using the background color
|
|
55
|
-
- Property `width` deprectated in `ReportHeader`, replaced by the function `autofit()` to automatically fit the header width
|
|
56
|
-
- New entity `CustomReportPage` that receives a custom builder function to build the page
|
|
57
|
-
- Property `export_format` deprecated in `Report`, replaced to an argument of the function `export()`
|
|
58
|
-
|
|
59
|
-
## 2.2.2
|
|
60
|
-
|
|
61
|
-
- Updated `AssetOperationMode` to support `STATIC` and removal of `FAILOVER` mode
|
|
62
|
-
|
|
63
|
-
## 2.2.1
|
|
64
|
-
|
|
65
|
-
- Bug fixes related to removing __ from all classes
|
|
66
|
-
|
|
67
|
-
## 2.2.0
|
|
68
|
-
|
|
69
|
-
- Removed support to Python 3.12 due to a shared namespace issue.
|
|
70
|
-
- Reorganized classes to better support.
|
|
71
|
-
- Added typings to all classes and functions.
|
|
72
|
-
|
|
73
|
-
## 2.1.5
|
|
74
|
-
- Added declarative typing on all LCL functions
|
|
75
|
-
- Added support for timezone in `UNIX_TO_STR` LCL function
|
|
76
|
-
|
|
77
|
-
## 2.1.3
|
|
78
|
-
- Changed build mode to pyproject.toml
|
|
79
|
-
- Updated `LcLCore.perform()` function to receive additional globals and locals in their arguments
|
|
80
|
-
|
|
81
|
-
## v2.1.2
|
|
82
|
-
- Add UNIX_TO_STR LCL function
|
|
83
|
-
|
|
84
|
-
## v2.1.1
|
|
85
|
-
- Added `compact` in the json return format in reports
|
|
86
|
-
|
|
87
|
-
## v2.1.0
|
|
88
|
-
- Add bold format option to Col class
|
|
89
|
-
- Add freeze header option to Page class
|
|
90
|
-
|
|
91
|
-
## v2.0.1
|
|
92
|
-
- Fixes on package namespace
|
|
93
|
-
|
|
94
|
-
## v2.0.0
|
|
95
|
-
* Deprecated `lcl.core` module
|
|
96
|
-
* Changed `layrzsdk` to `layrz.sdk` package (With unified Layrz namespace)
|
|
97
|
-
|
|
98
|
-
## v1.4.5
|
|
99
|
-
* Added CaseIgnoredStatus to init file
|
|
100
|
-
|
|
101
|
-
## v1.4.4
|
|
102
|
-
* Added CaseIgnoredStatus to Case entity
|
|
103
|
-
|
|
104
|
-
## v1.4.3
|
|
105
|
-
* Added new ChartType: TableChart and NumberChart
|
|
106
|
-
* Starting to replace documentation format from unstructured to a structured format
|
|
107
|
-
|
|
108
|
-
## v1.4.2
|
|
109
|
-
* Fix, added SUBSTRING LCL to global functions
|
|
110
|
-
|
|
111
|
-
## v1.4.1
|
|
112
|
-
* Fixed LineChart xAxis Datetime conversion for CanvasJS, now will multiply the timestamp by 1000 to use milliseconds
|
|
113
|
-
|
|
114
|
-
## v1.4.0
|
|
115
|
-
* Added support for Flutter `graphic` library
|
|
116
|
-
* LineChart
|
|
117
|
-
* AreaChart (Replaced previous AreaChart to a temporal extend of LineChart)
|
|
118
|
-
* BarChart
|
|
119
|
-
* ColumnChart
|
|
120
|
-
* PieChart
|
|
121
|
-
* MapChart
|
|
122
|
-
* ScatterChart
|
|
123
|
-
* RadialBarChart
|
|
124
|
-
* Future deprecations:
|
|
125
|
-
* HTMLChart
|
|
126
|
-
* TimelineChart
|
|
127
|
-
* RadarChart
|
|
128
|
-
|
|
129
|
-
## v1.3.9
|
|
130
|
-
* Internal changes related to GitLab CI automation
|
|
131
|
-
|
|
132
|
-
## v1.3.8
|
|
133
|
-
* Added SUBSTRING LCL function
|
|
134
|
-
|
|
135
|
-
## v.1.3.7
|
|
136
|
-
* Added sequence in cases
|
|
137
|
-
|
|
138
|
-
## v1.3.6
|
|
139
|
-
* Added new Map Chart
|
|
140
|
-
- Added required entity MapPoint
|
|
141
|
-
- Added required enum MapCenterType
|
|
142
|
-
* Added new HTML Chart
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
## v1.3.5
|
|
146
|
-
* Bug fix related to formula perform, added PRIMARY_DEVICE to simulation environment
|
|
147
|
-
|
|
148
|
-
## v1.3.4
|
|
149
|
-
* Added Transaction entity for REPCOM reports
|
|
150
|
-
|
|
151
|
-
## v1.3.3
|
|
152
|
-
- Added PRIMARY_DEVICE() function to Layrz Compute Language
|
|
153
|
-
|
|
154
|
-
## v1.3.2
|
|
155
|
-
- Updated styles of charts return object to ApexCharts or CanvasJS
|
|
156
|
-
- Replaced all .rst files to .md files
|
|
157
|
-
|
|
158
|
-
## v1.3.1
|
|
159
|
-
* Removed markerSize (in CanvasJS) for dashed series
|
|
160
|
-
|
|
161
|
-
## v1.3.0
|
|
162
|
-
* Added support for CanvasJS Javascript Library
|
|
163
|
-
* Deprecated to_apexcharts property in charts.
|
|
164
|
-
* New method render() in charts with support for multiple Javascript rendering library
|
|
165
|
-
* Added color helpers in layrzsdk.helpers
|
|
166
|
-
|
|
167
|
-
## v1.2.6
|
|
168
|
-
* Removed dataLabels in almost all charts (Except Pie and RadialBar)
|
|
169
|
-
|
|
170
|
-
## v1.2.5
|
|
171
|
-
* Optimizations for Javascript renderer
|
|
172
|
-
|
|
173
|
-
## v1.2.4
|
|
174
|
-
* Added dashed attribute to ChartDataSerie
|
|
175
|
-
* Added the Possibility to mix charts, only available for:
|
|
176
|
-
- LineChart
|
|
177
|
-
- AreaChart
|
|
178
|
-
- ColumnChart
|
|
179
|
-
- ScatterChart (Only as serie, not as main chart)
|
|
180
|
-
|
|
181
|
-
## v1.2.3
|
|
182
|
-
* Added new value in BroadcastStatus
|
|
183
|
-
|
|
184
|
-
## v1.2.2
|
|
185
|
-
* Updated ReportCol entity to set new default values
|
|
186
|
-
* New entity ReportDataType
|
|
187
|
-
* Possibility to export directly to the Report class
|
|
188
|
-
* Re-organized entities/ folder
|
|
189
|
-
* Added Broadcasts entities
|
|
190
|
-
|
|
191
|
-
## v1.2.1
|
|
192
|
-
* Added Report Col entity
|
|
193
|
-
|
|
194
|
-
## v1.2.0
|
|
195
|
-
* Added reports entities
|
|
196
|
-
|
|
197
|
-
## v1.1.4
|
|
198
|
-
* Bug fixes
|
|
199
|
-
|
|
200
|
-
## v1.1.3
|
|
201
|
-
* Bug fixes
|
|
202
|
-
|
|
203
|
-
## v1.1.2
|
|
204
|
-
* Bug fixes
|
|
205
|
-
|
|
206
|
-
## v1.1.1
|
|
207
|
-
* Bug fixes
|
|
208
|
-
|
|
209
|
-
## v1.1.0
|
|
210
|
-
* Reorganized files
|
|
211
|
-
* Added new Charts entities
|
|
212
|
-
|
|
213
|
-
## v1.0.14
|
|
214
|
-
* Added CONTAINS, STARTS_WITH, ENDS_WITH functions to the Layrz Computed Language
|
|
215
|
-
|
|
216
|
-
## v1.0.13
|
|
217
|
-
* Fixed missing import into `layrzsdk.entities.__init__.py`
|
|
218
|
-
|
|
219
|
-
## v1.0.12
|
|
220
|
-
* Added Geofence, Comment, Waypoint and Checkpoint entities
|
|
221
|
-
|
|
222
|
-
## v1.0.11
|
|
223
|
-
* Added User, Comment and Case entities
|
|
224
|
-
|
|
225
|
-
## v1.0.10
|
|
226
|
-
* Fixes
|
|
227
|
-
|
|
228
|
-
## v1.0.9
|
|
229
|
-
* Added Event and Trigger entities
|
|
230
|
-
* Renamed file `mesage.py` to `message.py`
|
|
231
|
-
|
|
232
|
-
## v1.0.8
|
|
233
|
-
* Added title getter of all charts entities
|
|
234
|
-
|
|
235
|
-
## v1.0.7
|
|
236
|
-
* Added PieChart, BarChart, and RadialBarChart entities
|
|
237
|
-
|
|
238
|
-
## v1.0.6
|
|
239
|
-
* Fixed STING to STRING bug in ChartDataType enum
|
|
240
|
-
|
|
241
|
-
## v1.0.5
|
|
242
|
-
* Bug fixes
|
|
243
|
-
|
|
244
|
-
## v1.0.4
|
|
245
|
-
* Added data_type argument of ChartDataSerie
|
|
246
|
-
|
|
247
|
-
## v1.0.3
|
|
248
|
-
* Added Chart configuration entity
|
|
249
|
-
|
|
250
|
-
## v1.0.2
|
|
251
|
-
* Added entities for Range Charts:
|
|
252
|
-
- Line Charts
|
|
253
|
-
- Area Charts
|
|
254
|
-
- Column Charts
|
|
255
|
-
|
|
256
|
-
## v1.0.1
|
|
257
|
-
* Added entities for Sensors and Triggers
|
|
258
|
-
|
|
259
|
-
## v1.0.0
|
|
260
|
-
* Initial release
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Code of conduct
|
|
2
|
-
|
|
3
|
-
## Be friendly and patient.
|
|
4
|
-
Our objective is contribute to community and help us together to create better code.
|
|
5
|
-
|
|
6
|
-
## Be welcoming
|
|
7
|
-
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.
|
|
8
|
-
|
|
9
|
-
## Be considerate
|
|
10
|
-
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.
|
|
11
|
-
|
|
12
|
-
## Be respectful
|
|
13
|
-
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.
|
|
14
|
-
|
|
15
|
-
## Be careful in the words that you choose
|
|
16
|
-
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:
|
|
17
|
-
* Violent threats or language directed against another person.
|
|
18
|
-
* Discriminatory jokes and language.
|
|
19
|
-
* Posting sexually explicit or violent material.
|
|
20
|
-
* Posting (or threatening to post) other people's personally identifying information ("doxing").
|
|
21
|
-
* Personal insults, especially those using racist or sexist terms.
|
|
22
|
-
* Unwelcome sexual attention.
|
|
23
|
-
* Advocating for, or encouraging, any of the above behavior.
|
|
24
|
-
* Repeated harassment of others. In general, if someone asks you to stop, then stop.
|
layrz_sdk-3.0.10/CONTRIBUTING.md
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# Contributing
|
|
2
|
-
|
|
3
|
-
As an open source project, we welcomes contributions of many forms.
|
|
4
|
-
|
|
5
|
-
## To request a Merge Request
|
|
6
|
-
Please follow the next structure of your request:
|
|
7
|
-
|
|
8
|
-
### Title
|
|
9
|
-
A short description of your feature/fix
|
|
10
|
-
|
|
11
|
-
Also, add this prefix in the title according to the scenario:
|
|
12
|
-
|
|
13
|
-
| Prefix/Tag | Meaning |
|
|
14
|
-
|-|-|
|
|
15
|
-
| `feature/` | New feature, like new methods, classes, etc. |
|
|
16
|
-
| `fix/` | Bug fix or documentation related fix |
|
|
17
|
-
| `docs/` | Documentation related changes |
|
|
18
|
-
|
|
19
|
-
### Description
|
|
20
|
-
Explain your feature/fix request and why we should be approve.
|
|
21
|
-
|
|
22
|
-
Be explicit and precise with your submission, that helps us to review and approve your request.
|
|
23
|
-
|
|
24
|
-
## Code of Conduct
|
|
25
|
-
|
|
26
|
-
As a contributor, you can help us keep the Layrz community open and inclusive.
|
|
27
|
-
Please read and follow our code of conduct in `CODE_OF_CONDUCT.md`.
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
""" Init file """
|
|
2
|
-
# Broadcast entities
|
|
3
|
-
from .broadcasts import BroadcastRequest, BroadcastResponse, BroadcastResult, BroadcastStatus, OutboundService
|
|
4
|
-
|
|
5
|
-
# Cases entitites
|
|
6
|
-
from .cases import Case, CaseIgnoredStatus, CaseStatus, Comment, Trigger
|
|
7
|
-
|
|
8
|
-
# Charts entities
|
|
9
|
-
from .charts import (
|
|
10
|
-
AreaChart,
|
|
11
|
-
AxisConfig,
|
|
12
|
-
BarChart,
|
|
13
|
-
ChartAlignment,
|
|
14
|
-
ChartColor,
|
|
15
|
-
ChartConfiguration,
|
|
16
|
-
ChartDataSerie,
|
|
17
|
-
ChartDataSerieType,
|
|
18
|
-
ChartDataType,
|
|
19
|
-
ChartException,
|
|
20
|
-
ChartRenderTechnology,
|
|
21
|
-
ColumnChart,
|
|
22
|
-
HTMLChart,
|
|
23
|
-
LineChart,
|
|
24
|
-
MapCenterType,
|
|
25
|
-
MapChart,
|
|
26
|
-
MapPoint,
|
|
27
|
-
NumberChart,
|
|
28
|
-
PieChart,
|
|
29
|
-
RadarChart,
|
|
30
|
-
RadialBarChart,
|
|
31
|
-
ScatterChart,
|
|
32
|
-
ScatterSerie,
|
|
33
|
-
ScatterSerieItem,
|
|
34
|
-
TableChart,
|
|
35
|
-
TableHeader,
|
|
36
|
-
TableRow,
|
|
37
|
-
TimelineChart,
|
|
38
|
-
TimelineSerie,
|
|
39
|
-
TimelineSerieItem,
|
|
40
|
-
get_color_list,
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
# Checkpoints entities
|
|
44
|
-
from .checkpoints import Checkpoint, Geofence, Waypoint
|
|
45
|
-
|
|
46
|
-
# Events entities
|
|
47
|
-
from .events import Event
|
|
48
|
-
|
|
49
|
-
# Formatting entities
|
|
50
|
-
from .formatting import TextAlignment
|
|
51
|
-
|
|
52
|
-
# General entities
|
|
53
|
-
from .general import Asset, AssetOperationMode, CustomField, Device, Sensor, User
|
|
54
|
-
|
|
55
|
-
# REPCOM entities
|
|
56
|
-
from .repcom import Transaction
|
|
57
|
-
|
|
58
|
-
# Reports entities
|
|
59
|
-
from .reports import (
|
|
60
|
-
CustomReportPage,
|
|
61
|
-
Report,
|
|
62
|
-
ReportCol,
|
|
63
|
-
ReportConfiguration,
|
|
64
|
-
ReportDataType,
|
|
65
|
-
ReportFormat,
|
|
66
|
-
ReportHeader,
|
|
67
|
-
ReportPage,
|
|
68
|
-
ReportRow,
|
|
69
|
-
)
|
|
70
|
-
|
|
71
|
-
# Telemetry entities
|
|
72
|
-
from .telemetry import Message, Position
|
layrz_sdk-3.0.10/lint.py
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
""" Lint files """
|
|
2
|
-
import argparse
|
|
3
|
-
import os
|
|
4
|
-
|
|
5
|
-
from pylint.lint import Run
|
|
6
|
-
|
|
7
|
-
parser = argparse.ArgumentParser(description='Lint code')
|
|
8
|
-
parser.add_argument('--module', type=str, help='Module to lint')
|
|
9
|
-
args = parser.parse_args()
|
|
10
|
-
|
|
11
|
-
IGNORE_FOLDERS = (
|
|
12
|
-
'.venv',
|
|
13
|
-
'.git',
|
|
14
|
-
'__pycache__',
|
|
15
|
-
'test.py',
|
|
16
|
-
)
|
|
17
|
-
|
|
18
|
-
IGNORE_EXTENSIONS = ('.pyc', )
|
|
19
|
-
|
|
20
|
-
IGNORE_FILES = ('lint.py', )
|
|
21
|
-
|
|
22
|
-
watch_files = []
|
|
23
|
-
for root, dirs, files in os.walk('.'):
|
|
24
|
-
dirs[:] = [d for d in dirs if d not in IGNORE_FOLDERS]
|
|
25
|
-
for file in files:
|
|
26
|
-
if file.endswith(IGNORE_EXTENSIONS) or file in IGNORE_FILES:
|
|
27
|
-
continue
|
|
28
|
-
if file.endswith('.py'):
|
|
29
|
-
watch_files.append(os.path.join(root, file))
|
|
30
|
-
|
|
31
|
-
if args.module:
|
|
32
|
-
watch_files = [f for f in watch_files if args.module in f]
|
|
33
|
-
|
|
34
|
-
#print(f'Linting {len(watch_files)} files')
|
|
35
|
-
|
|
36
|
-
Run([
|
|
37
|
-
'--rcfile=pyproject.toml',
|
|
38
|
-
'--persistent=n',
|
|
39
|
-
'--jobs=0',
|
|
40
|
-
*watch_files,
|
|
41
|
-
])
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ruff
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|