Validation Guide¶
Understanding the validation process and troubleshooting validation failures.
Running Validation¶
The validation script verifies your provide-workspace setup:
Run this after installation and whenever you suspect environment issues.
What Gets Validated¶
1. Python Version Check¶
What it checks: - Python executable version - Minimum version 3.11
If it fails:
# Check your Python version
python3 --version
# If < 3.11, install newer Python
# See: getting-started/prerequisites.md#python-311
2. Virtual Environment Check¶
What it checks:
- VIRTUAL_ENV environment variable is set
- Virtual environment path points to .venv/
If it fails:
# Activate the environment
source .venv/bin/activate
# Verify activation
echo $VIRTUAL_ENV
# Should show: /path/to/provide-workspace/.venv
3. Package Import Checks¶
Package Import Checks:
โ provide.foundation
โ provide.testkit
โ pyvider.cty
โ pyvider.hcl
โ pyvider.rpcplugin
โ pyvider
โ pyvider.components
โ flavor
โ wrknv
โ plating
โ tofusoup
โ supsrc
What it checks: - Each package can be imported - Basic module loading works - No circular import issues
If it fails:
# Re-run setup to install packages
./scripts/setup.sh
# Verify specific package
python3 -c "import pyvider; print(pyvider.__file__)"
# Check if installed in editable mode
pip list | grep pyvider
# Should show path: /Users/you/provide-workspace/pyvider
4. Environment Configuration Check¶
What it checks:
- wrknv.toml configuration is valid
- Expected sibling directories exist
- No critical environment variables missing
If it fails:
Validation Modes¶
Default Validation (Fast)¶
Runs core checks only (~10 seconds).
Comprehensive Validation¶
Runs all tests across all packages (~5-15 minutes depending on packages).
When to use: Before committing major changes or before releases.
Quiet Mode¶
Minimal output - only shows failures.
When to use: In automation scripts or CI/CD.
Verbose Mode¶
Detailed output showing all checks and subprocess commands.
When to use: Troubleshooting validation failures.
Understanding Exit Codes¶
Exit codes:
0- All checks passed1- Python version check failed2- Virtual environment not active3- Package import failed4- Configuration error5- Other validation error
Common Validation Failures¶
Python Version Too Old¶
Solution:
# Install Python 3.11+
# See: getting-started/prerequisites.md#python-311
# Recreate virtual environment with new Python
rm -rf .venv/
python3.11 -m venv .venv
source .venv/bin/activate
./scripts/setup.sh
Virtual Environment Not Active¶
Solution:
Add to your .bashrc or .zshrc for convenience:
Import Failures¶
Solutions:
# 1. Ensure environment is active
source .venv/bin/activate
# 2. Reinstall packages
./scripts/setup.sh
# 3. Check if repository exists
ls ../provide-foundation/
# 4. If missing, re-bootstrap
./scripts/bootstrap.sh
# 5. Verify installation
pip list | grep foundation
Circular Import¶
Solution:
This indicates a code issue, not a setup issue. Check recent changes in the failing package.
Missing Repositories¶
Solution:
# Re-run bootstrap (idempotent)
./scripts/bootstrap.sh
# Or clone the specific missing repository
cd ..
git clone https://github.com/provide-io/pyvider.git
cd provide-workspace/
./scripts/setup.sh
Manual Validation Steps¶
If the validation script fails and you need to diagnose manually:
Check Python Version¶
Check Virtual Environment¶
which python3
# Should point to: /path/to/provide-workspace/.venv/bin/python3
pip list | head -n 20
# Should show provide-* and pyvider-* packages
Check Package Imports¶
python3 << 'EOF'
import sys
packages = [
'provide.foundation',
'provide.testkit',
'pyvider.cty',
'pyvider.hcl',
'pyvider.rpcplugin',
'pyvider',
'flavor',
'wrknv',
]
for pkg in packages:
try:
__import__(pkg)
print(f'โ {pkg}')
except Exception as e:
print(f'โ {pkg}: {e}')
EOF
Check Editable Installs¶
Check Repository Structure¶
ls ../ | grep -E '(provide|pyvider|flavor|wrknv|plating|tofusoup|supsrc)'
# Should list all ecosystem repositories
Validation in CI/CD¶
For automated environments:
#!/bin/bash
set -e
# Setup
./scripts/bootstrap.sh
./scripts/setup.sh
# Activate in script (can't use source in CI)
export PATH="$(pwd)/.venv/bin:$PATH"
export VIRTUAL_ENV="$(pwd)/.venv"
# Validate
./scripts/validate.sh --quiet
# If validation passes, exit code is 0
See CI/CD Integration for complete CI/CD workflows.
Re-validation¶
You should re-run validation:
- After installation/setup
- After updating Python version
- After adding/removing packages
- After major git pulls across multiple repos
- When experiencing import errors
- Before committing major changes
- Before releases
Next Steps¶
Once validation passes:
- Development Workflow - Start making changes
- Testing Guide - Run tests across packages
- Architecture - Understand the workspace structure