How ohadmata/shmessy works
Main Components
a) Core Components:
• Schema Inference Engine
• Type Validation System
• DataFrame Transformer
• File Readers (CSV/Excel)
b) Type System:
• Base Type Handler
• Specialized Type Validators (Boolean, Date, DateTime, Email, Float, Integer, IPv4, String, UnixTimestamp)
┌─────────────────────────────────────────────────────────┐
• Client Interface │
• (read_csv, infer_schema, fix_schema, get_inferred_schema) │
• ┤
• Core Processing │
• ┌─────────────┐ ┌──────────────┐ ┌─────────┐ │
• Schema │ │ Type │ │DataFrame │ │
• Inference │◄──►│ Validation │◄─►│Transform │ │
• Engine │ │ System │ │ Engine │ │
• ┘ └──────────────┘ └─────────┘ │
• ┤
• Type System │
• ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────────┐ │
• Boolean │ │ Date │ │ Email │ │ IPv4 │ │
• ┘ └─────────┘ └─────────┘ └─────────────┘ │
• ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────────┐ │
• Integer │ │ Float │ │ String │ │UnixTimestamp│ │
• ┘ └─────────┘ └─────────┘ └─────────────┘ │
• ┘
Important Elements to Highlight
a) Data Flow:
• Input: Raw DataFrame/CSV/Excel files
• Processing: Type inference and validation
• Output: Cleaned DataFrame with correct types
b) Key Processes:
• Schema inference
• Type validation
• DataFrame transformation
• File reading and parsing
Implementation Details
How the components interact:
• Schema Inference Engine samples data and coordinates with Type Validation System
• Type System provides specialized validators for each data type
• DataFrame Transformer applies the inferred schema to clean the data
Configuration Elements
Configuration parameters:
• Sample size
• Encoding options
• Locale settings
• Type inference settings
This design reflects the project's focus on data type inference and transformation, with a clear separation between the type system, core processing, and client interface layers.