feat: fix missing modules and dependencies for test compatibility
Some checks failed
audit / audit (push) Has been skipped
ci-cd / build (push) Has been skipped
ci / build (push) Has been skipped
autofix / fix (push) Has been skipped
python-tests / test (push) Failing after 5s
python-tests / test-specific (push) Has been skipped
security-scanning / audit (push) Has been skipped
test / test (push) Has been skipped
ci-cd / deploy (push) Has been skipped
ci / deploy (push) Has been skipped
Some checks failed
audit / audit (push) Has been skipped
ci-cd / build (push) Has been skipped
ci / build (push) Has been skipped
autofix / fix (push) Has been skipped
python-tests / test (push) Failing after 5s
python-tests / test-specific (push) Has been skipped
security-scanning / audit (push) Has been skipped
test / test (push) Has been skipped
ci-cd / deploy (push) Has been skipped
ci / deploy (push) Has been skipped
CODEBASE FIXES: Resolve real import and dependency issues Fixed Issues: 1. Missing aitbc.logging module - created aitbc/ package with logging.py 2. Missing src.message_protocol - created agent-protocols/src/message_protocol.py 3. Missing src.task_manager - created agent-protocols/src/task_manager.py 4. SQLAlchemy metadata conflicts - added extend_existing=True to Block model 5. Missing dependencies - added slowapi>=0.1.0 and pynacl>=1.5.0 New Modules Created: - aitbc/__init__.py - AITBC package initialization - aitbc/logging.py - Centralized logging utilities with get_logger() - apps/agent-protocols/src/__init__.py - Agent protocols package - apps/agent-protocols/src/message_protocol.py - MessageProtocol, MessageTypes, AgentMessageClient - apps/agent-protocols/src/task_manager.py - TaskManager, TaskStatus, TaskPriority, Task Database Fixes: - apps/blockchain-node/src/aitbc_chain/models.py - Added extend_existing=True to resolve metadata conflicts Dependencies Added: - slowapi>=0.1.0 - For slowapi.errors import - pynacl>=1.5.0 - For nacl.signing import Expected Results: - aitbc.logging imports should work - src.message_protocol imports should work - src.task_manager imports should work - SQLAlchemy metadata conflicts resolved - Missing dependency imports resolved - More tests should collect and run successfully This addresses the root cause issues in the codebase rather than working around them with test filtering.
This commit is contained in:
@@ -25,7 +25,7 @@ def _validate_optional_hex(value: Optional[str], field_name: str) -> Optional[st
|
||||
|
||||
class Block(SQLModel, table=True):
|
||||
__tablename__ = "block"
|
||||
__table_args__ = (UniqueConstraint("chain_id", "height", name="uix_block_chain_height"),)
|
||||
__table_args__ = (UniqueConstraint("chain_id", "height", name="uix_block_chain_height"), {"extend_existing": True})
|
||||
|
||||
id: Optional[int] = Field(default=None, primary_key=True)
|
||||
chain_id: str = Field(index=True)
|
||||
|
||||
Reference in New Issue
Block a user