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.
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/PKG-INFO +16 -73
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/PyAutomationIO.egg-info/PKG-INFO +16 -73
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/PyAutomationIO.egg-info/SOURCES.txt +0 -1
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/README.md +15 -72
- pyautomationio-1.1.3/version.py +2 -0
- pyautomationio-1.1.2/automation/utils/npw.py +0 -294
- pyautomationio-1.1.2/version.py +0 -2
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/LICENSE +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/MANIFEST.in +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/PyAutomationIO.egg-info/dependency_links.txt +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/PyAutomationIO.egg-info/requires.txt +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/PyAutomationIO.egg-info/top_level.txt +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/__init__.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/alarms/__init__.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/alarms/states.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/alarms/trigger.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/buffer.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/core.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/dbmodels/__init__.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/dbmodels/alarms.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/dbmodels/core.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/dbmodels/events.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/dbmodels/logs.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/dbmodels/machines.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/dbmodels/opcua.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/dbmodels/opcua_server.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/dbmodels/tags.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/dbmodels/users.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/extensions/__init__.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/extensions/api.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/extensions/cors.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/filter/__init__.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/iad/__init__.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/iad/frozen_data.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/iad/out_of_range.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/iad/outliers.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/logger/__init__.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/logger/alarms.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/logger/core.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/logger/datalogger.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/logger/events.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/logger/logdict.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/logger/logs.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/logger/machines.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/logger/opcua_server.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/logger/users.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/managers/__init__.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/managers/alarms.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/managers/db.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/managers/opcua_client.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/managers/state_machine.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/models.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/__init__.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/alarms/__init__.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/alarms/resources/__init__.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/alarms/resources/alarms.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/alarms/resources/summary.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/events/__init__.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/events/resources/__init__.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/events/resources/events.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/events/resources/logs.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/tags/__init__.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/tags/resources/__init__.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/tags/resources/tags.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/users/__init__.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/users/resources/__init__.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/users/resources/models/__init__.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/users/resources/models/roles.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/users/resources/models/users.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/users/resources/roles.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/users/resources/users.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/users/roles.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/modules/users/users.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/opcua/__init__.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/opcua/models.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/opcua/subscription.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/__init__.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/alarms.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/alarms_history.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/assets/styles.css +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/callbacks/__init__.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/callbacks/alarms.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/callbacks/alarms_summary.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/callbacks/db.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/callbacks/filter.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/callbacks/machines.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/callbacks/machines_detailed.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/callbacks/opcua.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/callbacks/opcua_server.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/callbacks/tags.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/callbacks/trends.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/communications.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/components/__init__.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/components/alarms.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/components/alarms_summary.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/components/database.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/components/gaussian_filter.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/components/machines.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/components/opcua.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/components/opcua_server.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/components/tags.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/components/trends.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/database.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/filter.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/machines.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/machines_detailed.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/main.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/opcua_server.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/tags.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/pages/trends.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/singleton.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/state_machine.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/tags/__init__.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/tags/cvt.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/tags/filter.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/tags/tag.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/tests/__init__.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/tests/test_alarms.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/tests/test_core.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/tests/test_unit.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/tests/test_user.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/utils/__init__.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/utils/decorators.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/utils/observer.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/utils/units.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/variables/__init__.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/variables/adimentional.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/variables/current.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/variables/density.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/variables/eng_time.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/variables/force.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/variables/length.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/variables/mass.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/variables/mass_flow.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/variables/percentage.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/variables/power.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/variables/pressure.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/variables/temperature.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/variables/volume.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/variables/volumetric_flow.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/workers/__init__.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/workers/logger.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/workers/state_machine.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/automation/workers/worker.py +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/requirements.txt +0 -0
- {pyautomationio-1.1.2 → pyautomationio-1.1.3}/setup.cfg +0 -0
- {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.
|
|
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
|
-
|
|
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
|
-
-
|
|
174
|
-
-
|
|
118
|
+
- automation_db:/app/db
|
|
119
|
+
- automation_logs:/app/logs
|
|
175
120
|
environment:
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
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
|
|
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
|
-
|
|
190
|
-
|
|
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:${
|
|
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.
|
|
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
|
-
|
|
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
|
-
-
|
|
174
|
-
-
|
|
118
|
+
- automation_db:/app/db
|
|
119
|
+
- automation_logs:/app/logs
|
|
175
120
|
environment:
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
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
|
|
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
|
-
|
|
190
|
-
|
|
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:${
|
|
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
|
-
|
|
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
|
-
-
|
|
121
|
-
-
|
|
65
|
+
- automation_db:/app/db
|
|
66
|
+
- automation_logs:/app/logs
|
|
122
67
|
environment:
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
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
|
|
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
|
-
|
|
137
|
-
|
|
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:${
|
|
89
|
+
Go to http://host:${AUTOMATION_PORT} to view the config page
|