chore: remove configuration files and reorganize production workflow documentation
Some checks failed
CLI Tests / test-cli (push) Failing after 6s
Integration Tests / test-service-integration (push) Successful in 48s
Documentation Validation / validate-docs (push) Successful in 11s
Package Tests / test-python-packages (map[name:aitbc-core path:packages/py/aitbc-core]) (push) Successful in 32s
Package Tests / test-python-packages (map[name:aitbc-agent-sdk path:packages/py/aitbc-agent-sdk]) (push) Successful in 46s
Package Tests / test-python-packages (map[name:aitbc-crypto path:packages/py/aitbc-crypto]) (push) Successful in 24s
Package Tests / test-python-packages (map[name:aitbc-sdk path:packages/py/aitbc-sdk]) (push) Successful in 25s
Package Tests / test-javascript-packages (map[name:aitbc-sdk-js path:packages/js/aitbc-sdk]) (push) Successful in 19s
Python Tests / test-python (push) Failing after 5s
Package Tests / test-javascript-packages (map[name:aitbc-token path:packages/solidity/aitbc-token]) (push) Successful in 1m4s
Security Scanning / security-scan (push) Successful in 31s
Some checks failed
CLI Tests / test-cli (push) Failing after 6s
Integration Tests / test-service-integration (push) Successful in 48s
Documentation Validation / validate-docs (push) Successful in 11s
Package Tests / test-python-packages (map[name:aitbc-core path:packages/py/aitbc-core]) (push) Successful in 32s
Package Tests / test-python-packages (map[name:aitbc-agent-sdk path:packages/py/aitbc-agent-sdk]) (push) Successful in 46s
Package Tests / test-python-packages (map[name:aitbc-crypto path:packages/py/aitbc-crypto]) (push) Successful in 24s
Package Tests / test-python-packages (map[name:aitbc-sdk path:packages/py/aitbc-sdk]) (push) Successful in 25s
Package Tests / test-javascript-packages (map[name:aitbc-sdk-js path:packages/js/aitbc-sdk]) (push) Successful in 19s
Python Tests / test-python (push) Failing after 5s
Package Tests / test-javascript-packages (map[name:aitbc-token path:packages/solidity/aitbc-token]) (push) Successful in 1m4s
Security Scanning / security-scan (push) Successful in 31s
🧹 Configuration Cleanup: • Remove .aitbc.yaml test configuration file • Remove .editorconfig editor settings • Remove .env.example environment template • Remove .gitea-token authentication file • Remove .pre-commit-config.yaml hooks configuration 📋 Workflow Documentation Restructuring: • Replace immediate actions with complete optimization workflow (step 1) • Add production deployment workflow as
This commit is contained in:
58
config/.env.example
Normal file
58
config/.env.example
Normal file
@@ -0,0 +1,58 @@
|
||||
# AITBC Central Environment Example Template
|
||||
# SECURITY NOTICE: Use a secrets manager for production. Do not commit real secrets.
|
||||
# Run: python config/security/environment-audit.py --format text
|
||||
|
||||
# =========================
|
||||
# Blockchain core
|
||||
# =========================
|
||||
chain_id=ait-mainnet
|
||||
supported_chains=ait-mainnet
|
||||
rpc_bind_host=0.0.0.0
|
||||
rpc_bind_port=8006
|
||||
p2p_bind_host=0.0.0.0
|
||||
p2p_bind_port=8005
|
||||
proposer_id=aitbc1genesis
|
||||
proposer_key=changeme_hex_private_key
|
||||
keystore_path=/var/lib/aitbc/keystore
|
||||
keystore_password_file=/var/lib/aitbc/keystore/.password
|
||||
gossip_backend=broadcast
|
||||
gossip_broadcast_url=redis://127.0.0.1:6379
|
||||
db_path=/var/lib/aitbc/data/ait-mainnet/chain.db
|
||||
mint_per_unit=0
|
||||
coordinator_ratio=0.05
|
||||
block_time_seconds=60
|
||||
enable_block_production=true
|
||||
|
||||
# =========================
|
||||
# Coordinator API
|
||||
# =========================
|
||||
APP_ENV=production
|
||||
APP_HOST=127.0.0.1
|
||||
APP_PORT=8011
|
||||
DATABASE__URL=sqlite:///./data/coordinator.db
|
||||
BLOCKCHAIN_RPC_URL=http://127.0.0.1:8026
|
||||
ALLOW_ORIGINS=["http://localhost:8011","http://localhost:8000","http://8026"]
|
||||
JOB_TTL_SECONDS=900
|
||||
HEARTBEAT_INTERVAL_SECONDS=10
|
||||
HEARTBEAT_TIMEOUT_SECONDS=30
|
||||
RATE_LIMIT_REQUESTS=60
|
||||
RATE_LIMIT_WINDOW_SECONDS=60
|
||||
CLIENT_API_KEYS=["client_prod_key_use_real_value"]
|
||||
MINER_API_KEYS=["miner_prod_key_use_real_value"]
|
||||
ADMIN_API_KEYS=["admin_prod_key_use_real_value"]
|
||||
HMAC_SECRET=change_this_to_a_32_byte_random_secret
|
||||
JWT_SECRET=change_this_to_another_32_byte_random_secret
|
||||
|
||||
# =========================
|
||||
# Marketplace Web
|
||||
# =========================
|
||||
VITE_MARKETPLACE_DATA_MODE=live
|
||||
VITE_MARKETPLACE_API=/api
|
||||
VITE_MARKETPLACE_ENABLE_BIDS=true
|
||||
VITE_MARKETPLACE_REQUIRE_AUTH=false
|
||||
|
||||
# =========================
|
||||
# Notes
|
||||
# =========================
|
||||
# For production: move secrets to a secrets manager and reference via secretRef
|
||||
# Validate config: python config/security/environment-audit.py --format text
|
||||
53
config/aitbc-env
Executable file
53
config/aitbc-env
Executable file
@@ -0,0 +1,53 @@
|
||||
#!/bin/bash
|
||||
# AITBC Virtual Environment Wrapper
|
||||
# This script activates the central AITBC virtual environment
|
||||
|
||||
# Check if venv exists
|
||||
if [ ! -d "/opt/aitbc/venv" ]; then
|
||||
echo "❌ AITBC virtual environment not found at /opt/aitbc/venv"
|
||||
echo "Run: sudo python3 -m venv /opt/aitbc/venv && pip install -r /opt/aitbc/requirements.txt"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Activate the virtual environment
|
||||
source /opt/aitbc/venv/bin/activate
|
||||
|
||||
# Set up environment (avoid aitbc-core logging conflict)
|
||||
export PYTHONPATH="/opt/aitbc/packages/py/aitbc-sdk/src:/opt/aitbc/packages/py/aitbc-crypto/src:$PYTHONPATH"
|
||||
export AITBC_VENV="/opt/aitbc/venv"
|
||||
export PATH="/opt/aitbc/venv/bin:$PATH"
|
||||
|
||||
# Show status
|
||||
echo "✅ AITBC Virtual Environment Activated"
|
||||
echo "📍 Python: $(which python)"
|
||||
echo "📍 Pip: $(which pip)"
|
||||
echo "📦 Packages: $(pip list | wc -l) installed"
|
||||
|
||||
# CLI alias function
|
||||
aitbc() {
|
||||
if [ -f "/opt/aitbc/cli/core/main.py" ]; then
|
||||
cd /opt/aitbc/cli
|
||||
PYTHONPATH=/opt/aitbc/cli:/opt/aitbc/packages/py/aitbc-sdk/src:/opt/aitbc/packages/py/aitbc-crypto/src python -m core.main "$@"
|
||||
cd - > /dev/null
|
||||
else
|
||||
echo "❌ AITBC CLI not found at /opt/aitbc/cli/core/main.py"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Execute command or start shell
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "🚀 Starting interactive shell..."
|
||||
echo "💡 Use 'aitbc <command>' for CLI operations"
|
||||
exec bash
|
||||
else
|
||||
echo "🔧 Executing: $@"
|
||||
if [ "$1" = "aitbc" ]; then
|
||||
shift
|
||||
cd /opt/aitbc/cli
|
||||
PYTHONPATH=/opt/aitbc/cli:/opt/aitbc/packages/py/aitbc-sdk/src:/opt/aitbc/packages/py/aitbc-crypto/src python -m core.main "$@"
|
||||
cd - > /dev/null
|
||||
else
|
||||
exec "$@"
|
||||
fi
|
||||
fi
|
||||
2
config/api_keys.txt
Normal file
2
config/api_keys.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
COORDINATOR_API_KEY=aitbc-admin-key-2024-dev
|
||||
BLOCKCHAIN_API_KEY=aitbc-blockchain-key-2024-dev
|
||||
1
config/auth/.gitea-token
Normal file
1
config/auth/.gitea-token
Normal file
@@ -0,0 +1 @@
|
||||
5d21312e467c438bbfcd035f2c65ba815ee326bf
|
||||
3524
config/python/poetry.lock
generated
Normal file
3524
config/python/poetry.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
186
config/python/pyproject.toml
Normal file
186
config/python/pyproject.toml
Normal file
@@ -0,0 +1,186 @@
|
||||
[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.2"
|
||||
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,<4.0"
|
||||
dependencies = [
|
||||
"click==8.3.1",
|
||||
"httpx==0.28.1",
|
||||
"pydantic (>=2.13.0b2,<3.0.0)",
|
||||
"pyyaml==6.0.3",
|
||||
"rich==14.3.3",
|
||||
"keyring==25.7.0",
|
||||
"cryptography==46.0.6",
|
||||
"click-completion==0.5.2",
|
||||
"tabulate==0.10.0",
|
||||
"colorama==0.4.6",
|
||||
"python-dotenv (>=1.2.2,<2.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",
|
||||
"pytest-asyncio (>=1.3.0,<2.0.0)",
|
||||
"ruff (>=0.15.8,<0.16.0)",
|
||||
"sqlalchemy (>=2.0.48,<3.0.0)",
|
||||
"types-requests (>=2.33.0.20260327,<3.0.0.0)",
|
||||
"types-setuptools (>=82.0.0.20260210,<83.0.0.0)",
|
||||
# Blockchain dependencies
|
||||
"web3>=6.11.0",
|
||||
"eth-account>=0.13.0"
|
||||
]
|
||||
classifiers = [
|
||||
"Development Status :: 4 - Beta",
|
||||
"Intended Audience :: Developers",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.13",
|
||||
"Operating System :: OS Independent",
|
||||
"Topic :: Software Development :: Libraries :: Python Modules",
|
||||
"Topic :: System :: Distributed Computing",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
"pytest==9.0.2",
|
||||
"pytest-asyncio>=1.3.0,<2.0.0",
|
||||
"pytest-cov==7.1.0",
|
||||
"pytest-mock==3.15.1",
|
||||
"black==26.3.1",
|
||||
"isort==8.0.1",
|
||||
"ruff>=0.15.8,<0.16.0",
|
||||
"mypy>=1.19.1,<2.0.0",
|
||||
"bandit==1.7.5",
|
||||
"types-requests>=2.33.0.20260327,<3.0.0.0",
|
||||
"types-setuptools>=82.0.0.20260210,<83.0.0.0",
|
||||
"types-PyYAML==6.0.12.20250915",
|
||||
"sqlalchemy[mypy]>=2.0.48,<3.0.0"
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
aitbc = "core.main:main"
|
||||
|
||||
[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"]
|
||||
include = ["core*", "commands*", "auth*", "utils*", "models*", "config*", "completion*"]
|
||||
26
config/python/pytest.ini
Normal file
26
config/python/pytest.ini
Normal file
@@ -0,0 +1,26 @@
|
||||
[tool:pytest]
|
||||
# Fixed: Comprehensive test discovery
|
||||
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
|
||||
|
||||
# Additional options
|
||||
python_files = test_*.py *_test.py
|
||||
python_classes = Test*
|
||||
python_functions = test_*
|
||||
addopts = --verbose --tb=short
|
||||
88
config/python/requirements.txt
Normal file
88
config/python/requirements.txt
Normal file
@@ -0,0 +1,88 @@
|
||||
# AITBC Central Virtual Environment Requirements
|
||||
# This file contains all Python dependencies for AITBC services
|
||||
# Merged from all subdirectory requirements files
|
||||
|
||||
# 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
|
||||
web3>=6.11.0
|
||||
eth-account>=0.13.0
|
||||
|
||||
# Data Processing
|
||||
pandas>=2.2.0
|
||||
numpy>=1.26.0
|
||||
|
||||
# Development & Testing
|
||||
pytest>=8.0.0
|
||||
pytest-asyncio>=0.24.0
|
||||
black>=24.0.0
|
||||
flake8>=7.0.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
|
||||
web3>=6.11.0
|
||||
Reference in New Issue
Block a user