-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
enhancementNew feature or requestNew feature or request
Description
re: PGS002253 discussions
pygscatalog/pgscatalog.core/src/pgscatalog/core/lib/models.py
Lines 595 to 608 in e8abd3f
| @model_validator(mode="after") | |
| def check_effect_weights(self) -> Self: | |
| match ( | |
| self.effect_weight, | |
| self.dosage_0_weight, | |
| self.dosage_1_weight, | |
| self.dosage_2_weight, | |
| ): | |
| case None, None, None, None: | |
| raise ValueError("All effect weight fields are missing") | |
| case None, zero, one, two if any(x is None for x in (zero, one, two)): | |
| raise ValueError("Dosage missing effect weight") | |
| case _: | |
| return self |
If effect_weight and dosage_0... columns are both present, a ValueError should be raised in the CatalogScoreVariant model, right @smlmbrt ?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request