πŸš€ Development Setup Guide

This guide outlines the recommended setup process for developers and contributors working on Pixella.

πŸ“‹ Prerequisites

Before you begin, ensure you have:

βš™οΈ 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:

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

  1. 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-number
    

    Start coding!

  2. Create a .gitignore file to exclude unnecessary files: refer to the .gitignore template in README.md for details.

  3. Make your changes…
    • Write codes Avoid creating unrelated files or changes in the same pull request. Only use python language for coding.

πŸ› 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

🎯 Next Steps

  1. Explore the codebase in pixella/
  2. Check out the CLI commands with pixella --help
  3. Try the web UI with pixella ui
  4. Look at existing issues for contribution ideas

Happy coding! πŸ€–