123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- # sample_data.py
- """
- Sample data to test the attribute scoring system
- """
- SAMPLE_CATEGORY_RULES = [
- {
- 'category': 'Electronics',
- 'attribute_name': 'brand',
- 'is_mandatory': True,
- 'valid_values': ['Apple', 'Samsung', 'Sony', 'LG', 'Dell', 'HP', 'Lenovo'],
- 'data_type': 'string'
- },
- {
- 'category': 'Electronics',
- 'attribute_name': 'color',
- 'is_mandatory': True,
- 'valid_values': ['Black', 'White', 'Silver', 'Gray', 'Blue', 'Red', 'Gold', 'Rose Gold'],
- 'data_type': 'string'
- },
- {
- 'category': 'Electronics',
- 'attribute_name': 'warranty',
- 'is_mandatory': True,
- 'valid_values': ['1 Year', '2 Years', '3 Years', 'Lifetime'],
- 'data_type': 'string'
- },
- {
- 'category': 'Electronics',
- 'attribute_name': 'condition',
- 'is_mandatory': True,
- 'valid_values': ['New', 'Refurbished', 'Used'],
- 'data_type': 'string'
- },
- {
- 'category': 'Electronics',
- 'attribute_name': 'model',
- 'is_mandatory': False,
- 'valid_values': [],
- 'data_type': 'string'
- },
- {
- 'category': 'Clothing',
- 'attribute_name': 'brand',
- 'is_mandatory': True,
- 'valid_values': ['Nike', 'Adidas', 'Puma', 'Reebok', 'Under Armour'],
- 'data_type': 'string'
- },
- {
- 'category': 'Clothing',
- 'attribute_name': 'size',
- 'is_mandatory': True,
- 'valid_values': ['XS', 'S', 'M', 'L', 'XL', 'XXL'],
- 'data_type': 'string'
- },
- {
- 'category': 'Clothing',
- 'attribute_name': 'color',
- 'is_mandatory': True,
- 'valid_values': ['Black', 'White', 'Blue', 'Red', 'Green', 'Yellow', 'Gray'],
- 'data_type': 'string'
- },
- {
- 'category': 'Clothing',
- 'attribute_name': 'material',
- 'is_mandatory': True,
- 'valid_values': ['Cotton', 'Polyester', 'Wool', 'Silk', 'Nylon', 'Blend'],
- 'data_type': 'string'
- },
- ]
- SAMPLE_PRODUCTS = [
- {
- 'sku': 'ELEC-001',
- 'category': 'Electronics',
- 'title': 'Apple MacBook Pro 14-inch Space Gray',
- 'description': 'Latest Apple MacBook Pro with M3 chip, 14-inch display in Space Gray color.',
- 'attributes': {
- 'brand': 'Apple',
- 'color': 'Space Gray', # Should suggest "Gray"
- 'warranty': '1 Year',
- 'condition': 'New',
- 'model': 'MacBook Pro 14"'
- }
- },
- {
- 'sku': 'ELEC-002',
- 'category': 'Electronics',
- 'title': 'Samsung Galaxy S24 Ultra',
- 'description': 'Flagship Samsung phone with advanced camera system.',
- 'attributes': {
- 'brand': 'Samsung',
- 'color': 'blak', # Typo - should suggest "Black"
- 'warranty': 'N/A', # Placeholder - should flag
- 'condition': 'new', # Case mismatch - should suggest "New"
- # Missing 'model'
- }
- },
- {
- 'sku': 'ELEC-003',
- 'category': 'Electronics',
- 'title': 'Sony WH-1000XM5 Wireless Headphones',
- 'description': 'Premium noise-cancelling headphones from Sony.',
- 'attributes': {
- # Missing 'brand' - mandatory field
- 'color': 'Black',
- 'warranty': '2 Years',
- 'condition': 'Refurbished'
- }
- },
- {
- 'sku': 'CLTH-001',
- 'category': 'Clothing',
- 'title': 'Nike Dri-FIT Running T-Shirt Blue Medium',
- 'description': 'Lightweight Nike running shirt in blue color, size Medium.',
- 'attributes': {
- 'brand': 'Nike',
- 'size': 'M',
- 'color': 'Blue',
- 'material': 'Polyester'
- }
- },
- {
- 'sku': 'CLTH-002',
- 'category': 'Clothing',
- 'title': 'Adidas Hoodie',
- 'description': 'Comfortable hoodie for casual wear.',
- 'attributes': {
- 'brand': 'Adiddas', # Typo - should suggest "Adidas"
- 'size': 'Large', # Should suggest "L"
- 'color': '', # Empty - should flag
- # Missing 'material' - mandatory field
- }
- },
- ]
|