layrz-sdk 3.0.10__tar.gz → 3.0.11__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 (86) hide show
  1. {layrz_sdk-3.0.10/layrz_sdk.egg-info → layrz_sdk-3.0.11}/PKG-INFO +2 -1
  2. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/lcl/core.py +40 -12
  3. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11/layrz_sdk.egg-info}/PKG-INFO +2 -1
  4. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk.egg-info/SOURCES.txt +0 -11
  5. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk.egg-info/requires.txt +1 -0
  6. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/pyproject.toml +2 -1
  7. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/tests/test_lcl.py +1 -1
  8. layrz_sdk-3.0.10/.github/workflows/checks.yml +0 -54
  9. layrz_sdk-3.0.10/.github/workflows/deploy.yml +0 -36
  10. layrz_sdk-3.0.10/.gitignore +0 -13
  11. layrz_sdk-3.0.10/.vscode/extensions.json +0 -9
  12. layrz_sdk-3.0.10/.vscode/settings.json +0 -15
  13. layrz_sdk-3.0.10/CHANGELOG.md +0 -260
  14. layrz_sdk-3.0.10/CODE_OF_CONDUCT.md +0 -24
  15. layrz_sdk-3.0.10/CONTRIBUTING.md +0 -27
  16. layrz_sdk-3.0.10/lint.py +0 -41
  17. layrz_sdk-3.0.10/requirements-dev.txt +0 -1
  18. layrz_sdk-3.0.10/requirements.txt +0 -2
  19. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/LICENSE +0 -0
  20. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/README.md +0 -0
  21. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/__init__.py +0 -0
  22. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/__init__.py +0 -0
  23. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/broadcasts/__init__.py +0 -0
  24. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/broadcasts/request.py +0 -0
  25. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/broadcasts/response.py +0 -0
  26. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/broadcasts/result.py +0 -0
  27. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/broadcasts/service.py +0 -0
  28. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/broadcasts/status.py +0 -0
  29. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/cases/__init__.py +0 -0
  30. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/cases/case.py +0 -0
  31. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/cases/comment.py +0 -0
  32. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/cases/trigger.py +0 -0
  33. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/charts/__init__.py +0 -0
  34. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/charts/alignment.py +0 -0
  35. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/charts/bar.py +0 -0
  36. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/charts/color.py +0 -0
  37. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/charts/column.py +0 -0
  38. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/charts/configuration.py +0 -0
  39. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/charts/data_type.py +0 -0
  40. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/charts/exceptions.py +0 -0
  41. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/charts/html.py +0 -0
  42. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/charts/line.py +0 -0
  43. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/charts/map.py +0 -0
  44. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/charts/number.py +0 -0
  45. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/charts/pie.py +0 -0
  46. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/charts/radar.py +0 -0
  47. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/charts/radial_bar.py +0 -0
  48. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/charts/render_technology.py +0 -0
  49. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/charts/scatter.py +0 -0
  50. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/charts/serie.py +0 -0
  51. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/charts/serie_type.py +0 -0
  52. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/charts/table.py +0 -0
  53. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/charts/timeline.py +0 -0
  54. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/checkpoints/__init__.py +0 -0
  55. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/checkpoints/checkpoint.py +0 -0
  56. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/checkpoints/geofence.py +0 -0
  57. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/checkpoints/waypoint.py +0 -0
  58. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/events/__init__.py +0 -0
  59. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/events/event.py +0 -0
  60. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/formatting/__init__.py +0 -0
  61. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/formatting/text_align.py +0 -0
  62. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/general/__init__.py +0 -0
  63. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/general/asset.py +0 -0
  64. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/general/asset_operation_mode.py +0 -0
  65. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/general/custom_field.py +0 -0
  66. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/general/device.py +0 -0
  67. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/general/sensor.py +0 -0
  68. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/general/user.py +0 -0
  69. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/repcom/__init__.py +0 -0
  70. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/repcom/transaction.py +0 -0
  71. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/reports/__init__.py +0 -0
  72. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/reports/col.py +0 -0
  73. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/reports/format.py +0 -0
  74. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/reports/header.py +0 -0
  75. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/reports/page.py +0 -0
  76. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/reports/report.py +0 -0
  77. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/reports/row.py +0 -0
  78. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/telemetry/__init__.py +0 -0
  79. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/telemetry/message.py +0 -0
  80. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/entities/telemetry/position.py +0 -0
  81. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/helpers/__init__.py +0 -0
  82. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/helpers/color.py +0 -0
  83. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk/lcl/__init__.py +0 -0
  84. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk.egg-info/dependency_links.txt +0 -0
  85. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/layrz_sdk.egg-info/top_level.txt +0 -0
  86. {layrz_sdk-3.0.10 → layrz_sdk-3.0.11}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: layrz-sdk
3
- Version: 3.0.10
3
+ Version: 3.0.11
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
 
@@ -13,7 +13,7 @@ INVALID_ARGUMENTS = 'Invalid arguments - {e}'
13
13
  class LclCore:
14
14
  """Layrz Compute Language SDK"""
15
15
 
16
- def __init__( # pylint: disable=dangerous-default-value
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( # pylint: disable=dangerous-default-value, invalid-name
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)) # pylint: disable=eval-used
125
+ result = json.dumps(eval(self._script, global_functions, local_variables))
126
126
 
127
127
  return result
128
- except Exception as err: # pylint: disable=broad-except
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: # pylint: disable=broad-except
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: # pylint: disable=broad-except
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: # pylint: disable=broad-except
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: # pylint: disable=broad-except
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: # pylint: disable=broad-except
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: # pylint: disable=broad-except
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: # pylint: disable=broad-except
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: # pylint: disable=broad-except
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.10
3
+ Version: 3.0.11
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
@@ -1,2 +1,3 @@
1
1
  requests
2
2
  xlsxwriter
3
+ tzdata
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "layrz-sdk"
3
- version = "3.0.10"
3
+ version = "3.0.11"
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: int')
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 }}
@@ -1,13 +0,0 @@
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
@@ -1,9 +0,0 @@
1
- {
2
- "recommendations": [
3
- "ms-python.python",
4
- "charliermarsh.ruff",
5
- "ms-python.vscode-pylance",
6
- "njpwerner.autodocstring",
7
- "oderwat.indent-rainbow"
8
- ]
9
- }
@@ -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
- }
@@ -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.
@@ -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`.
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
@@ -1,2 +0,0 @@
1
- requests
2
- xlsxwriter
File without changes
File without changes
File without changes