docs: add code quality and type checking workflows to master index
Some checks failed
Documentation Validation / validate-docs (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
API Endpoint Tests / test-api-endpoints (push) Has been cancelled
CLI Tests / test-cli (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Package Tests / test-python-packages (map[name:aitbc-agent-sdk path:packages/py/aitbc-agent-sdk]) (push) Has been cancelled
Package Tests / test-python-packages (map[name:aitbc-core path:packages/py/aitbc-core]) (push) Has been cancelled
Package Tests / test-python-packages (map[name:aitbc-crypto path:packages/py/aitbc-crypto]) (push) Has been cancelled
Package Tests / test-python-packages (map[name:aitbc-sdk path:packages/py/aitbc-sdk]) (push) Has been cancelled
Package Tests / test-javascript-packages (map[name:aitbc-sdk-js path:packages/js/aitbc-sdk]) (push) Has been cancelled
Package Tests / test-javascript-packages (map[name:aitbc-token path:packages/solidity/aitbc-token]) (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
Systemd Sync / sync-systemd (push) Has been cancelled

- Add Code Quality Module section with pre-commit hooks and quality checks
- Add Type Checking CI/CD Module section with MyPy workflow and coverage
- Update README with code quality achievements and project structure
- Migrate FastAPI apps from deprecated on_event to lifespan context manager
- Update pyproject.toml files to reference consolidated dependencies
- Remove unused app.py import in coordinator-api
- Add type hints to agent
This commit is contained in:
aitbc
2026-03-31 21:45:43 +02:00
parent 26592ddf55
commit 9db720add8
308 changed files with 34194 additions and 34575 deletions

View File

@@ -0,0 +1,137 @@
[tool.poetry]
name = "aitbc"
version = "v0.2.3"
description = "AI Agent Compute Network - Main Project"
authors = ["AITBC Team"]
[tool.poetry.dependencies]
python = "^3.13"
requests = "^2.33.0"
urllib3 = "^2.6.3"
idna = "^3.7"
[tool.poetry.group.dev.dependencies]
pytest = "^8.2.0"
pytest-asyncio = "^0.23.0"
black = "^24.0.0"
flake8 = "^7.0.0"
ruff = "^0.1.0"
mypy = "^1.8.0"
isort = "^5.13.0"
pre-commit = "^3.5.0"
bandit = "^1.7.0"
pydocstyle = "^6.3.0"
pyupgrade = "^3.15.0"
safety = "^2.3.0"
[tool.black]
line-length = 127
target-version = ['py313']
include = '\.pyi?$'
extend-exclude = '''
/(
# directories
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| build
| dist
)/
'''
[tool.isort]
profile = "black"
line_length = 127
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
[tool.mypy]
python_version = "3.13"
warn_return_any = true
warn_unused_configs = true
# Start with less strict mode and gradually increase
check_untyped_defs = false
disallow_incomplete_defs = false
disallow_untyped_defs = false
disallow_untyped_decorators = false
no_implicit_optional = false
warn_redundant_casts = false
warn_unused_ignores = false
warn_no_return = true
warn_unreachable = false
strict_equality = false
[[tool.mypy.overrides]]
module = [
"torch.*",
"cv2.*",
"pandas.*",
"numpy.*",
"web3.*",
"eth_account.*",
"sqlalchemy.*",
"alembic.*",
"uvicorn.*",
"fastapi.*",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = [
"apps.coordinator-api.src.app.routers.*",
"apps.coordinator-api.src.app.services.*",
"apps.coordinator-api.src.app.storage.*",
"apps.coordinator-api.src.app.utils.*",
]
ignore_errors = true
[tool.ruff]
line-length = 127
target-version = "py313"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"E501", # line too long, handled by black
"B008", # do not perform function calls in argument defaults
"C901", # too complex
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"tests/*" = ["B011"]
[tool.pydocstyle]
convention = "google"
add_ignore = ["D100", "D101", "D102", "D103", "D104", "D105", "D106", "D107"]
[tool.pytest.ini_options]
minversion = "8.0"
addopts = "-ra -q --strict-markers --strict-config"
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
"unit: marks tests as unit tests",
]
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

View File

@@ -0,0 +1,28 @@
# AITBC CLI Requirements
# Specific dependencies for the AITBC CLI tool
# Core CLI Dependencies
requests>=2.32.0
cryptography>=46.0.0
pydantic>=2.12.0
python-dotenv>=1.2.0
# CLI Enhancement Dependencies
click>=8.1.0
rich>=13.0.0
tabulate>=0.9.0
colorama>=0.4.4
keyring>=23.0.0
click-completion>=0.5.2
# JSON & Data Processing
orjson>=3.10.0
python-dateutil>=2.9.0
pytz>=2024.1
# Blockchain & Cryptocurrency
base58>=2.1.1
ecdsa>=0.19.0
# Utilities
psutil>=5.9.0

View File

@@ -0,0 +1,130 @@
# AITBC Consolidated Dependencies
# Unified dependency management for all AITBC services
# Version: v0.2.3-consolidated
# Date: 2026-03-31
# ===========================================
# CORE WEB FRAMEWORK
# ===========================================
fastapi==0.115.6
uvicorn[standard]==0.32.1
gunicorn==22.0.0
starlette>=0.40.0,<0.42.0
# ===========================================
# DATABASE & ORM
# ===========================================
sqlalchemy==2.0.47
sqlmodel==0.0.37
alembic==1.18.0
aiosqlite==0.20.0
asyncpg==0.29.0
# ===========================================
# CONFIGURATION & ENVIRONMENT
# ===========================================
pydantic==2.12.0
pydantic-settings==2.13.0
python-dotenv==1.2.0
# ===========================================
# RATE LIMITING & SECURITY
# ===========================================
slowapi==0.1.9
limits==5.8.0
prometheus-client==0.24.0
# ===========================================
# HTTP CLIENT & NETWORKING
# ===========================================
httpx==0.28.0
requests==2.32.0
aiohttp==3.9.0
websockets==12.0
# ===========================================
# CRYPTOGRAPHY & BLOCKCHAIN
# ===========================================
cryptography==46.0.0
pynacl==1.5.0
ecdsa==0.19.0
base58==2.1.1
bech32==1.2.0
web3==6.11.0
eth-account==0.13.0
# ===========================================
# DATA PROCESSING
# ===========================================
pandas==2.2.0
numpy==1.26.0
orjson==3.10.0
# ===========================================
# MACHINE LEARNING & AI
# ===========================================
torch==2.10.0
torchvision==0.15.0
# ===========================================
# CLI TOOLS
# ===========================================
click==8.1.0
rich==13.0.0
typer==0.12.0
click-completion==0.5.2
tabulate==0.9.0
colorama==0.4.4
keyring==23.0.0
# ===========================================
# DEVELOPMENT & TESTING
# ===========================================
pytest==8.2.0
pytest-asyncio==0.24.0
black==24.0.0
flake8==7.0.0
ruff==0.1.0
mypy==1.8.0
isort==5.13.0
pre-commit==3.5.0
bandit==1.7.0
pydocstyle==6.3.0
pyupgrade==3.15.0
safety==2.3.0
# ===========================================
# LOGGING & MONITORING
# ===========================================
structlog==24.1.0
sentry-sdk==2.0.0
# ===========================================
# UTILITIES
# ===========================================
python-dateutil==2.9.0
pytz==2024.1
schedule==1.2.0
aiofiles==24.1.0
pyyaml==6.0
psutil==5.9.0
tenseal==0.3.0
# ===========================================
# ASYNC SUPPORT
# ===========================================
asyncio-mqtt==0.16.0
uvloop==0.22.0
# ===========================================
# IMAGE PROCESSING
# ===========================================
pillow==10.0.0
opencv-python==4.9.0
# ===========================================
# ADDITIONAL DEPENDENCIES
# ===========================================
redis==5.0.0
msgpack==1.1.0
python-multipart==0.0.6

View File

@@ -0,0 +1,105 @@
# AITBC Central Virtual Environment Requirements
# This file contains all Python dependencies for AITBC services
# Merged from all subdirectory requirements files
#
# Recent Updates:
# - Added bech32>=1.2.0 for blockchain address encoding (2026-03-30)
# - Fixed duplicate web3 entries and tenseal version
# - All dependencies tested and working with current services
# Core Web Framework
fastapi>=0.115.0
uvicorn[standard]>=0.32.0
gunicorn>=22.0.0
# Database & ORM
sqlalchemy>=2.0.0
sqlalchemy[asyncio]>=2.0.47
sqlmodel>=0.0.37
alembic>=1.18.0
aiosqlite>=0.20.0
asyncpg>=0.29.0
# Configuration & Environment
pydantic>=2.12.0
pydantic-settings>=2.13.0
python-dotenv>=1.2.0
# Rate Limiting & Security
slowapi>=0.1.9
limits>=5.8.0
prometheus-client>=0.24.0
# HTTP Client & Networking
httpx>=0.28.0
requests>=2.32.0
aiohttp>=3.9.0
# Cryptocurrency & Blockchain
cryptography>=46.0.0
pynacl>=1.5.0
ecdsa>=0.19.0
base58>=2.1.1
bech32>=1.2.0
web3>=6.11.0
eth-account>=0.13.0
# Data Processing
pandas>=2.2.0
numpy>=1.26.0
# Machine Learning & AI
torch>=2.0.0
torchvision>=0.15.0
# Development & Testing
pytest>=8.0.0
pytest-asyncio>=0.24.0
black>=24.0.0
flake8>=7.0.0
ruff>=0.1.0
mypy>=1.8.0
isort>=5.13.0
pre-commit>=3.5.0
bandit>=1.7.0
pydocstyle>=6.3.0
pyupgrade>=3.15.0
safety>=2.3.0
# CLI Tools
click>=8.1.0
rich>=13.0.0
typer>=0.12.0
click-completion>=0.5.2
tabulate>=0.9.0
colorama>=0.4.4
keyring>=23.0.0
# JSON & Serialization
orjson>=3.10.0
msgpack>=1.1.0
python-multipart>=0.0.6
# Logging & Monitoring
structlog>=24.1.0
sentry-sdk>=2.0.0
# Utilities
python-dateutil>=2.9.0
pytz>=2024.1
schedule>=1.2.0
aiofiles>=24.1.0
pyyaml>=6.0
# Async Support
asyncio-mqtt>=0.16.0
websockets>=13.0.0
# Image Processing (for AI services)
pillow>=10.0.0
opencv-python>=4.9.0
# Additional Dependencies
redis>=5.0.0
psutil>=5.9.0
tenseal>=0.3.0