Thank you for your interest in contributing to Cognio! This document provides guidelines and instructions for contributing.
Create a branch from main:
git checkout -b feature/your-feature-name
Make your changes following our code standards
Write tests for new functionality
Run tests to ensure everything passes:
poetry run pytest
Format code:
poetry run black src/ tests/
poetry run ruff check src/ tests/
Commit with clear messages:
git commit -m "Add feature: brief description"
Push to your fork:
git push origin feature/your-feature-name
Create a Pull Request with:
def calculate_similarity(embedding1: list[float], embedding2: list[float]) -> float:
"""
Calculate cosine similarity between two embeddings.
Args:
embedding1: First embedding vector
embedding2: Second embedding vector
Returns:
Similarity score between 0.0 and 1.0
"""
# Implementation here
pass
Include both unit and integration tests
def test_save_memory() -> None:
"""Test saving a memory."""
# Test implementation
pass
# Clone your fork
git clone https://github.com/your-username/Cognio.git
cd Cognio
# Install dependencies
poetry install
# Run tests
poetry run pytest
# Run linter
poetry run ruff check src/
# Format code
poetry run black src/
Before submitting your PR, ensure:
Feel free to ask questions in:
Thank you for contributing!