From 9b5f96f4bf8ff14af8f3975ce59c051d38efb79d Mon Sep 17 00:00:00 2001 From: Kori Kuzma Date: Mon, 29 Jun 2026 12:39:37 -0400 Subject: [PATCH] fix: JSON Schema number type should also include int close #61 --- src/ga4gh/va_spec/base/core.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ga4gh/va_spec/base/core.py b/src/ga4gh/va_spec/base/core.py index 8fbf3be..a573b22 100644 --- a/src/ga4gh/va_spec/base/core.py +++ b/src/ga4gh/va_spec/base/core.py @@ -237,7 +237,7 @@ class CohortAlleleFrequencyStudyResult(_StudyResult, BaseModelForbidExtra): ..., description="The number of occurrences of all alleles at the locus in the cohort.", ) - focusAlleleFrequency: float = Field( + focusAlleleFrequency: int | float = Field( ..., description="The frequency of the focusAllele in the cohort." ) cohort: StudyGroup = Field( @@ -274,7 +274,7 @@ class TumorVariantFrequencyStudyResult(_StudyResult, BaseModelForbidExtra): ..., description="The total number of tumor samples in the sample group.", ) - affectedFrequency: float = Field( + affectedFrequency: int | float = Field( ..., description="The frequency of tumor samples that include the focus variant in the sample group.", ) @@ -301,7 +301,7 @@ class ExperimentalVariantFunctionalImpactStudyResult( ..., description="The genetic variant for which a functional impact score is generated.", ) - functionalImpactScore: float | None = Field( + functionalImpactScore: int | float | None = Field( default=None, description="The score of the variant impact measured in the assay or study.", ) @@ -572,7 +572,7 @@ class EvidenceLine(InformationEntity, BaseModelForbidExtra): default=None, description="The strength of support that an Evidence Line is determined to provide for or against its target Proposition, evaluated relative to the direction indicated by the directionOfEvidenceProvided value.", ) - scoreOfEvidenceProvided: float | None = Field( + scoreOfEvidenceProvided: int | float | None = Field( default=None, description="A quantitative score indicating the strength of support that an Evidence Line is determined to provide for or against its target Proposition, evaluated relative to the direction indicated by the directionOfEvidenceProvided value.", ) @@ -749,7 +749,7 @@ class Statement(InformationEntity, BaseModelForbidExtra): default=None, description="A term used to report the strength of a Proposition's assessment in the direction indicated (i.e. how strongly supported or disputed the Proposition is believed to be). Implementers may choose to frame a strength assessment in terms of how *confident* an agent is that the Proposition is true or false, or in terms of the *strength of all evidence* they believe supports or disputes it.", ) - score: float | None = Field( + score: int | float | None = Field( default=None, description="A quantitative score that indicates the strength of a Proposition's assessment in the direction indicated (i.e. how strongly supported or disputed the Proposition is believed to be). Depending on its implementation, a score may reflect how *confident* that agent is that the Proposition is true or false, or the *strength of evidence* they believe supports or disputes it. Instructions for how to interpret the meaning of a given score may be gleaned from the method or document referenced in 'specifiedBy' attribute.", )