Enhance installation instructions across documentation to emphasize the use of virtual environments for Python. Added details for creating and activating virtual environments in README.md, CONTRIBUTING.md, TEST_SCENARIOS.md, TESTING_GUIDE.md, and USAGE_GUIDE.md. Included pipx installation instructions for CLI use in USAGE_GUIDE.md.

This commit is contained in:
Entropix 2025-12-30 18:02:36 +08:00
parent bc0abff246
commit cb034b41ff
5 changed files with 61 additions and 0 deletions

View file

@ -20,6 +20,11 @@ Please be respectful and constructive in all interactions. We welcome contributo
```bash
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Create virtual environment first
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Then install in editable mode
pip install -e ".[dev]"
```

View file

@ -23,6 +23,11 @@ This guide explains how to run, write, and expand tests for flakestorm. It cover
```bash
# Install dev dependencies
# Create virtual environment first
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Then install
pip install -e ".[dev]"
# Or manually

View file

@ -605,6 +605,11 @@ The mutation engine will generate attacks like:
```bash
# In your agent project directory
# Create virtual environment first
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Then install
pip install flakestorm
# Initialize configuration

View file

@ -115,7 +115,19 @@ ollama run qwen2.5-coder:7b "Hello, world!"
### Step 3: Install flakestorm
**Important:** On macOS (and some Linux distributions), Python environments are externally managed. You should use a virtual environment:
```bash
# Create a virtual environment
python3 -m venv venv
# Activate it (macOS/Linux)
source venv/bin/activate
# Activate it (Windows)
# venv\Scripts\activate
# Now install flakestorm
# From PyPI (when published)
pip install flakestorm
@ -125,12 +137,31 @@ cd flakestorm
pip install -e ".[dev]"
```
**Alternative: Using pipx (for CLI applications)**
If you only want to use flakestorm as a CLI tool (not develop it), you can use `pipx`:
```bash
# Install pipx (if not already installed)
brew install pipx # macOS
# Or: python3 -m pip install --user pipx
# Install flakestorm
pipx install flakestorm
```
**Note:** Make sure you're using Python 3.10+. You can verify with:
```bash
python3 --version # Should be 3.10 or higher
```
### Step 4: (Optional) Install Rust Extension
For 80x+ performance improvement on scoring:
```bash
cd rust
# Make sure virtual environment is activated
pip install maturin
maturin build --release
pip install ../target/wheels/*.whl