diff --git a/MQTT.py b/MQTT.py index ef156a1..f28d6d3 100644 --- a/MQTT.py +++ b/MQTT.py @@ -4,7 +4,7 @@ import time import paho.mqtt.client as mqtt -from src.tool import push_stream, close_stream, update, exec_sh, get_record, get_list_record, get_status +from tool import push_stream, close_stream, update, exec_sh, get_record, get_list_record, get_status def on_connect(client, userdata, flags, rc): diff --git a/src/api.py b/api.py similarity index 100% rename from src/api.py rename to api.py diff --git a/src/create_db.py b/create_db.py similarity index 100% rename from src/create_db.py rename to create_db.py diff --git a/src/data_upload.py b/data_upload.py similarity index 100% rename from src/data_upload.py rename to data_upload.py diff --git a/src/__init__.py b/db/__init__.py old mode 100644 new mode 100755 similarity index 100% rename from src/__init__.py rename to db/__init__.py diff --git a/src/db/base.py b/db/base.py similarity index 100% rename from src/db/base.py rename to db/base.py diff --git a/src/db/__init__.py b/db/models/__init__.py similarity index 100% rename from src/db/__init__.py rename to db/models/__init__.py diff --git a/src/db/models/base.py b/db/models/base.py similarity index 100% rename from src/db/models/base.py rename to db/models/base.py diff --git a/src/db/models/lot_data_model.py b/db/models/lot_data_model.py similarity index 99% rename from src/db/models/lot_data_model.py rename to db/models/lot_data_model.py index 05834a5..e189534 100755 --- a/src/db/models/lot_data_model.py +++ b/db/models/lot_data_model.py @@ -1,7 +1,7 @@ from pydantic import BaseModel, Field from sqlalchemy import * -from src.db.base import Base +from db.base import Base class LOT_DATA(BaseModel): diff --git a/src/db/repository/__init__.py b/db/repository/__init__.py similarity index 100% rename from src/db/repository/__init__.py rename to db/repository/__init__.py diff --git a/src/db/repository/lot_data_repository.py b/db/repository/lot_data_repository.py similarity index 92% rename from src/db/repository/lot_data_repository.py rename to db/repository/lot_data_repository.py index 33d61ed..2647c6b 100755 --- a/src/db/repository/lot_data_repository.py +++ b/db/repository/lot_data_repository.py @@ -1,5 +1,5 @@ -from src.db.models.lot_data_model import LOT_DATA_MODEL, LOT_DATA -from src.db.session import with_session +from db.models.lot_data_model import LOT_DATA_MODEL, LOT_DATA +from db.session import with_session @with_session diff --git a/src/db/session.py b/db/session.py similarity index 96% rename from src/db/session.py rename to db/session.py index 591fc2d..ad7f161 100755 --- a/src/db/session.py +++ b/db/session.py @@ -2,7 +2,7 @@ from functools import wraps from contextlib import contextmanager from sqlalchemy.orm import Session -from src.db.base import SessionLocal +from db.base import SessionLocal @contextmanager diff --git a/src/sensor_to_local.py b/sensor_to_local.py similarity index 100% rename from src/sensor_to_local.py rename to sensor_to_local.py diff --git a/src/sensor_to_server.py b/sensor_to_server.py similarity index 100% rename from src/sensor_to_server.py rename to sensor_to_server.py diff --git a/src/db/models/__init__.py b/src/db/models/__init__.py deleted file mode 100755 index e69de29..0000000 diff --git a/src/tool.py b/tool.py similarity index 100% rename from src/tool.py rename to tool.py