https://github.com/copyleftdev/vibe-todo

https://github.com/copyleftdev/vibe-todo

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.1%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: copyleftdev
  • License: mit
  • Language: Python
  • Default Branch: master
  • Size: 34.2 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created about 1 year ago · Last pushed about 1 year ago
Metadata Files
Readme License

README.md

Vibe Todo

A high-performance, production-ready Todo application built with Python 3.11+ and SQLite, featuring extensive testing including evolutionary techniques to ensure robustness and security.

Version Python License

Features

  • Add, toggle, delete, and list tasks with robust validation
  • High performance (10ms SLA for all operations)
  • Optimized SQLite database with transaction support
  • Comprehensive input validation and sanitization
  • Protection against SQL injection and other security issues
  • Structured JSON logging for observability

Requirements

  • Python 3.11 or higher
  • SQLite3

Quick Start (with Docker)

The easiest way to run the application is with Docker:

```bash

Clone the repository

git clone https://github.com/copyleftdev/vibe-todo.git cd vibe-todo

Run the application with Docker

docker-compose run app ```

Manual Installation

```bash

Clone the repository

git clone https://github.com/copyleftdev/vibe-todo.git cd vibe-todo

Create and activate a virtual environment (optional but recommended)

python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate

Install dependencies

pip install -r requirements.txt

Run the application

python -m todo ```

API Usage

```python from todo.models import initdb from todo.controller import addtask, toggledone, deletetask, list_tasks

Initialize database connection

conn = init_db()

Add a new task

task = add_task(conn, "Complete the project") print(f"Added task: {task}")

Toggle a task's status

updatedtask = toggledone(conn, task['id']) print(f"Toggled task: {updated_task}")

List all tasks

alltasks = listtasks(conn) print(f"All tasks: {all_tasks}")

List only completed tasks

donetasks = listtasks(conn, done=True) print(f"Completed tasks: {done_tasks}")

Delete a task

delete_task(conn, task['id']) print("Task deleted") ```

Development

Running Tests

The project includes comprehensive test suites:

```bash

Run all tests with Docker (excluding evolutionary tests)

docker-compose run test-all

Run all tests including evolutionary tests

docker-compose run test-all-evolutionary

Run specific test suites

docker-compose run test-unit docker-compose run test-regression docker-compose run test-benchmark docker-compose run test-evolutionary ```

For local development:

```bash

Run all tests

python runalltests.py

Run all tests including evolutionary tests

python runalltests.py --evolutionary

Run tests in quick mode

python runalltests.py --quick ```

Linting

```bash

Run linting with Docker

docker-compose run lint

Run linting locally

ruff check . black --check . mypy todo tests ```

Pre-commit Hooks

The repository includes a pre-commit hook that runs tests before allowing commits:

```bash

Set up the pre-commit hook

python setup_hooks.py ```

Architecture

The application follows a modular architecture:

  • todo/models.py - Database initialization and schema
  • todo/controller.py - Core business logic and database operations
  • todo/validation.py - Input validation and sanitization
  • tests/ - Comprehensive test suites

Testing Philosophy

The project embraces thorough testing:

  1. Unit Tests - Basic functionality validation
  2. Hypothesis Tests - Property-based tests with randomized inputs
  3. Regression Tests - Tests for known edge cases
  4. Benchmark Tests - Performance tests to ensure SLA compliance
  5. Evolutionary Tests - Uses DEAP to evolve inputs that might break the system

SLA Compliance

All operations must meet a Service-Level Agreement (SLA) of 10 milliseconds maximum latency per task operation. The benchmark tests verify this requirement continuously.

Security

The application employs several security measures:

  • All user inputs are validated and sanitized
  • Protection against SQL injection
  • Proper handling of special characters and large inputs
  • Transaction-based operations with rollback capability

Version History

  • 1.0.0 (2025-04-13) - Initial release with core functionality, Docker support, and comprehensive testing

License

This project is licensed under the MIT License - see the LICENSE file for details.

Owner

  • Name: Donald Johnson
  • Login: copyleftdev
  • Kind: user
  • Location: Los Angeles

GitHub Events

Total
  • Watch event: 5
  • Push event: 1
  • Fork event: 1
  • Create event: 3
Last Year
  • Watch event: 5
  • Push event: 1
  • Fork event: 1
  • Create event: 3

Dependencies

.github/workflows/python-ci.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
Dockerfile docker
  • python 3.11-slim build
docker-compose.yml docker
pyproject.toml pypi
  • deap >=1.3.0
  • hypothesis >=6.0.0
  • pytest >=7.0.0
requirements.txt pypi
  • black >=23.10.0
  • deap >=1.3.0
  • hypothesis >=6.0.0
  • mypy >=1.6.0
  • pytest >=7.0.0
  • ruff >=0.1.5