PyAutomationIO 1.1.2__tar.gz → 1.1.3__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 (147) hide show
  1. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/PKG-INFO +16 -73
  2. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/PyAutomationIO.egg-info/PKG-INFO +16 -73
  3. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/PyAutomationIO.egg-info/SOURCES.txt +0 -1
  4. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/README.md +15 -72
  5. pyautomationio-1.1.3/version.py +2 -0
  6. pyautomationio-1.1.2/automation/utils/npw.py +0 -294
  7. pyautomationio-1.1.2/version.py +0 -2
  8. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/LICENSE +0 -0
  9. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/MANIFEST.in +0 -0
  10. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/PyAutomationIO.egg-info/dependency_links.txt +0 -0
  11. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/PyAutomationIO.egg-info/requires.txt +0 -0
  12. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/PyAutomationIO.egg-info/top_level.txt +0 -0
  13. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/__init__.py +0 -0
  14. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/alarms/__init__.py +0 -0
  15. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/alarms/states.py +0 -0
  16. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/alarms/trigger.py +0 -0
  17. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/buffer.py +0 -0
  18. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/core.py +0 -0
  19. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/dbmodels/__init__.py +0 -0
  20. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/dbmodels/alarms.py +0 -0
  21. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/dbmodels/core.py +0 -0
  22. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/dbmodels/events.py +0 -0
  23. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/dbmodels/logs.py +0 -0
  24. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/dbmodels/machines.py +0 -0
  25. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/dbmodels/opcua.py +0 -0
  26. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/dbmodels/opcua_server.py +0 -0
  27. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/dbmodels/tags.py +0 -0
  28. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/dbmodels/users.py +0 -0
  29. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/extensions/__init__.py +0 -0
  30. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/extensions/api.py +0 -0
  31. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/extensions/cors.py +0 -0
  32. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/filter/__init__.py +0 -0
  33. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/iad/__init__.py +0 -0
  34. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/iad/frozen_data.py +0 -0
  35. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/iad/out_of_range.py +0 -0
  36. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/iad/outliers.py +0 -0
  37. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/logger/__init__.py +0 -0
  38. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/logger/alarms.py +0 -0
  39. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/logger/core.py +0 -0
  40. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/logger/datalogger.py +0 -0
  41. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/logger/events.py +0 -0
  42. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/logger/logdict.py +0 -0
  43. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/logger/logs.py +0 -0
  44. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/logger/machines.py +0 -0
  45. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/logger/opcua_server.py +0 -0
  46. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/logger/users.py +0 -0
  47. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/managers/__init__.py +0 -0
  48. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/managers/alarms.py +0 -0
  49. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/managers/db.py +0 -0
  50. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/managers/opcua_client.py +0 -0
  51. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/managers/state_machine.py +0 -0
  52. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/models.py +0 -0
  53. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/__init__.py +0 -0
  54. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/alarms/__init__.py +0 -0
  55. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/alarms/resources/__init__.py +0 -0
  56. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/alarms/resources/alarms.py +0 -0
  57. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/alarms/resources/summary.py +0 -0
  58. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/events/__init__.py +0 -0
  59. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/events/resources/__init__.py +0 -0
  60. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/events/resources/events.py +0 -0
  61. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/events/resources/logs.py +0 -0
  62. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/tags/__init__.py +0 -0
  63. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/tags/resources/__init__.py +0 -0
  64. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/tags/resources/tags.py +0 -0
  65. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/users/__init__.py +0 -0
  66. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/users/resources/__init__.py +0 -0
  67. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/users/resources/models/__init__.py +0 -0
  68. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/users/resources/models/roles.py +0 -0
  69. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/users/resources/models/users.py +0 -0
  70. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/users/resources/roles.py +0 -0
  71. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/users/resources/users.py +0 -0
  72. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/users/roles.py +0 -0
  73. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/users/users.py +0 -0
  74. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/opcua/__init__.py +0 -0
  75. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/opcua/models.py +0 -0
  76. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/opcua/subscription.py +0 -0
  77. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/__init__.py +0 -0
  78. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/alarms.py +0 -0
  79. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/alarms_history.py +0 -0
  80. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/assets/styles.css +0 -0
  81. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/callbacks/__init__.py +0 -0
  82. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/callbacks/alarms.py +0 -0
  83. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/callbacks/alarms_summary.py +0 -0
  84. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/callbacks/db.py +0 -0
  85. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/callbacks/filter.py +0 -0
  86. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/callbacks/machines.py +0 -0
  87. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/callbacks/machines_detailed.py +0 -0
  88. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/callbacks/opcua.py +0 -0
  89. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/callbacks/opcua_server.py +0 -0
  90. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/callbacks/tags.py +0 -0
  91. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/callbacks/trends.py +0 -0
  92. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/communications.py +0 -0
  93. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/components/__init__.py +0 -0
  94. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/components/alarms.py +0 -0
  95. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/components/alarms_summary.py +0 -0
  96. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/components/database.py +0 -0
  97. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/components/gaussian_filter.py +0 -0
  98. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/components/machines.py +0 -0
  99. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/components/opcua.py +0 -0
  100. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/components/opcua_server.py +0 -0
  101. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/components/tags.py +0 -0
  102. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/components/trends.py +0 -0
  103. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/database.py +0 -0
  104. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/filter.py +0 -0
  105. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/machines.py +0 -0
  106. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/machines_detailed.py +0 -0
  107. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/main.py +0 -0
  108. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/opcua_server.py +0 -0
  109. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/tags.py +0 -0
  110. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/trends.py +0 -0
  111. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/singleton.py +0 -0
  112. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/state_machine.py +0 -0
  113. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/tags/__init__.py +0 -0
  114. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/tags/cvt.py +0 -0
  115. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/tags/filter.py +0 -0
  116. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/tags/tag.py +0 -0
  117. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/tests/__init__.py +0 -0
  118. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/tests/test_alarms.py +0 -0
  119. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/tests/test_core.py +0 -0
  120. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/tests/test_unit.py +0 -0
  121. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/tests/test_user.py +0 -0
  122. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/utils/__init__.py +0 -0
  123. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/utils/decorators.py +0 -0
  124. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/utils/observer.py +0 -0
  125. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/utils/units.py +0 -0
  126. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/variables/__init__.py +0 -0
  127. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/variables/adimentional.py +0 -0
  128. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/variables/current.py +0 -0
  129. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/variables/density.py +0 -0
  130. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/variables/eng_time.py +0 -0
  131. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/variables/force.py +0 -0
  132. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/variables/length.py +0 -0
  133. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/variables/mass.py +0 -0
  134. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/variables/mass_flow.py +0 -0
  135. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/variables/percentage.py +0 -0
  136. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/variables/power.py +0 -0
  137. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/variables/pressure.py +0 -0
  138. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/variables/temperature.py +0 -0
  139. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/variables/volume.py +0 -0
  140. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/variables/volumetric_flow.py +0 -0
  141. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/workers/__init__.py +0 -0
  142. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/workers/logger.py +0 -0
  143. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/workers/state_machine.py +0 -0
  144. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/workers/worker.py +0 -0
  145. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/requirements.txt +0 -0
  146. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/setup.cfg +0 -0
  147. {pyautomationio-1.1.2 → pyautomationio-1.1.3}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyAutomationIO
