mirror of
https://github.com/flakestorm/flakestorm.git
synced 2026-04-25 00:36:54 +02:00
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:
parent
bc0abff246
commit
cb034b41ff
5 changed files with 61 additions and 0 deletions
15
README.md
15
README.md
|
|
@ -48,10 +48,25 @@ Instead of running one test case, Flakestorm takes a single "Golden Prompt", gen
|
|||
|
||||
### Installation
|
||||
|
||||
**Using a virtual environment (recommended):**
|
||||
|
||||
```bash
|
||||
# Create and activate virtual environment
|
||||
python3 -m venv venv
|
||||
source venv/bin/activate # On Windows: venv\Scripts\activate
|
||||
|
||||
# Install flakestorm
|
||||
pip install flakestorm
|
||||
```
|
||||
|
||||
**Or using pipx (for CLI use only):**
|
||||
|
||||
```bash
|
||||
pipx install flakestorm
|
||||
```
|
||||
|
||||
**Note:** Requires Python 3.10 or higher. On macOS, Python environments are externally managed, so using a virtual environment is required.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
Flakestorm uses [Ollama](https://ollama.ai) for local model inference:
|
||||
|
|
|
|||
|
|
@ -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]"
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue