File size: 733 Bytes
fdc5d7a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from enum import Enum
from pydantic import BaseModel, Field
from typing import Optional

# Define the impact level as an enum for better type safety
class ImpactLevel(str, Enum):
    NA = "not_available"  # New category for when size information is unavailable
    LOW = "low"
    MEDIUM = "medium"
    HIGH = "high"

# Define metrics model for impact assessment
class DatasetMetrics(BaseModel):
    size_bytes: Optional[int] = Field(None, description="Size of the dataset in bytes")
    file_count: Optional[int] = Field(None, description="Number of files in the dataset")
    downloads: Optional[int] = Field(None, description="Number of downloads (all time)")
    likes: Optional[int] = Field(None, description="Number of likes")