3
- Version: 1.1.2
3
+ Version: 1.1.3
4
4
  Summary: A python library to develop automation continuous tasks using sync or async concurrent threads
5
5
  Home-page: https://github.com/know-ai/PyAutomation
6
6
  Author: KnowAI
@@ -85,84 +85,29 @@ pip install -r requirements.txt
85
85
 
86
86
  ## Run Config page
87
87
 
88
- ```python
89
- python run.py
90
- ```
91
-
92
- or
93
-
94
88
  ```python
95
89
 
96
90
  ./docker-entrypoint.sh
97
91
  ```
98
92
 
99
- ## Deploy documentation on Development mode With mkautodoc
100
-
101
- ### Install Wheel
102
-
103
- ```python
104
- pip install wheel
105
- ```
106
-
107
- ### Create PyAutomation's package
108
-
109
- Execute this code where is setup.py file
110
-
111
- ```python
112
- python3 setup.py bdist_wheel
113
- ```
114
-
115
- This create some folders
116
-
117
- - build
118
- - dist
119
- - PyAutomation.egg-info
120
-
121
- ### Install PyAutomation Folder
122
-
123
- Located into "dist" folder
124
-
125
- ```python
126
- pip install dist/PyAutomation-1.0.0-py3-none-any.whl
127
- ```
128
-
129
- After that, you can run mkdocs serve
130
-
131
93
  # Deploy
