fix: update import paths after core library reorganization
All checks were successful
Cross-Node Transaction Testing / transaction-test (push) Successful in 3s
Deploy to Testnet / deploy-testnet (push) Successful in 1m12s
Multi-Node Stress Testing / stress-test (push) Successful in 2s
Node Failover Simulation / failover-test (push) Successful in 2s

- Fix aitbc/__init__.py imports to use utils subpackage
- Update lazy exports to reference new subpackage paths
- Fix middleware import paths
- Fix utils subpackage internal imports to use parent level
This commit is contained in:
aitbc
2026-05-09 17:34:06 +02:00
parent f6f6a41191
commit 5ba6489931
5 changed files with 11 additions and 11 deletions

View File

@@ -25,7 +25,7 @@ from .constants import (
PACKAGE_VERSION,
REPO_DIR,
)
from .env import (
from .utils.env import (
get_bool_env_var,
get_env_var,
get_float_env_var,
@@ -52,7 +52,7 @@ from .middleware import (
RequestValidationMiddleware,
ErrorHandlerMiddleware,
)
from .paths import (
from .utils.paths import (
ensure_dir,
ensure_file_dir,
get_blockchain_data_path,
@@ -82,7 +82,7 @@ _LAZY_EXPORTS: dict[str, tuple[str, str]] = {
"DatabaseService": ("database_service", "DatabaseService"),
"SQLiteDatabaseService": ("database_service", "SQLiteDatabaseService"),
"DatabaseServiceFactory": ("database_service", "DatabaseServiceFactory"),
"AsyncAITBCHTTPClient": ("http_client", "AsyncAITBCHTTPClient"),
"AsyncAITBCHTTPClient": ("network.http_client", "AsyncAITBCHTTPClient"),
"BaseAITBCConfig": ("config", "BaseAITBCConfig"),
"AITBCConfig": ("config", "AITBCConfig"),
"retry": ("decorators", "retry"),
@@ -98,9 +98,9 @@ _LAZY_EXPORTS: dict[str, tuple[str, str]] = {
"validate_email": ("validation", "validate_email"),
"validate_non_empty": ("validation", "validate_non_empty"),
"validate_positive_number": ("validation", "validate_positive_number"),
"validate_range": ("validation", "validate_range"),
"validate_chain_id": ("validation", "validate_chain_id"),
"validate_uuid": ("validation", "validate_uuid"),
"validate_range": ("utils.validation", "validate_range"),
"validate_chain_id": ("utils.validation", "validate_chain_id"),
"validate_uuid": ("utils.validation", "validate_uuid"),
"run_sync": ("async_helpers", "run_sync"),
"gather_with_concurrency": ("async_helpers", "gather_with_concurrency"),
"run_with_timeout": ("async_helpers", "run_with_timeout"),

View File

@@ -5,7 +5,7 @@ Centralized utilities for loading and managing environment variables
import os
from typing import Optional
from .exceptions import ConfigurationError
from ..exceptions import ConfigurationError
def get_env_var(key: str, default: str = "") -> str:

View File

@@ -6,7 +6,7 @@ Centralized JSON loading, saving, and manipulation
import json
from pathlib import Path
from typing import Dict, Any, List, Optional
from .exceptions import ConfigurationError
from ..exceptions import ConfigurationError
def load_json(path: Path) -> Dict[str, Any]:

View File

@@ -4,8 +4,8 @@ Centralized path resolution and directory management
"""
from pathlib import Path
from .constants import DATA_DIR, CONFIG_DIR, LOG_DIR, REPO_DIR
from .exceptions import ConfigurationError
from ..constants import DATA_DIR, CONFIG_DIR, LOG_DIR, REPO_DIR
from ..exceptions import ConfigurationError
def get_data_path(subpath: str = "") -> Path:

View File

@@ -5,7 +5,7 @@ Common validators for AITBC applications
import re
from typing import Any, Optional
from .exceptions import ValidationError
from ..exceptions import ValidationError
def validate_address(address: str) -> bool: