Skip to content

Commit

Permalink
build: unpin pydantic version
Browse files Browse the repository at this point in the history
  • Loading branch information
korikuzma committed Sep 10, 2023
1 parent 14df17c commit a28e466
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 31 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ install_requires =
jsonschema>=4.17.3
numpy
pyyaml
pydantic == 2.1.1
pydantic ~= 2.3.0
setup_requires =
cython
pytest-runner
Expand Down
30 changes: 0 additions & 30 deletions src/ga4gh/vrs/_internal/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,6 @@ class ResidueAlphabet(Enum):


class Range(RootModel):
model_config = ConfigDict(
extra='allow',
)
root: List[Optional[int]] = Field(
...,
description='An inclusive range of values bounded by one or more integers.',
Expand All @@ -162,19 +159,13 @@ class Range(RootModel):


class Residue(RootModel):
model_config = ConfigDict(
extra='allow',
)
root: constr(pattern=r'[A-Z*\-]') = Field(
...,
description='A character representing a specific residue (i.e., molecular species) or groupings of these ("ambiguity codes"), using [one-letter IUPAC abbreviations](https://en.wikipedia.org/wiki/International_Union_of_Pure_and_Applied_Chemistry#Amino_acid_and_nucleotide_base_codes) for nucleic acids and amino acids.',
)


class SequenceString(RootModel):
model_config = ConfigDict(
extra='allow',
)
root: constr(pattern=r'^[A-Z*\-]*$') = Field(
...,
description='A character string of Residues that represents a biological sequence using the conventional sequence order (5’-to-3’ for nucleic acid sequences, and amino-to-carboxyl for amino acid sequences). IUPAC ambiguity codes are permitted in Sequence Strings.',
Expand All @@ -201,9 +192,6 @@ class Extension(BaseModel):


class Code(RootModel):
model_config = ConfigDict(
extra='allow',
)
root: constr(pattern=r'\S+( \S+)*') = Field(
...,
description='Indicates that the value is taken from a set of controlled strings defined elsewhere. Technically, a code is restricted to a string which has at least one character and no leading or trailing whitespace, and where there is no whitespace other than single spaces in the contents.',
Expand All @@ -212,9 +200,6 @@ class Code(RootModel):


class IRI(RootModel):
model_config = ConfigDict(
extra='allow',
)
root: str = Field(
...,
description='An IRI Reference (either an IRI or a relative-reference), according to `RFC3986 section 4.1 <https://datatracker.ietf.org/doc/html/rfc3986#section-4.1>` and `RFC3987 section 2.1 <https://datatracker.ietf.org/doc/html/rfc3987#section-2.1>`. MAY be a JSON Pointer as an IRI fragment, as described by `RFC6901 section 6 <https://datatracker.ietf.org/doc/html/rfc6901#section-6>`.',
Expand Down Expand Up @@ -356,9 +341,6 @@ class ga4gh:


class SequenceExpression(RootModel):
model_config = ConfigDict(
extra='allow',
)
root: Union[LiteralSequenceExpression, ReferenceLengthExpression] = Field(
..., description='An expression describing a Sequence.', discriminator='type'
)
Expand Down Expand Up @@ -496,9 +478,6 @@ class ga4gh:


class Location(RootModel):
model_config = ConfigDict(
extra='allow',
)
root: SequenceLocation = Field(
...,
description='A contiguous segment of a biological sequence.',
Expand Down Expand Up @@ -533,9 +512,6 @@ class ga4gh:


class MolecularVariation(RootModel):
model_config = ConfigDict(
extra='allow',
)
root: Union[Allele, Haplotype] = Field(
..., description='A variation on a contiguous molecule.', discriminator='type'
)
Expand Down Expand Up @@ -578,9 +554,6 @@ class ga4gh:


class Variation(RootModel):
model_config = ConfigDict(
extra='allow',
)
root: Union[Allele, CopyNumberChange, CopyNumberCount, Genotype, Haplotype] = Field(
...,
description='A representation of the state of one or more biomolecules.',
Expand All @@ -589,9 +562,6 @@ class Variation(RootModel):


class SystemicVariation(RootModel):
model_config = ConfigDict(
extra='allow',
)
root: Union[CopyNumberChange, CopyNumberCount, Genotype] = Field(
...,
description='A Variation of multiple molecules in the context of a system, e.g. a genome, sample, or homologous chromosomes.',
Expand Down

0 comments on commit a28e466

Please sign in to comment.