132
94
 
133
95
  Make the following `.env` file:
134
96
 
135
97
  ```
136
- PORT=5000
98
+ AUTOMATION_PORT=8050
99
+ AUTOMATION_VERSION=1.1.3
100
+ AUTOMATION_OPCUA_SERVER_PORT=53530
101
+ AUTOMATION_LOG_MAX_BYTES=5000 # 10MB en bytes
102
+ AUTOMATION_LOG_BACKUP_COUNT=3
137
103
  ```
138
104
 
139
105
  ## Docker
140
106
 
141
- Export environment variables
142
-
143
- ```
144
- export $(grep -v '^#' .env | xargs)
145
- ```
146
-
147
- Start the app
148
-
149
- ```
150
- sudo docker run -d \
151
- --name PyAutomation \
152
- -p ${PORT}:${PORT}\
153
- -v $(pwd)/temp/db:/app/db \
154
- -v $(pwd)/temp/logs:/app/logs \
155
- -e PORT=${PORT} \
156
- knowai/automation:1.0.0
157
- ```
158
-
159
- ## Docker Compose
160
-
161
107
  If you want to deploy it using docker compose, make the following `docker-compose.yml` file:
162
108
 
163
109
  ```YaMl
164
110
  services:
165
-
166
111
  automation:
167
112
  container_name: "Automation"
168
113
  image: "knowai/automation:${AUTOMATION_VERSION}"
@@ -170,24 +115,22 @@ services:
170
115
  ports:
171
116
  - ${AUTOMATION_PORT}:${AUTOMATION_PORT}
172
117
  volumes:
173
- - automation/db:/app/db
174
- - automation/logs:/app/logs
118
+ - automation_db:/app/db
119
+ - automation_logs:/app/logs
175
120
  environment:
176
- - OPCUA_SERVER_PORT: ${AUTOMATION_OPCUA_SERVER_PORT}
177
- logging:
178
- driver: "json-file"
179
- options:
180
- max-size: "10m"
181
- max-file: "3"
121
+ OPCUA_SERVER_PORT: ${AUTOMATION_OPCUA_SERVER_PORT}
122
+ LOG_MAX_BYTES: ${AUTOMATION_LOG_MAX_BYTES}
123
+ LOG_BACKUP_COUNT: ${AUTOMATION_LOG_BACKUP_COUNT}
182
124
  healthcheck:
183
- test: ["CMD-SHELL", "curl --fail -s -k http://0.0.0.0:${PORT}/api/healthcheck/ || curl --fail -s -k https://0.0.0.0:${PORT}/api/healthcheck/ || exit 1"]
125
+ test: ["CMD", "python", "/app/healthcheck.py"]
184
126
  interval: 15s
185
127
  timeout: 10s
186
128
  retries: 3
187
129
 
188
130
  volumes:
189
- automation/db:
190
- automation/logs:
131
+ automation_db:
132
+ automation_logs:
133
+
191
134
  ```
192
135
 
193
136
  Start the docker compose file
@@ -196,4 +139,4 @@ Start the docker compose file
196
139
  sudo docker-compose --env-file .env up -d
197
140
  ```
198
141
 
199
- Go to http://host:${PORT} to view the config page
142
+ Go to http://host:${AUTOMATION_PORT} to view the config page
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyAutomationIO
3
- Version: 1.1.2
3
+ Version: 1.1.3
4
4
  Summary: A python library to develop automation continuous tasks using sync or async concurrent threads
5
5
  Home-page: https://github.com/know-ai/PyAutomation
6
6
  Author: KnowAI
@@ -85,84 +85,29 @@ pip install -r requirements.txt
85
85
 
86
86
  ## Run Config page
87
87
 
88
- ```python
89
- python run.py
90
- ```
91
-
92
- or
93
-
94
88
  ```python
95
89
 
96
90
  ./docker-entrypoint.sh
