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.
187 lines
4.7 KiB
TOML
187 lines
4.7 KiB
TOML
[tool.pytest.ini_options]
|
|
# Test discovery
|
|
python_files = ["test_*.py", "*_test.py"]
|
|
python_classes = ["Test*"]
|
|
python_functions = ["test_*"]
|
|
|
|
# Cache directory - prevent root level cache
|
|
cache_dir = "dev/cache/.pytest_cache"
|
|
|
|
# Test paths to run - include all test directories across the project
|
|
testpaths = [
|
|
"tests",
|
|
"apps/agent-protocols/tests",
|
|
"apps/ai-engine/tests",
|
|
"apps/analytics-platform/tests",
|
|
"apps/blockchain-node/tests",
|
|
"apps/coordinator-api/tests",
|
|
"apps/pool-hub/tests",
|
|
"apps/predictive-intelligence/tests",
|
|
"apps/wallet/tests",
|
|
"apps/explorer-web/tests",
|
|
"apps/wallet-daemon/tests",
|
|
"apps/zk-circuits/test",
|
|
"cli/tests",
|
|
"contracts/test",
|
|
"packages/py/aitbc-crypto/tests",
|
|
"packages/py/aitbc-sdk/tests",
|
|
"packages/solidity/aitbc-token/test",
|
|
"scripts/test"
|
|
]
|
|
|
|
# Python path for imports
|
|
pythonpath = [
|
|
".",
|
|
"packages/py/aitbc-crypto/src",
|
|
"packages/py/aitbc-crypto/tests",
|
|
"packages/py/aitbc-sdk/src",
|
|
"packages/py/aitbc-sdk/tests",
|
|
"apps/coordinator-api/src",
|
|
"apps/coordinator-api/tests",
|
|
"apps/wallet-daemon/src",
|
|
"apps/wallet-daemon/tests",
|
|
"apps/blockchain-node/src",
|
|
"apps/blockchain-node/tests",
|
|
"apps/pool-hub/src",
|
|
"apps/pool-hub/tests",
|
|
"apps/explorer-web/src",
|
|
"apps/explorer-web/tests",
|
|
"cli",
|
|
"cli/tests"
|
|
]
|
|
|
|
# Additional options for local testing
|
|
addopts = [
|
|
"--verbose",
|
|
"--tb=short",
|
|
"--strict-markers",
|
|
"--disable-warnings",
|
|
"-ra"
|
|
]
|
|
|
|
# Custom markers
|
|
markers = [
|
|
"unit: Unit tests (fast, isolated)",
|
|
"integration: Integration tests (may require external services)",
|
|
"slow: Slow running tests",
|
|
"cli: CLI command tests",
|
|
"api: API endpoint tests",
|
|
"blockchain: Blockchain-related tests",
|
|
"crypto: Cryptography tests",
|
|
"contracts: Smart contract tests",
|
|
"e2e: End-to-end tests (full system)",
|
|
"performance: Performance tests (measure speed/memory)",
|
|
"security: Security tests (vulnerability scanning)",
|
|
"gpu: Tests requiring GPU resources",
|
|
"confidential: Tests for confidential transactions",
|
|
"multitenant: Multi-tenancy specific tests"
|
|
]
|
|
|
|
# Environment variables for tests
|
|
env = [
|
|
"AUDIT_LOG_DIR=/tmp/aitbc-audit",
|
|
"DATABASE_URL=sqlite:///./test_coordinator.db",
|
|
"TEST_MODE=true",
|
|
"SQLITE_DATABASE=sqlite:///./test_coordinator.db"
|
|
]
|
|
|
|
# Warnings
|
|
filterwarnings = [
|
|
"ignore::UserWarning",
|
|
"ignore::DeprecationWarning",
|
|
"ignore::PendingDeprecationWarning",
|
|
"ignore::pytest.PytestUnknownMarkWarning",
|
|
"ignore::pydantic.PydanticDeprecatedSince20",
|
|
"ignore::sqlalchemy.exc.SADeprecationWarning"
|
|
]
|
|
|
|
# Asyncio configuration
|
|
asyncio_default_fixture_loop_scope = "function"
|
|
|
|
# Import mode
|
|
import_mode = "append"
|
|
|
|
[project]
|
|
name = "aitbc-cli"
|
|
version = "0.2.0"
|
|
description = "AITBC Command Line Interface Tools"
|
|
authors = [
|
|
{name = "AITBC Team", email = "team@aitbc.net"}
|
|
]
|
|
readme = "cli/README.md"
|
|
license = "MIT"
|
|
requires-python = ">=3.13.5"
|
|
dependencies = [
|
|
"click==8.3.1",
|
|
"httpx==0.28.1",
|
|
"pydantic==2.12.5",
|
|
"pyyaml==6.0.3",
|
|
"rich==14.3.3",
|
|
"keyring==25.7.0",
|
|
"cryptography==46.0.5",
|
|
"click-completion==0.5.2",
|
|
"tabulate==0.10.0",
|
|
"colorama==0.4.6",
|
|
"python-dotenv==1.0.0",
|
|
"asyncpg==0.31.0",
|
|
# Dependencies for service module imports (coordinator-api services)
|
|
"numpy>=1.26.0",
|
|
"pandas>=2.0.0",
|
|
"aiohttp>=3.9.0",
|
|
"fastapi>=0.111.0",
|
|
"uvicorn[standard]>=0.30.0",
|
|
"slowapi>=0.1.0",
|
|
"pynacl>=1.5.0"
|
|
]
|
|
classifiers = [
|
|
"Development Status :: 4 - Beta",
|
|
"Intended Audience :: Developers",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.13.5",
|
|
"Operating System :: OS Independent",
|
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
"Topic :: System :: Distributed Computing",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"pytest==9.0.2",
|
|
"pytest-asyncio==0.21.1",
|
|
"pytest-cov==7.1.0",
|
|
"pytest-mock==3.15.1",
|
|
"black==26.3.1",
|
|
"isort==8.0.1",
|
|
"ruff==0.15.7",
|
|
"mypy>=1.19.1,<2.0.0",
|
|
"bandit==1.7.5",
|
|
"types-requests==2.31.0",
|
|
"types-setuptools==69.0.0",
|
|
"types-PyYAML==6.0.12.20250915",
|
|
"sqlalchemy[mypy]==2.0.25"
|
|
]
|
|
|
|
[project.scripts]
|
|
aitbc = "aitbc_cli.main:cli"
|
|
|
|
[project.urls]
|
|
Homepage = "https://aitbc.net"
|
|
Repository = "https://github.com/aitbc/aitbc"
|
|
Documentation = "https://docs.aitbc.net"
|
|
|
|
[build-system]
|
|
requires = ["setuptools>=61.0", "wheel"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[tool.setuptools.packages.find]
|
|
where = ["cli", "apps/coordinator-api"]
|
|
include = ["aitbc_cli*", "aitbc*"]
|
|
|
|
[tool.setuptools.package-dir]
|
|
"aitbc_cli" = "cli/aitbc_cli"
|
|
"aitbc" = "apps/coordinator-api/aitbc"
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"mypy (>=1.19.1,<2.0.0)"
|
|
]
|