Skip to content

Commit

Permalink
Merge pull request #28 from ImageMarkup/rename-fitzpatrick
Browse files Browse the repository at this point in the history
  • Loading branch information
danlamanna authored Mar 5, 2024
2 parents f09c5af + 89f8d97 commit 4fb6fe9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion isic_metadata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class Field:
"color_tint",
"patient_id",
"lesion_id",
"skin_type",
"fitzpatrick_skin_type",
]:
FIELD_REGISTRY[field] = Field(
search=SearchConfig(
Expand Down
2 changes: 1 addition & 1 deletion isic_metadata/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class ColorTintEnum(str, Enum):
none = "none"


class SkinType(str, Enum):
class FitzpatrickSkinType(str, Enum):
type_i = "I"
type_ii = "II"
type_iii = "III"
Expand Down
4 changes: 2 additions & 2 deletions isic_metadata/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
DermoscopicTypeEnum,
DiagnosisConfirmTypeEnum,
DiagnosisEnum,
FitzpatrickSkinType,
ImageTypeEnum,
MelClassEnum,
MelMitoticIndexEnum,
MelThickMm,
MelTypeEnum,
NevusTypeEnum,
SkinType,
TBPTileTypeEnum,
)

Expand Down Expand Up @@ -160,7 +160,7 @@ class MetadataRow(BaseModel):
clin_size_long_diam_mm: (
Annotated[float, BeforeValidator(ClinSizeLongDiamMm.parse_measurement_str)] | None
) = None
skin_type: SkinType | None = None
fitzpatrick_skin_type: FitzpatrickSkinType | None = None
melanocytic: bool | None = None
concomitant_biopsy: bool | None = None

Expand Down
4 changes: 2 additions & 2 deletions tests/test_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def test_age_special_case():
assert MetadataRow.model_validate({"age": "85+"}).age == 85


def test_skin_type():
MetadataRow.model_validate({"skin_type": "I"})
def test_fitzpatrick_skin_type():
MetadataRow.model_validate({"fitzpatrick_skin_type": "I"})


def test_benign_malignant():
Expand Down

0 comments on commit 4fb6fe9

Please sign in to comment.