97
91
  ```
98
92
 
99
- ## Deploy documentation on Development mode With mkautodoc
100
-
101
- ### Install Wheel
102
-
103
- ```python
104
- pip install wheel
105
- ```
106
-
107
- ### Create PyAutomation's package
108
-
109
- Execute this code where is setup.py file
110
-
111
- ```python
112
- python3 setup.py bdist_wheel
113
- ```
114
-
115
- This create some folders
116
-
117
- - build
118
- - dist
119
- - PyAutomation.egg-info
120
-
121
- ### Install PyAutomation Folder
122
-
123
- Located into "dist" folder
124
-
125
- ```python
126
- pip install dist/PyAutomation-1.0.0-py3-none-any.whl
127
- ```
128
-
129
- After that, you can run mkdocs serve
130
-
131
93
  # Deploy
132
94
 
133
95
  Make the following `.env` file:
134
96
 
135
97
  ```
136
- PORT=5000
98
+ AUTOMATION_PORT=8050
99
+ AUTOMATION_VERSION=1.1.3
100
+ AUTOMATION_OPCUA_SERVER_PORT=53530
101
+ AUTOMATION_LOG_MAX_BYTES=5000 # 10MB en bytes
102
+ AUTOMATION_LOG_BACKUP_COUNT=3
137
103
  ```
138
104
 
139
105
  ## Docker
140
106
 
141
- Export environment variables
142
-
143
- ```
144
- export $(grep -v '^#' .env | xargs)
145
- ```
146
-
147
- Start the app
148
-
149
- ```
150
- sudo docker run -d \
151
- --name PyAutomation \
152
- -p ${PORT}:${PORT}\
153
- -v $(pwd)/temp/db:/app/db \
154
- -v $(pwd)/temp/logs:/app/logs \
155
- -e PORT=${PORT} \
156
- knowai/automation:1.0.0
157
- ```
158
-
159
- ## Docker Compose
160
-
161
107
  If you want to deploy it using docker compose, make the following `docker-compose.yml` file:
162
108
 
163
109
  ```YaMl
164
110
  services:
165
-
166
111
  automation:
167
112
  container_name: "Automation"
168
113
  image: "knowai/automation:${AUTOMATION_VERSION}"
@@ -170,24 +115,22 @@ services:
170
115
  ports:
171
116
  - ${AUTOMATION_PORT}:${AUTOMATION_PORT}
172
117
  volumes:
173
- - automation/db:/app/db
174
- - automation/logs:/app/logs
118
+ - automation_db:/app/db
119
+ - automation_logs:/app/logs
175
120
  environment:
176
- - OPCUA_SERVER_PORT: ${AUTOMATION_OPCUA_SERVER_PORT}
177
- logging:
178
- driver: "json-file"
179
- options:
180
- max-size: "10m"
181
- max-file: "3"
121
+ OPCUA_SERVER_PORT: ${AUTOMATION_OPCUA_SERVER_PORT}
122
+ LOG_MAX_BYTES: ${AUTOMATION_LOG_MAX_BYTES}
123
+ LOG_BACKUP_COUNT: ${AUTOMATION_LOG_BACKUP_COUNT}
182
124
  healthcheck:
183
- test: ["CMD-SHELL", "curl --fail -s -k http://0.0.0.0:${PORT}/api/healthcheck/ || curl --fail -s -k https://0.0.0.0:${PORT}/api/healthcheck/ || exit 1"]
125
+ test: ["CMD", "python", "/app/healthcheck.py"]
184
126
  interval: 15s
185
127
  timeout: 10s
186
128
  retries: 3
187
129
 
188
130
  volumes:
189
- automation/db:
190
- automation/logs:
131
+ automation_db:
132
+ automation_logs:
133
+
191
134
  ```
192
135
 
193
136
  Start the docker compose file
@@ -196,4 +139,4 @@ Start the docker compose file
196
139
  sudo docker-compose --env-file .env up -d
197
140
  ```
198
141
 
199
- Go to http://host:${PORT} to view the config page
142
+ Go to http://host:${AUTOMATION_PORT} to view the config page
@@ -120,7 +120,6 @@ automation/tests/test_unit.py
120
120
  automation/tests/test_user.py
121
121
  automation/utils/__init__.py
122
122
  automation/utils/decorators.py
123
- automation/utils/npw.py
124
123
  automation/utils/observer.py
125
124
  automation/utils/units.py
126
125
  automation/variables/__init__.py
@@ -32,84 +32,29 @@ pip install -r requirements.txt
32
32
 
33
33
  ## Run Config page
34
34
 
