SIENTIAPDE-1318

Refactor project structure and update configurations

- Deleted the empty `__init__.py` file to clean up the project structure.
- Renamed the project from "laborious" to "ingestor" in `pyproject.toml`, updating the description accordingly.
- Improved type hints and conditional checks in the `Ingestor`, `DataManager`, `IngestorManager`, and `OpcManager` classes for better code clarity and type safety.
- Enhanced error handling and assertions in various methods to ensure robustness.
- Updated unit tests to reflect changes in class names and error handling improvements.
This commit is contained in:
vitor-aignosi
2025-10-17 14:54:39 -03:00
parent e2462af31c
commit e19b57d4b1
11 changed files with 73 additions and 65 deletions

View File

@@ -154,7 +154,7 @@ class ResourceManager(BaseActivity):
)
raise
def get(self, key: str) -> dict:
def get(self, key: str) -> dict | None:
"""
Retrieve a value from Redis by its key and return it as a dictionary.
@@ -176,7 +176,7 @@ class ResourceManager(BaseActivity):
history = self._execute_redis_op('get', self.redis.get, key)
return json.loads(history) if history else None
def get_tag_slot(self, id: str) -> dict:
def get_tag_slot(self, tag_id: str) -> dict | None:
"""
Retrieve the tag slot information for a given ID.
@@ -194,7 +194,7 @@ class ResourceManager(BaseActivity):
and delegates to the get() method for the actual Redis operation.
"""
return self.get(f'slot:opc_tags:{id}')
return self.get(f'slot:opc_tags:{tag_id}')
def ingestor_heartbeat(self) -> None:
"""