PyAutomationIO 2.1.0__tar.gz → 2.1.2__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.
Files changed (187) hide show
  1. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/PKG-INFO +1 -1
  2. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/PyAutomationIO.egg-info/PKG-INFO +1 -1
  3. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/core.py +21 -2
  4. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/logger/datalogger.py +4 -7
  5. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/managers/alarms.py +32 -0
  6. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/alarms/resources/alarms.py +34 -0
  7. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/linear_referencing/resources/linear_referencing_geospatial.py +27 -0
  8. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/tags/resources/tags.py +4 -2
  9. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/tags/cvt.py +9 -9
  10. pyautomationio-2.1.2/version.py +2 -0
  11. pyautomationio-2.1.0/version.py +0 -2
  12. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/LICENSE +0 -0
  13. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/MANIFEST.in +0 -0
  14. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/PyAutomationIO.egg-info/SOURCES.txt +0 -0
  15. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/PyAutomationIO.egg-info/dependency_links.txt +0 -0
  16. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/PyAutomationIO.egg-info/requires.txt +0 -0
  17. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/PyAutomationIO.egg-info/top_level.txt +0 -0
  18. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/README.md +0 -0
  19. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/__init__.py +0 -0
  20. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/alarms/__init__.py +0 -0
  21. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/alarms/states.py +0 -0
  22. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/alarms/trigger.py +0 -0
  23. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/buffer.py +0 -0
  24. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/dbmodels/__init__.py +0 -0
  25. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/dbmodels/alarms.py +0 -0
  26. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/dbmodels/core.py +0 -0
  27. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/dbmodels/events.py +0 -0
  28. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/dbmodels/linear_referencing_geospatial.py +0 -0
  29. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/dbmodels/logs.py +0 -0
  30. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/dbmodels/machines.py +0 -0
  31. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/dbmodels/opcua.py +0 -0
  32. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/dbmodels/opcua_server.py +0 -0
  33. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/dbmodels/tags.py +0 -0
  34. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/dbmodels/users.py +0 -0
  35. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/extensions/__init__.py +0 -0
  36. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/extensions/api.py +0 -0
  37. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/extensions/cors.py +0 -0
  38. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/filter/__init__.py +0 -0
  39. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/hmi/assets/bootstrap-icons-BeopsB42.woff +0 -0
  40. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/hmi/assets/bootstrap-icons-mSm7cUeB.woff2 +0 -0
  41. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/hmi/assets/fa-brands-400-D1LuMI3I.ttf +0 -0
  42. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/hmi/assets/fa-brands-400-D_cYUPeE.woff2 +0 -0
  43. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/hmi/assets/fa-regular-400-BjRzuEpd.woff2 +0 -0
  44. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/hmi/assets/fa-regular-400-DZaxPHgR.ttf +0 -0
  45. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/hmi/assets/fa-solid-900-CTAAxXor.woff2 +0 -0
  46. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/hmi/assets/fa-solid-900-D0aA9rwL.ttf +0 -0
  47. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/hmi/assets/fa-v4compatibility-C9RhG_FT.woff2 +0 -0
  48. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/hmi/assets/fa-v4compatibility-CCth-dXg.ttf +0 -0
  49. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/hmi/assets/index-Bq8WzzWp.js +0 -0
  50. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/hmi/assets/index-fe9Q2n8A.css +0 -0
  51. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/hmi/index.html +0 -0
  52. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/hmi/industrial_pallete_icons/90/302/260 curve 2.svg" +0 -0
  53. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/hmi/industrial_pallete_icons/Analog gauge.svg +0 -0
  54. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/hmi/industrial_pallete_icons/Cool pump.svg +0 -0
  55. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/hmi/industrial_pallete_icons/Hand valve 4.svg +0 -0
  56. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/hmi/industrial_pallete_icons/Mass flowmeter.svg +0 -0
  57. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/hmi/industrial_pallete_icons/Short horizontal pipe.svg +0 -0
  58. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/hmi/industrial_pallete_icons/Tank 16.svg +0 -0
  59. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/iad/__init__.py +0 -0
  60. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/iad/frozen_data.py +0 -0
  61. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/iad/out_of_range.py +0 -0
  62. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/iad/outliers.py +0 -0
  63. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/logger/__init__.py +0 -0
  64. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/logger/alarms.py +0 -0
  65. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/logger/core.py +0 -0
  66. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/logger/events.py +0 -0
  67. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/logger/logdict.py +0 -0
  68. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/logger/logs.py +0 -0
  69. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/logger/machines.py +0 -0
  70. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/logger/opcua_server.py +0 -0
  71. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/logger/users.py +0 -0
  72. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/managers/__init__.py +0 -0
  73. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/managers/db.py +0 -0
  74. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/managers/opcua_client.py +0 -0
  75. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/managers/state_machine.py +0 -0
  76. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/models.py +0 -0
  77. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/__init__.py +0 -0
  78. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/alarms/__init__.py +0 -0
  79. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/alarms/resources/__init__.py +0 -0
  80. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/alarms/resources/summary.py +0 -0
  81. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/database/__init__.py +0 -0
  82. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/database/resources/__init__.py +0 -0
  83. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/database/resources/database.py +0 -0
  84. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/events/__init__.py +0 -0
  85. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/events/resources/__init__.py +0 -0
  86. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/events/resources/events.py +0 -0
  87. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/events/resources/logs.py +0 -0
  88. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/health/__init__.py +0 -0
  89. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/health/resources/__init__.py +0 -0
  90. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/health/resources/health.py +0 -0
  91. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/linear_referencing/__init__.py +0 -0
  92. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/linear_referencing/resources/__init__.py +0 -0
  93. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/machines/__init__.py +0 -0
  94. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/machines/resources/__init__.py +0 -0
  95. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/machines/resources/machines.py +0 -0
  96. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/opcua/__init__.py +0 -0
  97. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/opcua/resources/__init__.py +0 -0
  98. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/opcua/resources/clients.py +0 -0
  99. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/opcua/resources/server.py +0 -0
  100. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/settings/__init__.py +0 -0
  101. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/settings/resources/__init__.py +0 -0
  102. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/settings/resources/settings.py +0 -0
  103. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/tags/__init__.py +0 -0
  104. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/tags/resources/__init__.py +0 -0
  105. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/users/__init__.py +0 -0
  106. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/users/resources/__init__.py +0 -0
  107. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/users/resources/models/__init__.py +0 -0
  108. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/users/resources/models/roles.py +0 -0
  109. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/users/resources/models/users.py +0 -0
  110. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/users/resources/roles.py +0 -0
  111. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/users/resources/users.py +0 -0
  112. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/users/roles.py +0 -0
  113. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/modules/users/users.py +0 -0
  114. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/opcua/__init__.py +0 -0
  115. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/opcua/models.py +0 -0
  116. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/opcua/subscription.py +0 -0
  117. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/__init__.py +0 -0
  118. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/alarms.py +0 -0
  119. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/alarms_history.py +0 -0
  120. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/assets/styles.css +0 -0
  121. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/callbacks/__init__.py +0 -0
  122. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/callbacks/alarms.py +0 -0
  123. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/callbacks/alarms_summary.py +0 -0
  124. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/callbacks/db.py +0 -0
  125. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/callbacks/filter.py +0 -0
  126. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/callbacks/machines.py +0 -0
  127. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/callbacks/machines_detailed.py +0 -0
  128. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/callbacks/opcua.py +0 -0
  129. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/callbacks/opcua_server.py +0 -0
  130. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/callbacks/tags.py +0 -0
  131. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/callbacks/trends.py +0 -0
  132. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/communications.py +0 -0
  133. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/components/__init__.py +0 -0
  134. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/components/alarms.py +0 -0
  135. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/components/alarms_summary.py +0 -0
  136. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/components/database.py +0 -0
  137. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/components/gaussian_filter.py +0 -0
  138. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/components/machines.py +0 -0
  139. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/components/opcua.py +0 -0
  140. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/components/opcua_server.py +0 -0
  141. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/components/tags.py +0 -0
  142. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/components/trends.py +0 -0
  143. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/database.py +0 -0
  144. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/filter.py +0 -0
  145. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/machines.py +0 -0
  146. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/machines_detailed.py +0 -0
  147. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/main.py +0 -0
  148. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/opcua_server.py +0 -0
  149. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/tags.py +0 -0
  150. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/pages/trends.py +0 -0
  151. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/singleton.py +0 -0
  152. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/state_machine.py +0 -0
  153. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/tags/__init__.py +0 -0
  154. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/tags/filter.py +0 -0
  155. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/tags/tag.py +0 -0
  156. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/tests/__init__.py +0 -0
  157. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/tests/test_alarms.py +0 -0
  158. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/tests/test_core.py +0 -0
  159. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/tests/test_opcua_serialization.py +0 -0
  160. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/tests/test_unit.py +0 -0
  161. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/tests/test_user.py +0 -0
  162. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/utils/__init__.py +0 -0
  163. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/utils/decorators.py +0 -0
  164. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/utils/observer.py +0 -0
  165. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/utils/units.py +0 -0
  166. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/variables/__init__.py +0 -0
  167. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/variables/adimentional.py +0 -0
  168. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/variables/current.py +0 -0
  169. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/variables/density.py +0 -0
  170. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/variables/eng_time.py +0 -0
  171. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/variables/force.py +0 -0
  172. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/variables/length.py +0 -0
  173. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/variables/mass.py +0 -0
  174. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/variables/mass_flow.py +0 -0
  175. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/variables/percentage.py +0 -0
  176. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/variables/power.py +0 -0
  177. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/variables/pressure.py +0 -0
  178. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/variables/temperature.py +0 -0
  179. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/variables/volume.py +0 -0
  180. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/variables/volumetric_flow.py +0 -0
  181. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/workers/__init__.py +0 -0
  182. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/workers/logger.py +0 -0
  183. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/workers/state_machine.py +0 -0
  184. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/automation/workers/worker.py +0 -0
  185. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/requirements.txt +0 -0
  186. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/setup.cfg +0 -0
  187. {pyautomationio-2.1.0 → pyautomationio-2.1.2}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyAutomationIO
