# From the trustgraph project root directory
./run_tests.shThis script will:
- Check current imports
- Install all required TrustGraph packages
- Install test dependencies
- Run the VertexAI tests
The most common issue is that TrustGraph packages aren't installed. Here's how to fix it:
./check_imports.py./install_packages.sh./check_imports.pypytest tests/unit/test_text_completion/test_vertexai_processor.py -v- Tests all the imports needed for the tests
- Shows exactly what's missing
- Helps diagnose import issues
- Installs trustgraph-base (required by others)
- Installs trustgraph-cli
- Installs trustgraph-vertexai
- Installs trustgraph-flow
- Uses
pip install -e .for editable installs
- Runs all the above steps in order
- Installs test dependencies
- Runs the VertexAI tests
- Shows clear output at each step
# Install packages in order (base first!)
cd trustgraph-base && pip install -e . && cd ..
cd trustgraph-cli && pip install -e . && cd ..
cd trustgraph-vertexai && pip install -e . && cd ..
cd trustgraph-flow && pip install -e . && cd ..
# Install test dependencies
cd tests && pip install -r requirements.txt && cd ..
# Run tests
pytest tests/unit/test_text_completion/test_vertexai_processor.py -v- "No module named 'trustgraph'" → Run
./install_packages.sh - "No module named 'trustgraph.base'" → Install trustgraph-base first
- "No module named 'trustgraph.model.text_completion.vertexai'" → Install trustgraph-vertexai
- Scripts not executable → Run
chmod +x *.sh - Wrong directory → Make sure you're in the project root (where README.md is)
When working correctly, you should see:
- ✅ All imports successful
- 139 test cases running
- Tests passing (or failing for logical reasons, not import errors)
If you're still having issues:
- Share the output of
./check_imports.py - Share the exact error message
- Confirm you're in the right directory:
/home/mark/work/trustgraph.ai/trustgraph