refactor: merge CLI requirements to central requirements
Some checks failed
CLI Tests / test-cli (push) Successful in 1m24s
Documentation Validation / validate-docs (push) Has been cancelled
Integration Tests / test-service-integration (push) Successful in 1m9s
Python Tests / test-python (push) Successful in 2m11s
Security Scanning / security-scan (push) Successful in 2m15s
Some checks failed
CLI Tests / test-cli (push) Successful in 1m24s
Documentation Validation / validate-docs (push) Has been cancelled
Integration Tests / test-service-integration (push) Successful in 1m9s
Python Tests / test-python (push) Successful in 2m11s
Security Scanning / security-scan (push) Successful in 2m15s
- Remove duplicate /opt/aitbc/cli/requirements.txt file - All CLI dependencies already covered in central requirements.txt - Central requirements has newer versions of all CLI dependencies - Update workflow documentation to reflect central venv usage - Update environment configuration to use /etc/aitbc/.env - Remove duplicate dependency management This consolidates all Python dependencies in the central requirements.txt and eliminates the need for separate CLI requirements management.
This commit is contained in:
@@ -37,7 +37,7 @@ cp /opt/aitbc/.env /etc/aitbc/.env.backup 2>/dev/null || true
|
|||||||
mv /opt/aitbc/.env /etc/aitbc/.env 2>/dev/null || true
|
mv /opt/aitbc/.env /etc/aitbc/.env 2>/dev/null || true
|
||||||
|
|
||||||
# 4. Setup AITBC CLI tool
|
# 4. Setup AITBC CLI tool
|
||||||
# Use central virtual environment
|
# Use central virtual environment (dependencies already installed)
|
||||||
source /opt/aitbc/venv/bin/activate
|
source /opt/aitbc/venv/bin/activate
|
||||||
pip install -e /opt/aitbc/cli/ 2>/dev/null || true
|
pip install -e /opt/aitbc/cli/ 2>/dev/null || true
|
||||||
echo 'alias aitbc="source /opt/aitbc/venv/bin/activate && aitbc"' >> ~/.bashrc
|
echo 'alias aitbc="source /opt/aitbc/venv/bin/activate && aitbc"' >> ~/.bashrc
|
||||||
@@ -59,8 +59,8 @@ ls -la /etc/aitbc/blockchain.env
|
|||||||
## Directory Structure
|
## Directory Structure
|
||||||
|
|
||||||
- `/opt/aitbc/venv` - Central Python virtual environment
|
- `/opt/aitbc/venv` - Central Python virtual environment
|
||||||
- `/opt/aitbc/requirements.txt` - Python dependencies
|
- `/opt/aitbc/requirements.txt` - Python dependencies (includes CLI dependencies)
|
||||||
- `/etc/aitbc/blockchain.env` - Central environment configuration
|
- `/etc/aitbc/.env` - Central environment configuration
|
||||||
- `/var/lib/aitbc/data` - Blockchain database files
|
- `/var/lib/aitbc/data` - Blockchain database files
|
||||||
- `/var/lib/aitbc/keystore` - Wallet credentials
|
- `/var/lib/aitbc/keystore` - Wallet credentials
|
||||||
- `/var/log/aitbc/` - Service logs
|
- `/var/log/aitbc/` - Service logs
|
||||||
@@ -69,7 +69,7 @@ ls -la /etc/aitbc/blockchain.env
|
|||||||
|
|
||||||
### Environment Configuration
|
### Environment Configuration
|
||||||
|
|
||||||
The workflow uses the central `/etc/aitbc/blockchain.env` file as the configuration for both nodes:
|
The workflow uses the central `/etc/aitbc/.env` file as the configuration for both nodes:
|
||||||
|
|
||||||
- **Base Configuration**: The central config contains all default settings
|
- **Base Configuration**: The central config contains all default settings
|
||||||
- **Node-Specific Adaptation**: Each node adapts the config for its role (genesis vs follower)
|
- **Node-Specific Adaptation**: Each node adapts the config for its role (genesis vs follower)
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class ProposerConfig(BaseModel):
|
|||||||
max_txs_per_block: int
|
max_txs_per_block: int
|
||||||
|
|
||||||
class ChainSettings(BaseSettings):
|
class ChainSettings(BaseSettings):
|
||||||
model_config = SettingsConfigDict(env_file="/opt/aitbc/.env", env_file_encoding="utf-8", case_sensitive=False, extra="ignore")
|
model_config = SettingsConfigDict(env_file="/etc/aitbc/.env", env_file_encoding="utf-8", case_sensitive=False, extra="ignore")
|
||||||
|
|
||||||
chain_id: str = ""
|
chain_id: str = ""
|
||||||
supported_chains: str = "ait-devnet" # Comma-separated list of supported chain IDs
|
supported_chains: str = "ait-devnet" # Comma-separated list of supported chain IDs
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
click>=8.0.0
|
|
||||||
requests>=2.25.0
|
|
||||||
pydantic>=2.0.0
|
|
||||||
cryptography>=3.4.0
|
|
||||||
Reference in New Issue
Block a user