Skip to content

Commit

Permalink
KBMBF-452: #37 Show ratio of oer-content
Browse files Browse the repository at this point in the history
Fixing score bug due to too low values
  • Loading branch information
Robert Meissner committed Jul 21, 2022
1 parent 039a059 commit 550ca32
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions src/app/api/score/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,72 +2,72 @@


class MissingCollectionProperties(BaseModel):
total: int = Field(default=0, gt=0, description="Number of entries")
total: int = Field(default=0, ge=0, description="Number of entries")
short_description: float = Field(
default=0.0,
gt=0.0,
ge=0.0,
le=1.0,
description="Ratio of entries without short description",
)
short_title: float = Field(
default=0.0, gt=0.0, le=1.0, description="Ratio of entries without short title"
default=0.0, ge=0.0, le=1.0, description="Ratio of entries without short title"
)
missing_edu_context: float = Field(
default=0.0, gt=0.0, le=1.0, description="Ratio of entries without edu context"
default=0.0, ge=0.0, le=1.0, description="Ratio of entries without edu context"
)
missing_description: float = Field(
default=0.0, gt=0.0, le=1.0, description="Ratio of entries without description"
default=0.0, ge=0.0, le=1.0, description="Ratio of entries without description"
)
few_keywords: float = Field(
default=0.0, gt=0.0, le=1.0, description="Ratio of entries with few keywords"
default=0.0, ge=0.0, le=1.0, description="Ratio of entries with few keywords"
)
missing_keywords: float = Field(
default=0.0, gt=0.0, le=1.0, description="Ratio of entries without keywords"
default=0.0, ge=0.0, le=1.0, description="Ratio of entries without keywords"
)
missing_title: float = Field(
default=0.0, gt=0.0, le=1.0, description="Ratio of entries without title"
default=0.0, ge=0.0, le=1.0, description="Ratio of entries without title"
)


class MissingMaterialProperties(BaseModel):
total: int = Field(default=0, gt=0, description="Number of entries")
total: int = Field(default=0, ge=0, description="Number of entries")
missing_edu_context: float = Field(
default=0.0, gt=0.0, le=1.0, description="Ratio of entries without edu context"
default=0.0, ge=0.0, le=1.0, description="Ratio of entries without edu context"
)
missing_object_type: float = Field(
default=0.0, gt=0.0, le=1.0, description="Ratio of entries without object type"
default=0.0, ge=0.0, le=1.0, description="Ratio of entries without object type"
)
missing_description: float = Field(
default=0.0, gt=0.0, le=1.0, description="Ratio of entries without description"
default=0.0, ge=0.0, le=1.0, description="Ratio of entries without description"
)
missing_license: float = Field(
default=0.0, gt=0.0, le=1.0, description="Ratio of entries with missing license"
default=0.0, ge=0.0, le=1.0, description="Ratio of entries with missing license"
)
missing_keywords: float = Field(
default=0.0, gt=0.0, le=1.0, description="Ratio of entries without keywords"
default=0.0, ge=0.0, le=1.0, description="Ratio of entries without keywords"
)
missing_title: float = Field(
default=0.0, gt=0.0, le=1.0, description="Ratio of entries without title"
default=0.0, ge=0.0, le=1.0, description="Ratio of entries without title"
)
missing_ads_qualifier: float = Field(
default=0.0,
gt=0.0,
ge=0.0,
le=1.0,
description="Ratio of entries missing advertisement qualifier",
)
missing_subjects: float = Field(
default=0.0, gt=0.0, le=1.0, description="Ratio of entries missing subjects"
default=0.0, ge=0.0, le=1.0, description="Ratio of entries missing subjects"
)
missing_material_type: float = Field(
default=0.0,
gt=0.0,
ge=0.0,
le=1.0,
description="Ratio of entries missing material type",
)


class ScoreOutput(BaseModel):
score: int = Field(default=0, gt=0, le=100, description="Overall score")
score: int = Field(default=0, ge=0, le=100, description="Overall score")
oer_ratio: int = Field(
default=0, ge=0, le=100, description="Overall ratio of OER content"
)
Expand Down

0 comments on commit 550ca32

Please sign in to comment.