3
- Version: 2.1.0
3
+ Version: 2.1.2
4
4
  Summary: A python framework to develop automation industrial processes applications and Artificial Intelligence applications for the industrial field
5
5
  Home-page: https://github.com/know-ai/PyAutomation
6
6
  Author: KnowAI
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyAutomationIO
3
- Version: 2.1.0
3
+ Version: 2.1.2
4
4
  Summary: A python framework to develop automation industrial processes applications and Artificial Intelligence applications for the industrial field
5
5
  Home-page: https://github.com/know-ai/PyAutomation
6
6
  Author: KnowAI
@@ -586,7 +586,7 @@ class PyAutomation(Singleton):
586
586
 
587
587
  @logging_error_handler
588
588
  @validate_types(kp_min=int|float, kp_max=int|float, output=list)
589
- def get_tags_by_kp_range(self, kp_min:float, kp_max:float)->list:
589
+ def get_tags_by_kp_range(self, kp_min:float, kp_max:float, segment:str=None)->list:
590
590
  r"""
591
591
  Retrieves tags whose KP is between kp_min and kp_max (inclusive).
592
592
 
@@ -594,12 +594,13 @@ class PyAutomation(Singleton):
594
594
 
595
595
  * **kp_min** (float): Lower KP bound.
596
596
  * **kp_max** (float): Upper KP bound.
597
+ * **segment** (str): Optional segment name to filter by.
597
598
 
598
599
  **Returns:**
599
600
 
600
601
  * **list**: Serialized tags in the requested KP range.
601
602
  """
