Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Data Pipeline

A production-ready Python 3.12 data pipeline for validating, cleaning, and serving data to ML models. Built with test-driven development (TDD), comprehensive testing, and enterprise-grade CI/CD.

Why This Project?

Data quality is critical for machine learning success. This project provides a robust, well-tested framework for loading, validating, and preparing data—so you can focus on building great models instead of debugging data issues.

🚀 Quick Start (5 Minutes)

1. Clone and Setup

git clone https://github.com/YOUR_ORG/ai-project.git
cd ai-project
./scripts/setup-dev.sh

2. Run Tests

pytest --cov

3. Use the Pipeline

from ai_project.processors.loader import DataLoader
from ai_project.core.pipeline import DataPipeline

loader = DataLoader()
df = loader.load_csv("data.csv")

pipeline = DataPipeline()
result = pipeline.execute("data.csv")
print(f"Processed {result.records_processed} records")

✨ Features

  • Auto-Detection - Automatically detects CSV/JSON format, delimiters, and encoding
  • Validation - Pydantic-based schema validation with helpful error messages
  • Cleaning - Remove duplicates, handle nulls, normalize data
  • Feature Engineering - Scale features, select important ones, create interactions
  • Caching - Smart caching for repeated loads
  • Type Safety - 100% type hints (PEP 484)
  • Testing - 48+ comprehensive tests with 80%+ coverage
  • CI/CD - Automated testing, security scanning, and releases
  • Documentation - Complete guides and API reference
  • Production Ready - Error handling, logging, and monitoring

📦 Installation

Using pip

pip install ai-project

Development Installation

git clone https://github.com/YOUR_ORG/ai-project.git
cd ai-project
pip install -e ".[dev]"

Using Docker

docker build -t ai-project .
docker run -it ai-project

📚 Documentation

Document Purpose
Installation Setup guide for all platforms
Development Local development workflow
Testing TDD philosophy and test writing
Contributing How to contribute
Architecture System design and components
API Reference Complete API documentation
Troubleshooting Common issues and solutions
CI/CD GitHub Actions workflows

💡 Usage Examples

Load Data

from ai_project.processors.loader import DataLoader

loader = DataLoader()

# Load CSV with auto-detection
df = loader.load_csv("data.csv")

# Load JSON
df = loader.load_json("data.json")

# Auto-detect format
df = loader.load_auto("data.csv")

Validate Data

from ai_project.processors.validator import DataValidator

validator = DataValidator()

# Validate single record
record = validator.validate_record({"id": 1, "value": 10.0, "label": "test"})

# Validate DataFrame
valid_records, errors = validator.validate_dataframe(df)

Clean Data

from ai_project.processors.cleaner import DataCleaner

cleaner = DataCleaner()

# Remove duplicates and nulls
df = cleaner.clean(df)

# Normalize numeric column
df = cleaner.normalize_numeric(df, "value", method="minmax")

Run Pipeline

from ai_project.core.pipeline import DataPipeline
from ai_project.core.models import PipelineConfig

config = PipelineConfig(
    name="my_pipeline",
    validate_data=True,
    clean_data=True,
    engineer_features=True,
    scaling_method="standard"
)

pipeline = DataPipeline(config)
result = pipeline.execute("data.csv")

print(f"Success: {result.success}")
print(f"Records: {result.records_processed}")
print(f"Duration: {result.duration_seconds}s")

🧪 Testing

Run All Tests

pytest

Run with Coverage

pytest --cov=src/ai_project --cov-report=html
open htmlcov/index.html

Run Specific Tests

# Unit tests only
pytest -m unit

# Integration tests only
pytest -m integration

# Specific test file
pytest tests/unit/processors/test_loader.py -v

Write Tests (TDD)

import pytest
from ai_project.processors.loader import DataLoader

def test_loader_loads_csv_file(sample_csv_file):
    """Test loading CSV file."""
    loader = DataLoader()
    df = loader.load_csv(sample_csv_file)
    assert len(df) == 5
    assert "id" in df.columns

🔧 Development

Code Quality

# Format code
black src tests

# Lint
ruff check src tests

# Type check
pyright src

# All checks
make quality

Common Commands

make install          # Install dependencies
make test             # Run tests
make format           # Format code
make lint             # Lint code
make type-check       # Type check
make quality          # All checks
make clean            # Clean artifacts

🤝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for:

  • Code of conduct
  • Development workflow
  • Testing requirements
  • Commit message format
  • Pull request process

Quick Contribution Steps

  1. Fork the repository
  2. Create a feature branch: git checkout -b feat/your-feature
  3. Write tests first (TDD)
  4. Make changes to pass tests
  5. Run quality checks: make quality
  6. Commit with conventional message: git commit -m "feat: add feature"
  7. Push and create PR

📊 Project Status

  • Version: 0.1.0
  • Python: 3.12+
  • Status: Production Ready
  • Tests: 48+ passing
  • Coverage: 80%+
  • License: MIT

🔗 Links

📝 License

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

🙏 Credits

Built with:

📧 Questions?


Last Updated: January 15, 2026
Maintained by: AI Engineering Team

About

Production-ready AI data pipeline with test-driven development

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages