-
Notifications
You must be signed in to change notification settings - Fork 0
Testing
t957095 edited this page Jun 15, 2026
·
1 revision
ShelfWise includes multiple testing tiers, from fully local to full Azure OpenAI integration.
tests/
├── test_api.py # FastAPI endpoint tests
├── test_scraper.py # Scraper unit tests
├── test_agent.py # Reasoning agent tests
└── test_image_verifier.py # Image verification tests
# All tests
pytest tests/ -v
# With coverage
pytest tests/ --cov=backend --cov-report=term-missingruff check backend/
ruff format --check backend/This is the default mode. All reasoning, image verification, and knowledge graph operations run locally.
cd backend
python -m uvicorn main:app --host 127.0.0.1 --port 8000
python scripts/test_foundry_iq.pyWhat to verify:
-
/api/healthreturnsok. - Demo products load successfully.
- Batch processing completes for known UPCs.
- Exports produce valid files.
Use GitHub Models for free or low-cost LLM enrichment.
FOUNDRY_ENDPOINT=https://models.inference.ai.azure.com
FOUNDRY_API_KEY=ghp_your_token
FOUNDRY_MODEL=gpt-4.1-miniVerify that foundry_enriched is true on enriched products.
Run a local model for private enrichment.
ollama run llama3.1FOUNDRY_ENDPOINT=http://localhost:11434/v1
FOUNDRY_API_KEY=ollama
FOUNDRY_MODEL=llama3.1Production-grade enrichment with Microsoft Foundry IQ.
FOUNDRY_ENDPOINT=https://your-resource.openai.azure.com/openai/deployments/your-deployment
FOUNDRY_API_KEY=your-azure-key
FOUNDRY_MODEL=gpt-4oRun backend/setup-azure-openai.ps1 to provision resources.
- App loads at
/app. - Demo button populates products.
- UPC batch processes with live progress.
- CSV upload starts a job.
- Product cards render image, name, brand, category, confidence.
- Reasoning trace modal opens and displays citations.
- Search filters products correctly.
- Sort toggles ascending/descending.
- Export buttons download valid files.
- Keyboard shortcuts work.
- Reduced motion and high contrast modes are respected.
GitHub Actions runs on every push and PR:
- Ruff lint
- Ruff format check
- pytest suite
- Import checks
- Docker build
Matrix: Python 3.12, 3.13, 3.14.
Use the /api/metrics endpoint to monitor:
- Per-source success rate and latency
- Cache hit rate
- Reasoning agent duration
- Image verification duration
When filing an issue, include:
- Steps to reproduce
- Expected vs actual behavior
- UPC(s) that trigger the issue
- Relevant logs or screenshots
- Whether API keys were configured
ShelfWise — AI Product Portfolio Builder · GitHub · MIT License
- Home
- Getting Started
- Use Cases
- Roadmap
- Architecture
- API Reference
- Configuration
- Backend Guide
- Frontend Guide
- Scraping & Reasoning
- Testing
- Deployment
- Changelog
Quick Start
docker-compose up --build
# open http://localhost:8000/app