602
- return self.cvt.get_tags_by_kp_range(kp_min=kp_min, kp_max=kp_max)
603
+ return self.cvt.get_tags_by_kp_range(kp_min=kp_min, kp_max=kp_max, segment=segment)
603
604
 
604
605
  @logging_error_handler
605
606
  @validate_types(segment_name=str, kp=int|float, latitude=int|float, longitude=int|float, elevation=int|float|type(None), output=tuple)
@@ -3981,6 +3982,24 @@ class PyAutomation(Singleton):
3981
3982
  """
3982
3983
  return self.alarm_manager.get_alarms_by_tag(tag=tag)
3983
3984
 
3985
+ @logging_error_handler
3986
+ @validate_types(kp_min=int|float, kp_max=int|float, output=list)
3987
+ def get_alarms_by_kp_range(self, kp_min:float, kp_max:float, segment:str=None)->list:
3988
+ r"""
3989
+ Retrieves alarms whose associated tag KP is within [kp_min, kp_max].
3990
+
3991
+ **Parameters:**
3992
+
3993
+ * **kp_min** (float): Lower KP bound.
3994
+ * **kp_max** (float): Upper KP bound.
3995
+ * **segment** (str, optional): If provided, only alarms whose tag belongs to this segment are returned.
3996
+
3997
+ **Returns:**
3998
+
3999
+ * **list**: List of serialized alarm dictionaries.
4000
+ """
4001
+ return self.alarm_manager.get_alarms_by_kp_range(kp_min=kp_min, kp_max=kp_max, segment=segment)
4002
+
3984
4003
  @logging_error_handler
3985
4004
  @validate_types(id=str, user=User|type(None), output=None)
3986
4005
  def delete_alarm(self, id:str, user:User=None):
@@ -145,14 +145,11 @@ class DataLogger(BaseLogger):
145
145
  tag = Tags.get(identifier=id)
146
146
 
147
147
  if "gaussian_filter" in kwargs:
148
-
149
- if kwargs['gaussian_filter'].lower() in ('1', 'true'):
150
-
151
- kwargs['gaussian_filter'] = True
152
-
148
+ gaussian_filter_value = kwargs["gaussian_filter"]
149
+ if isinstance(gaussian_filter_value, str):
150
+ kwargs["gaussian_filter"] = gaussian_filter_value.strip().lower() in ("1", "true", "yes", "on")
153
151
  else:
154
-
155
- kwargs['gaussian_filter'] = False
152
+ kwargs["gaussian_filter"] = bool(gaussian_filter_value)
156
153
 
157
154
  return Tags.put(id=tag.id, **kwargs)
158
155
 
@@ -278,6 +278,38 @@ class AlarmManager(Singleton):
278
278
 
279
279
  # return alarms
280
280
 
281
+ @logging_error_handler
282
+ def get_alarms_by_kp_range(self, kp_min:float, kp_max:float, segment:str=None)->list:
283
+ r"""
284
+ Returns serialized alarms whose associated tag KP is within [kp_min, kp_max].
285
+
286
+ **Parameters:**
287
+
288
+ * **kp_min** (float): Lower bound for KP.
289
+ * **kp_max** (float): Upper bound for KP.
290
+ * **segment** (str, optional): If provided, only alarms whose tag belongs to this segment are returned.
291
+
292
+ **Returns:**
293
+
294
+ * **list**: List of serialized alarm dictionaries.
295
+ """
296
+ lower = min(kp_min, kp_max)
297
+ upper = max(kp_min, kp_max)
298
+ result = []
299
+ for _, alarm in self._alarms.items():
300
+ tag = alarm.tag
301
+ if not hasattr(tag, 'get_kp'):
302
+ continue
303
+ kp = tag.get_kp()
304
+ if kp is None:
305
+ continue
306
+ if not (lower <= kp <= upper):
307
+ continue
308
+ if segment is not None and alarm.segment != segment:
309
+ continue
310
+ result.append(alarm.serialize())
311
+ return result
312
+
281
313
  @logging_error_handler
282
314
  def get_alarm_by_tag(self, tag:str)->list[Alarm]:
283
315
  r"""
