π Development Setup Guide
This guide outlines the recommended setup process for developers and contributors working on Pixella.
π Prerequisites
Before you begin, ensure you have:
- Python 3.11 or higher (required)
- Git for version control
- Internet connection for downloading dependencies
- A Google AI API key (get one from Google AI Studio)
βοΈ Installation Steps
# 1. Clone the repository
git clone https://github.com/DominionDev-coder/Pixella-chatbot.git
cd Pixella-chatbot
Then Cofigure your environment and
π Project Structure
After setup, your project structure should look like this:
Pixella-chatbot/
βββ .venv/ # Python virtual environment
βββ bin/
β βββ pixella # Command wrapper
βββ data/
β βββ memory/ # Session data storage
βββ db/
β βββ chroma/ # Vector database
βββ docs/ # Documentation
βββ scripts/
β βββ install.sh # Installation script
βββ .env # Environment configuration
βββ main.py # Main application entry point
βββ pixella/ # Main package
β βββ __init__.py
β βββ cli.py # CLI commands
β βββ config.py # Configuration management
β βββ memory.py # Memory management
β βββ ...
βββ requirements.txt # Python dependencies
π§ Development Workflow
1. Activate Your Environment
# The installation script should have added pixella to your PATH
# If not, activate the virtual environment manually:
source .venv/bin/activate # Linux/macOS
# or
.venv\Scripts\activate # Windows
2. Verify Installation
# Check that everything is working
python main.py
# Or use the pixella command
pixella --help
3. Configure API Key
If you didnβt set it during installation:
pixella config --google-api-key "your-api-key-here"
4. Start Developing
# Run in development mode
pixella cli --interactive
# Or start the web UI
pixella ui
π§ͺ Testing
# Run the test suite
python -m pytest
# Run specific tests
python -m pytest tests/test_specific.py
# Run with coverage
python -m pytest --cov=pixella
π Code Style
We follow these conventions:
- Python: PEP 8 with Black formatting
- Commits: Conventional commits (
feat:,fix:,Implement,Minor Changes,Improvementetc.) - Documentation: Clear, concise comments and docstrings
Linting and Formatting
# Format code
black pixella/
# Check style
flake8 pixella/
# Type checking
mypy pixella/
π Development Commands
Common Tasks
# Update dependencies
pip install -r requirements.txt
# Clean cache files
find . -type d -name __pycache__ -exec rm -rf {} +
# Reset database (be careful!)
rm -rf db/ data/
# View logs
tail -f pixella.log
Working with Git
- Create a new branch for your feature or bugfix:
# Create a feature branch git checkout -b feature/your-feature-name # or for bugfix git checkout -b bugfix/issue-numberStart coding!
-
Create a .gitignore file to exclude unnecessary files: refer to the .gitignore template in README.md for details.
- Make your changesβ¦
- Write codes Avoid creating unrelated files or changes in the same pull request. Only use python language for coding.
- Run tests
python -m pytest - Commit with conventional format
git commit -m "feat: Add new feature description" # or "fix: Fix bug description" - Push and create PR ```bash git push origin feature/your-feature-name Open a Pull Request on GitHub with a descriptive title and explanation.
π Troubleshooting
Common Issues
βpixella command not foundβ
export PATH="$PWD/bin:$PATH"
βModule not foundβ errors
# Reactivate virtual environment
source .venv/bin/activate
# Reinstall dependencies
pip install -r requirements.txt
βAPI key not configuredβ
pixella config --google-api-key "your-key-here"
# or edit .env file directly
Getting Help
- Check the README.md for general usage
- Review CONTRIBUTING.md for contribution guidelines
- Open an issue on GitHub for bugs or feature requests
π― Next Steps
- Explore the codebase in
pixella/ - Check out the CLI commands with
pixella --help - Try the web UI with
pixella ui - Look at existing issues for contribution ideas
Happy coding! π€