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.
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.
git clone https://github.com/YOUR_ORG/ai-project.git
cd ai-project
./scripts/setup-dev.shpytest --covfrom 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")- ✅ 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
pip install ai-projectgit clone https://github.com/YOUR_ORG/ai-project.git
cd ai-project
pip install -e ".[dev]"docker build -t ai-project .
docker run -it ai-project| 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 |
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")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)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")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")pytestpytest --cov=src/ai_project --cov-report=html
open htmlcov/index.html# Unit tests only
pytest -m unit
# Integration tests only
pytest -m integration
# Specific test file
pytest tests/unit/processors/test_loader.py -vimport 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# Format code
black src tests
# Lint
ruff check src tests
# Type check
pyright src
# All checks
make qualitymake 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 artifactsWe welcome contributions! Please see CONTRIBUTING.md for:
- Code of conduct
- Development workflow
- Testing requirements
- Commit message format
- Pull request process
- Fork the repository
- Create a feature branch:
git checkout -b feat/your-feature - Write tests first (TDD)
- Make changes to pass tests
- Run quality checks:
make quality - Commit with conventional message:
git commit -m "feat: add feature" - Push and create PR
- ✅ Version: 0.1.0
- ✅ Python: 3.12+
- ✅ Status: Production Ready
- ✅ Tests: 48+ passing
- ✅ Coverage: 80%+
- ✅ License: MIT
This project is licensed under the MIT License - see LICENSE file for details.
Built with:
- Pydantic - Data validation
- Pandas - Data manipulation
- Pytest - Testing framework
- Ruff - Linting and formatting
- Pyright - Type checking
- 📖 Check the documentation
- 🐛 Report issues on GitHub
- 💬 Start a discussion
- 📧 Email: support@example.com
Last Updated: January 15, 2026
Maintained by: AI Engineering Team