@@ -33,6 +33,12 @@ create_alarm_model = api.model("create_alarm_model", {
33
33
  'description': fields.String(required=False, description='Alarm description', default='')
34
34
  })
35
35
 
36
+ alarms_kp_range_model = api.model("alarms_kp_range_model", {
37
+ 'kp_min': fields.Float(required=True, description='Lower bound KP (inclusive)'),
38
+ 'kp_max': fields.Float(required=True, description='Upper bound KP (inclusive)'),
39
+ 'segment': fields.String(required=False, description='Filter by segment (optional)')
40
+ })
41
+
36
42
  update_alarm_model = api.model("update_alarm_model", {
37
43
  'id': fields.String(required=True, description='Alarm ID'),
38
44
  'name': fields.String(required=False, description='Alarm name'),
@@ -124,6 +130,34 @@ class ActiveAlarmsCollection(Resource):
124
130
  return False, 200
125
131
 
126
132
 
133
+ @ns.route('/kp_range')
134
+ class AlarmsByKpRangeCollection(Resource):
135
+
136
+ @api.doc(security='apikey', description="Retrieves alarms whose associated tag KP is between two bounds (inclusive). Optionally filter by segment.")
137
+ @api.response(200, "Success")
138
+ @api.response(400, "Invalid payload")
139
+ @Api.token_required(auth=True)
140
+ @ns.expect(alarms_kp_range_model)
141
+ def post(self):
142
+ """
143
+ Get alarms by KP range.
144
+
145
+ Returns alarms whose associated tag has a `kp` value between `kp_min` and
146
+ `kp_max` (inclusive). An optional `segment` filter can be applied to further
147
+ restrict the results.
148
+ """
149
+ payload = api.payload or {}
150
+ kp_min = payload.get('kp_min')
151
+ kp_max = payload.get('kp_max')
152
+ segment = payload.get('segment')
153
+
154
+ if kp_min is None or kp_max is None:
155
+ return {'message': 'kp_min and kp_max are required'}, 400
156
+
157
+ data = app.get_alarms_by_kp_range(kp_min=kp_min, kp_max=kp_max, segment=segment)
158
+ return {'data': data}, 200
159
+
160
+
127
161
  @ns.route('/<id>')
128
162
  @api.param('id', 'The alarm identifier')
129
163
  class AlarmResource(Resource):
@@ -2,6 +2,7 @@ import csv
2
2
  from io import StringIO, BytesIO
3
3
  from flask import request
4
4
  from flask_restx import Namespace, Resource, fields, reqparse
5
+ from werkzeug.datastructures import FileStorage
5
6
  from .... import PyAutomation
6
7
  from ....extensions.api import api
7
8
  from ....extensions import _api as Api
@@ -136,6 +137,31 @@ class LinearReferencingInterpolateResource(Resource):
136
137
  return {"message": message, "data": data}, 200
137
138
 
138
139
 
140
+ bulk_import_parser = reqparse.RequestParser()
141
+ bulk_import_parser.add_argument(
142
+ 'file',
143
+ type=FileStorage,
144
+ location='files',
145
+ required=True,
146
+ help='CSV or XLSX file to import'
147
+ )
148
+ bulk_import_parser.add_argument(
149
+ 'segment_name',
150
+ type=str,
151
+ location='form',
152
+ required=False,
153
+ help='Default segment name (used when the file does not include a segment_name column)'
154
+ )
155
+ bulk_import_parser.add_argument(
156
+ 'update_existing',
157
+ type=str,
158
+ location='form',
159
+ required=False,
160
+ default='true',
161
+ help='Update existing points if they already exist (true/false, default: true)'
162
+ )
163
+
164
+
139
165
  @ns.route('/bulk_import')
140
166
  class LinearReferencingBulkImportResource(Resource):
141
167
 
@@ -147,6 +173,7 @@ class LinearReferencingBulkImportResource(Resource):
147
173
  @api.response(200, "Import processed")
148
174
  @api.response(400, "Invalid file or payload")
149
175
  @Api.token_required(auth=True)
176
+ @ns.expect(bulk_import_parser)
150
177
  def post(self):
151
178
  if "file" not in request.files:
152
179
  return {"message": "file is required (CSV or XLSX)"}, 400
@@ -97,7 +97,8 @@ tags_list_filter_model = api.model("tags_list_filter_model", {
97
97
 
98
98
  tags_kp_range_model = api.model("tags_kp_range_model", {
99
99
  'kp_min': fields.Float(required=True, description='Lower bound KP (inclusive)'),
100
- 'kp_max': fields.Float(required=True, description='Upper bound KP (inclusive)')
100
+ 'kp_max': fields.Float(required=True, description='Upper bound KP (inclusive)'),
101
+ 'segment': fields.String(required=False, description='Filter by segment (optional)')
101
102
  })
102
103
 
103
104
 
@@ -185,11 +186,12 @@ class TagsByKpRangeCollection(Resource):
185
186
  payload = api.payload or {}
186
187
  kp_min = payload.get('kp_min')
187
188
  kp_max = payload.get('kp_max')
189
+ segment = payload.get('segment')
188
190
 
189
191
  if kp_min is None or kp_max is None:
190
192
  return {'message': 'kp_min and kp_max are required'}, 400
191
193
 
192
- data = app.get_tags_by_kp_range(kp_min=kp_min, kp_max=kp_max)
194
+ data = app.get_tags_by_kp_range(kp_min=kp_min, kp_max=kp_max, segment=segment)
193
195
  return {'data': data}, 200
194
196
 
195
197
  @ns.route('/names')
@@ -219,14 +219,11 @@ class CVT:
219
219
  if "kp" in kwargs:
220
220
  tag.set_kp(kp=kwargs["kp"])
221
221
  if "gaussian_filter" in kwargs:
222
-
223
- if kwargs['gaussian_filter'].lower() in ('1', 'true'):
224
-
225
- tag.gaussian_filter = True
226
-
222
+ gaussian_filter_value = kwargs["gaussian_filter"]
223
+ if isinstance(gaussian_filter_value, str):
224
+ tag.gaussian_filter = gaussian_filter_value.strip().lower() in ("1", "true", "yes", "on")
227
225
  else:
228
-
229
- tag.gaussian_filter = False
226
+ tag.gaussian_filter = bool(gaussian_filter_value)
230
227
 
231
228
  if "gaussian_filter_r_value" in kwargs:
232
229
 
@@ -386,7 +383,7 @@ class CVT:
386
383
  return result
387
384
 
388
385
  @logging_error_handler
389
- def get_tags_by_kp_range(self, kp_min:float, kp_max:float)->list:
386
+ def get_tags_by_kp_range(self, kp_min:float, kp_max:float, segment:str=None)->list:
390
387
  r"""
391
388
  Returns a list of serialized tags whose KP is between kp_min and kp_max (inclusive).
392
389
 
@@ -394,6 +391,7 @@ class CVT:
394
391
 
395
392
  * **kp_min** (float): Lower bound for KP.
396
393
  * **kp_max** (float): Upper bound for KP.
394
+ * **segment** (str): Optional segment name to filter by.
397
395
 
398
396
  **Returns:**
399
397
 
@@ -407,6 +405,7 @@ class CVT:
407
405
  tag.serialize()
408
406
  for _, tag in self._tags.items()
409
407
  if tag.get_kp() is not None and lower <= tag.get_kp() <= upper
408
+ and (segment is None or tag.segment == segment)
410
409
  ]
411
410
 
412
411
  @logging_error_handler
@@ -940,7 +939,7 @@ class CVTEngine(Singleton):
940
939
  return self.__query(_query)
941
940
 
942
941
  @logging_error_handler
943
- def get_tags_by_kp_range(self, kp_min:float, kp_max:float):
942
+ def get_tags_by_kp_range(self, kp_min:float, kp_max:float, segment:str=None):
944
943
  r"""
945
944
  Thread-safe method to get tags whose KP is within a given range.
946
945
  """
@@ -949,6 +948,7 @@ class CVTEngine(Singleton):
949
948
  _query["parameters"] = dict()
950
949
  _query["parameters"]["kp_min"] = kp_min
951
950
  _query["parameters"]["kp_max"] = kp_max
951
+ _query["parameters"]["segment"] = segment
952
952
  return self.__query(_query)
953
953
 
954
954
  @logging_error_handler
@@ -0,0 +1,2 @@
1
+ __version__ = '2.1.2'
2
+
@@ -1,2 +0,0 @@
1
- __version__ = '2.1.0'
2
-
File without changes
File without changes
File without changes
File without changes