35
- ```python
36
- python run.py
37
- ```
38
-
39
- or
40
-
41
35
  ```python
42
36
 
43
37
  ./docker-entrypoint.sh
44
38
  ```
45
39
 
46
- ## Deploy documentation on Development mode With mkautodoc
47
-
48
- ### Install Wheel
49
-
50
- ```python
51
- pip install wheel
52
- ```
53
-
54
- ### Create PyAutomation's package
55
-
56
- Execute this code where is setup.py file
57
-
58
- ```python
59
- python3 setup.py bdist_wheel
60
- ```
61
-
62
- This create some folders
63
-
64
- - build
65
- - dist
66
- - PyAutomation.egg-info
67
-
68
- ### Install PyAutomation Folder
69
-
70
- Located into "dist" folder
71
-
72
- ```python
73
- pip install dist/PyAutomation-1.0.0-py3-none-any.whl
74
- ```
75
-
76
- After that, you can run mkdocs serve
77
-
78
40
  # Deploy
79
41
 
80
42
  Make the following `.env` file:
81
43
 
82
44
  ```
83
- PORT=5000
45
+ AUTOMATION_PORT=8050
46
+ AUTOMATION_VERSION=1.1.3
47
+ AUTOMATION_OPCUA_SERVER_PORT=53530
48
+ AUTOMATION_LOG_MAX_BYTES=5000 # 10MB en bytes
49
+ AUTOMATION_LOG_BACKUP_COUNT=3
84
50
  ```
85
51
 
86
52
  ## Docker
87
53
 
88
- Export environment variables
89
-
90
- ```
91
- export $(grep -v '^#' .env | xargs)
92
- ```
93
-
94
- Start the app
95
-
96
- ```
97
- sudo docker run -d \
98
- --name PyAutomation \
99
- -p ${PORT}:${PORT}\
100
- -v $(pwd)/temp/db:/app/db \
101
- -v $(pwd)/temp/logs:/app/logs \
102
- -e PORT=${PORT} \
103
- knowai/automation:1.0.0
104
- ```
105
-
106
- ## Docker Compose
107
-
108
54
  If you want to deploy it using docker compose, make the following `docker-compose.yml` file:
109
55
 
110
56
  ```YaMl
111
57
  services:
112
-
113
58
  automation:
114
59
  container_name: "Automation"
115
60
  image: "knowai/automation:${AUTOMATION_VERSION}"
@@ -117,24 +62,22 @@ services:
117
62
  ports:
118
63
  - ${AUTOMATION_PORT}:${AUTOMATION_PORT}
119
64
  volumes:
120
- - automation/db:/app/db
121
- - automation/logs:/app/logs
65
+ - automation_db:/app/db
66
+ - automation_logs:/app/logs
122
67
  environment:
123
- - OPCUA_SERVER_PORT: ${AUTOMATION_OPCUA_SERVER_PORT}
124
- logging:
125
- driver: "json-file"
126
- options:
127
- max-size: "10m"
128
- max-file: "3"
68
+ OPCUA_SERVER_PORT: ${AUTOMATION_OPCUA_SERVER_PORT}
69
+ LOG_MAX_BYTES: ${AUTOMATION_LOG_MAX_BYTES}
70
+ LOG_BACKUP_COUNT: ${AUTOMATION_LOG_BACKUP_COUNT}
129
71
  healthcheck:
130
- test: ["CMD-SHELL", "curl --fail -s -k http://0.0.0.0:${PORT}/api/healthcheck/ || curl --fail -s -k https://0.0.0.0:${PORT}/api/healthcheck/ || exit 1"]
72
+ test: ["CMD", "python", "/app/healthcheck.py"]
131
73
  interval: 15s
132
74
  timeout: 10s
133
75
  retries: 3
134
76
 
135
77
  volumes:
136
- automation/db:
137
- automation/logs:
78
+ automation_db:
79
+ automation_logs:
80
+
138
81
  ```
139
82
 
140
83
  Start the docker compose file
@@ -143,4 +86,4 @@ Start the docker compose file
143
86
  sudo docker-compose --env-file .env up -d
144
87
  ```
145
88
 
146
- Go to http://host:${PORT} to view the config page
89
+ Go to http://host:${AUTOMATION_PORT} to view the config page
@@ -0,0 +1,2 @@
1
+ __version__ = '1.1.3'
2
+