Skip to content

Commit 7a97b8a

Browse files
authored
Merge pull request #31 from multimeric/ci-fixes
CI fixes
2 parents fed6ef3 + ad330f4 commit 7a97b8a

File tree

8 files changed

+2036
-1456
lines changed

8 files changed

+2036
-1456
lines changed

poetry.lock

Lines changed: 1907 additions & 1427 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/test_dataset/test_request.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,12 @@ def test_main_example():
8787
fields=["length", "gene_names"],
8888
).each_record():
8989
assert isinstance(record, dict)
90-
assert set(record.keys()) == {"primaryAccession", "genes", "sequence"}
90+
assert set(record.keys()) == {
91+
"primaryAccession",
92+
"genes",
93+
"sequence",
94+
"entryType",
95+
}
9196
assert record["sequence"]["length"] > 5000
9297

9398

@@ -104,7 +109,7 @@ def test_date_field():
104109
fields=["date_created", "protein_name"],
105110
).each_record()
106111
)
107-
assert len(records) == 544
112+
assert len(records) == 542
108113

109114

110115
def test_uniref():

test/test_dataset/test_validate_fields.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ def test_valid_return_fields(client: Type[DatasetClient]):
4848
).each_response()
4949
)
5050
)
51-
response.raise_for_status()
51+
assert response.status_code == 200, response.json()

unipressed/dataset/generated_types/database.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class DatabaseQueryDict(TypedDict):
2727
"pubmed_id",
2828
"doi_id",
2929
"link_type",
30-
"server",
30+
"servers",
3131
"dbUrl",
3232
"category",
3333
"statistics",

unipressed/dataset/generated_types/keywords.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@
55

66
from typing_extensions import Literal, NotRequired, TypeAlias, TypedDict
77

8+
Category: TypeAlias = Literal[
9+
"technical_term",
10+
"ptm",
11+
"molecular_function",
12+
"ligand",
13+
"domain",
14+
"disease",
15+
"developmental_stage",
16+
"coding_sequence_diversity",
17+
"cellular_component",
18+
"biological_process",
19+
]
20+
821

922
class KeywordsQueryDict(TypedDict):
1023
and_: NotRequired[Iterable["KeywordsQuery"]]
@@ -17,7 +30,7 @@ class KeywordsQueryDict(TypedDict):
1730
"Name\ne.g. 2Fe-2S"
1831
keyword_id: NotRequired[str]
1932
"Keyword [AC]\ne.g. KW-0001"
20-
category: NotRequired[str]
33+
category: NotRequired[Category]
2134
"Category\ne.g. Domain\n* technical_term: Technical term [KW-9990]\n* ptm: PTM [KW-9991]\n* molecular_function: Molecular function [KW-9992]\n* ligand: Ligand [KW-9993]\n* domain: Domain [KW-9994]\n* disease: Disease [KW-9995]\n* developmental_stage: Developmental stage [KW-9996]\n* coding_sequence_diversity: Coding sequence diversity [KW-9997]\n* cellular_component: Cellular component [KW-9998]\n* biological_process: Biological process [KW-9999]"
2235

2336

unipressed/dataset/generated_types/taxonomy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class TaxonomyQueryDict(TypedDict):
6262
host: NotRequired[int]
6363
"Virus host\ne.g. 85621"
6464
linked: NotRequired[bool]
65-
"With external info\ne.g. true\n* true: Yes\n* false: No"
65+
"With external info\ne.g. true"
6666
parent: NotRequired[str]
6767
"Parent\ne.g. 9606"
6868
ancestor: NotRequired[str]

unipressed/dataset/generated_types/uniparc.py

Lines changed: 83 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,80 @@
55

66
from typing_extensions import Literal, NotRequired, TypeAlias, TypedDict
77

8+
Database: TypeAlias = Literal[
9+
"EnsemblBacteria",
10+
"EnsemblFungi",
11+
"EnsemblMetazoa",
12+
"EnsemblPlants",
13+
"EnsemblProtists",
14+
"embl-cds",
15+
"EMBL_CON",
16+
"EMBL_TPA",
17+
"EMBL_TSA",
18+
"EMBLWGS",
19+
"Ensembl",
20+
"EnsemblRapid",
21+
"EPO",
22+
"FlyBase",
23+
"FusionGDB",
24+
"H-InvDB",
25+
"IPI",
26+
"JPO",
27+
"KIPO",
28+
"PATRIC",
29+
"PDB",
30+
"PIR",
31+
"PIRARC",
32+
"PRF",
33+
"RefSeq",
34+
"REMTREMBL",
35+
"SEED",
36+
"SGD",
37+
"UniProt",
38+
"isoforms",
39+
"TAIR",
40+
"TREMBLNEW",
41+
"TREMBL_VARSPLIC",
42+
"TROME",
43+
"UNIMES",
44+
"USPTO",
45+
"VectorBase",
46+
"VEGA",
47+
"WBParaSite",
48+
"WormBase",
49+
]
50+
Active: TypeAlias = Literal[
51+
"EnsemblBacteria",
52+
"EnsemblFungi",
53+
"EnsemblMetazoa",
54+
"EnsemblPlants",
55+
"EnsemblProtists",
56+
"embl-cds",
57+
"EMBL_CON",
58+
"EMBL_TSA",
59+
"EMBLWGS",
60+
"Ensembl",
61+
"EnsemblRapid",
62+
"EPO",
63+
"FlyBase",
64+
"FusionGDB",
65+
"JPO",
66+
"KIPO",
67+
"PATRIC",
68+
"PDB",
69+
"RefSeq",
70+
"SEED",
71+
"SGD",
72+
"UniProt",
73+
"isoforms",
74+
"TAIR",
75+
"TROME",
76+
"USPTO",
77+
"VEGA",
78+
"WBParaSite",
79+
"WormBase",
80+
]
81+
882

983
class UniparcQueryDict(TypedDict):
1084
and_: NotRequired[Iterable["UniparcQuery"]]
@@ -22,19 +96,19 @@ class UniparcQueryDict(TypedDict):
2296
upid: NotRequired[str]
2397
"Proteome ID\ne.g. UP123456789"
2498
taxonomy_name: NotRequired[str]
25-
"Taxonomy [OC]\ne.g. sample name"
99+
"Taxonomy [OC]\ne.g. Human"
26100
taxonomy_id: NotRequired[str]
27101
"Taxonomy id"
28102
gene: NotRequired[str]
29-
"Gene name [GN]\ne.g. sample gene"
103+
"Gene name [GN]\ne.g. PROZ"
30104
protein: NotRequired[str]
31-
"Protein name\ne.g. sample protein"
32-
database: NotRequired[str]
33-
"Database\ne.g. sample database\n* EnsemblBacteria: EnsemblBacteria\n* EnsemblFungi: EnsemblFungi\n* EnsemblMetazoa: EnsemblMetazoa\n* EnsemblPlants: EnsemblPlants\n* EnsemblProtists: EnsemblProtists\n* embl-cds: EMBL CDS\n* EMBL_CON: EMBL_CON\n* EMBL_TPA: EMBL_TPA\n* EMBL_TSA: EMBL_TSA\n* EMBLWGS: EMBLWGS\n* Ensembl: Ensembl\n* EnsemblRapid: EnsemblRapid\n* EPO: EPO\n* FlyBase: FlyBase\n* FusionGDB: FusionGDB\n* H-InvDB: H-InvDB\n* IPI: IPI\n* JPO: JPO\n* KIPO: KIPO\n* PATRIC: PATRIC\n* PDB: PDB\n* PIR: PIR\n* PIRARC: PIRARC\n* PRF: PRF\n* RefSeq: RefSeq\n* REMTREMBL: REMTREMBL\n* SEED: SEED\n* SGD: SGD\n* UniProt: UniProtKB\n* isoforms: UniProtKB/Swiss-Prot isoforms\n* TAIR: TAIR\n* TREMBLNEW: TREMBLNEW\n* TREMBL_VARSPLIC: TREMBL_VARSPLIC\n* TROME: TROME\n* UNIMES: UNIMES\n* USPTO: USPTO\n* VectorBase: VectorBase\n* VEGA: VEGA\n* WBParaSite: WBParaSite\n* WormBase: WormBase"
34-
active: NotRequired[str]
35-
"Active\ne.g. sample active\n* EnsemblBacteria: EnsemblBacteria\n* EnsemblFungi: EnsemblFungi\n* EnsemblMetazoa: EnsemblMetazoa\n* EnsemblPlants: EnsemblPlants\n* EnsemblProtists: EnsemblProtists\n* embl-cds: EMBL CDS\n* EMBL_CON: EMBL_CON\n* EMBL_TSA: EMBL_TSA\n* EMBLWGS: EMBLWGS\n* Ensembl: Ensembl\n* EnsemblRapid: EnsemblRapid\n* EPO: EPO\n* FlyBase: FlyBase\n* FusionGDB: FusionGDB\n* JPO: JPO\n* KIPO: KIPO\n* PATRIC: PATRIC\n* PDB: PDB\n* RefSeq: RefSeq\n* SEED: SEED\n* SGD: SGD\n* UniProt: UniProtKB\n* isoforms: UniProtKB/Swiss-Prot isoforms\n* TAIR: TAIR\n* TROME: TROME\n* USPTO: USPTO\n* VEGA: VEGA\n* WBParaSite: WBParaSite\n* WormBase: WormBase"
105+
"Protein name\ne.g. Protein Z"
106+
database: NotRequired[Database]
107+
"Database\ne.g. Gene3D\n* EnsemblBacteria: EnsemblBacteria\n* EnsemblFungi: EnsemblFungi\n* EnsemblMetazoa: EnsemblMetazoa\n* EnsemblPlants: EnsemblPlants\n* EnsemblProtists: EnsemblProtists\n* embl-cds: EMBL CDS\n* EMBL_CON: EMBL_CON\n* EMBL_TPA: EMBL_TPA\n* EMBL_TSA: EMBL_TSA\n* EMBLWGS: EMBLWGS\n* Ensembl: Ensembl\n* EnsemblRapid: EnsemblRapid\n* EPO: EPO\n* FlyBase: FlyBase\n* FusionGDB: FusionGDB\n* H-InvDB: H-InvDB\n* IPI: IPI\n* JPO: JPO\n* KIPO: KIPO\n* PATRIC: PATRIC\n* PDB: PDB\n* PIR: PIR\n* PIRARC: PIRARC\n* PRF: PRF\n* RefSeq: RefSeq\n* REMTREMBL: REMTREMBL\n* SEED: SEED\n* SGD: SGD\n* UniProt: UniProtKB\n* isoforms: UniProtKB/Swiss-Prot isoforms\n* TAIR: TAIR\n* TREMBLNEW: TREMBLNEW\n* TREMBL_VARSPLIC: TREMBL_VARSPLIC\n* TROME: TROME\n* UNIMES: UNIMES\n* USPTO: USPTO\n* VectorBase: VectorBase\n* VEGA: VEGA\n* WBParaSite: WBParaSite\n* WormBase: WormBase"
108+
active: NotRequired[Active]
109+
"Active\ne.g. Gene3D\n* EnsemblBacteria: EnsemblBacteria\n* EnsemblFungi: EnsemblFungi\n* EnsemblMetazoa: EnsemblMetazoa\n* EnsemblPlants: EnsemblPlants\n* EnsemblProtists: EnsemblProtists\n* embl-cds: EMBL CDS\n* EMBL_CON: EMBL_CON\n* EMBL_TSA: EMBL_TSA\n* EMBLWGS: EMBLWGS\n* Ensembl: Ensembl\n* EnsemblRapid: EnsemblRapid\n* EPO: EPO\n* FlyBase: FlyBase\n* FusionGDB: FusionGDB\n* JPO: JPO\n* KIPO: KIPO\n* PATRIC: PATRIC\n* PDB: PDB\n* RefSeq: RefSeq\n* SEED: SEED\n* SGD: SGD\n* UniProt: UniProtKB\n* isoforms: UniProtKB/Swiss-Prot isoforms\n* TAIR: TAIR\n* TROME: TROME\n* USPTO: USPTO\n* VEGA: VEGA\n* WBParaSite: WBParaSite\n* WormBase: WormBase"
36110
checksum: NotRequired[str]
37-
"Checksum (CRC64/MD5)\ne.g. sample checksum"
111+
"Checksum (CRC64/MD5)\ne.g. B8824CE1ECAEEEAE"
38112
length: NotRequired[
39113
tuple[
40114
Union[
@@ -75,7 +149,7 @@ class UniparcQueryDict(TypedDict):
75149
"SFLD",
76150
"SMART",
77151
"SUPFAM",
78-
"TIGRFAMs",
152+
"NCBIfam",
79153
]
80154
UniparcFields: TypeAlias = Literal[
81155
UniparcNamesTaxonomy,

unipressed/dataset/generated_types/uniprotkb.py

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
Existence: TypeAlias = Literal["1", "2", "3", "4", "5"]
99
Organelle: TypeAlias = Literal[
1010
"mitochondrion",
11+
"plasmid",
1112
"plastid",
1213
"chloroplast",
1314
"cyanelle",
@@ -245,7 +246,7 @@ class UniprotkbQueryDict(TypedDict):
245246
cc_subunit_exp: NotRequired[str]
246247
"Cc subunit exp\ne.g. homodimer"
247248
structure_3d: NotRequired[bool]
248-
"3D Structure\ne.g. true\n* true: Yes\n* false: No"
249+
"3D Structure\ne.g. true"
249250
ft_secstruct: NotRequired[str]
250251
"Ft secstruct\ne.g. *"
251252
ft_secstruct_exp: NotRequired[str]
@@ -375,11 +376,11 @@ class UniprotkbQueryDict(TypedDict):
375376
ft_positional_exp: NotRequired[str]
376377
"Ft positional exp\ne.g. colorectal"
377378
fragment: NotRequired[bool]
378-
"Fragment\ne.g. true\n* true: Yes\n* false: No"
379+
"Fragment\ne.g. true"
379380
organelle: NotRequired[Organelle]
380-
"Encoded in\ne.g. mitochondrion\n* mitochondrion: Mitochondrion\n* plastid: Plastid\n* chloroplast: Chloroplast\n* cyanelle: Cyanelle\n* apicoplast: Apicoplast\n* organellar chromatophore: Organellar chromatophore\n* non-photosynthetic plastid: Non-photosynthetic plastid\n* nucleomorph: Nucleomorph\n* hydrogenosome: Hydrogenosome"
381+
"Encoded in\ne.g. mitochondrion\n* mitochondrion: Mitochondrion\n* plasmid: Plasmid\n* plastid: Plastid\n* chloroplast: Chloroplast\n* cyanelle: Cyanelle\n* apicoplast: Apicoplast\n* organellar chromatophore: Organellar chromatophore\n* non-photosynthetic plastid: Non-photosynthetic plastid\n* nucleomorph: Nucleomorph\n* hydrogenosome: Hydrogenosome"
381382
precursor: NotRequired[bool]
382-
"Precursor\ne.g. true\n* true: Yes\n* false: No"
383+
"Precursor\ne.g. true"
383384
tissue: NotRequired[str]
384385
"Tissue\ne.g. head"
385386
strain: NotRequired[str]
@@ -403,9 +404,9 @@ class UniprotkbQueryDict(TypedDict):
403404
ft_coiled_exp: NotRequired[str]
404405
"Ft coiled exp\ne.g. *"
405406
ft_compbias: NotRequired[str]
406-
"Ft compbias\ne.g. glu-rich"
407+
"Ft compbias\ne.g. basic residues"
407408
ft_compbias_exp: NotRequired[str]
408-
"Ft compbias exp\ne.g. glu-rich"
409+
"Ft compbias exp\ne.g. basic residues"
409410
ft_motif: NotRequired[str]
410411
"Ft motif\ne.g. motif"
411412
ft_motif_exp: NotRequired[str]
@@ -561,9 +562,9 @@ class UniprotkbQueryDict(TypedDict):
561562
scope: NotRequired[str]
562563
"Cited for\ne.g. microtubule"
563564
reviewed: NotRequired[bool]
564-
"Reviewed\ne.g. true\n* true: Yes\n* false: No"
565+
"Reviewed\ne.g. true"
565566
active: NotRequired[bool]
566-
"Active\ne.g. true\n* true: Yes\n* false: No"
567+
"Active\ne.g. true"
567568
uniref_cluster_50: NotRequired[str]
568569
"UniRef50\ne.g. UniRef50_P05067"
569570
uniref_cluster_90: NotRequired[str]
@@ -677,7 +678,7 @@ class UniprotkbQueryDict(TypedDict):
677678
UniprotkbStructure: TypeAlias = Literal[
678679
"structure_3d", "ft_strand", "ft_helix", "ft_turn"
679680
]
680-
UniprotkbPublications: TypeAlias = Literal["lit_pubmed_id",]
681+
UniprotkbPublications: TypeAlias = Literal["lit_pubmed_id", "lit_doi_id"]
681682
UniprotkbDateOf: TypeAlias = Literal[
682683
"date_created", "date_modified", "date_sequence_modified", "version"
683684
]
@@ -690,14 +691,16 @@ class UniprotkbQueryDict(TypedDict):
690691
"protein_families",
691692
"ft_region",
692693
"ft_repeat",
694+
"cc_similarity",
693695
"ft_zn_fing",
694696
]
695697
UniprotkbSequence: TypeAlias = Literal[
696-
"xref_ccds", "xref_embl", "xref_pir", "xref_refseq"
698+
"xref_ccds", "xref_embl", "xref_generif", "xref_pir", "xref_refseq"
697699
]
698700
UniprotkbThreedStructure: TypeAlias = Literal[
699701
"xref_alphafolddb",
700702
"xref_bmrb",
703+
"xref_emdb",
701704
"xref_pcddb",
702705
"xref_pdb",
703706
"xref_pdbsum",
@@ -749,7 +752,7 @@ class UniprotkbQueryDict(TypedDict):
749752
"xref_iptmnet",
750753
]
751754
UniprotkbPolymorphismAndMutation: TypeAlias = Literal[
752-
"xref_biomuta", "xref_dmdm", "xref_dbsnp"
755+
"xref_alzforum", "xref_biomuta", "xref_dmdm", "xref_dbsnp"
753756
]
754757
UniprotkbTwodGel: TypeAlias = Literal[
755758
"xref_compluyeast-2dpage",
@@ -770,6 +773,7 @@ class UniprotkbQueryDict(TypedDict):
770773
"xref_peptideatlas",
771774
"xref_promex",
772775
"xref_proteomicsdb",
776+
"xref_pumba",
773777
"xref_topdownproteomics",
774778
"xref_jpost",
775779
]
@@ -791,7 +795,6 @@ class UniprotkbQueryDict(TypedDict):
791795
"xref_ucsc",
792796
"xref_vectorbase",
793797
"xref_wbparasite",
794-
"xref_wbparasitetranscriptprotein",
795798
]
796799
UniprotkbOrganismSpecific: TypeAlias = Literal[
797800
"xref_agr",
@@ -807,6 +810,8 @@ class UniprotkbQueryDict(TypedDict):
807810
"xref_genereviews",
808811
"xref_hgnc",
809812
"xref_hpa",
813+
"xref_ic4r",
814+
"xref_japonicusdb",
810815
"xref_legiolist",
811816
"xref_leproma",
812817
"xref_mgi",
@@ -860,10 +865,14 @@ class UniprotkbQueryDict(TypedDict):
860865
"xref_evolutionarytrace",
861866
"xref_genewiki",
862867
"xref_genomernai",
868+
"xref_orcid",
869+
"xref_pgenn",
863870
"xref_phi-base",
864871
"xref_pro",
865872
"xref_pharos",
873+
"xref_pubtator",
866874
"xref_rnact",
875+
"xref_emind",
867876
]
868877
UniprotkbGeneExpression: TypeAlias = Literal[
869878
"xref_bgee",
@@ -879,16 +888,15 @@ class UniprotkbQueryDict(TypedDict):
879888
"xref_hamap",
880889
"xref_ideal",
881890
"xref_interpro",
891+
"xref_ncbifam",
882892
"xref_panther",
883893
"xref_pirsf",
884894
"xref_prints",
885895
"xref_prosite",
886896
"xref_pfam",
887-
"xref_prodom",
888897
"xref_sfld",
889898
"xref_smart",
890899
"xref_supfam",
891-
"xref_tigrfams",
892900
]
893901
UniprotkbFields: TypeAlias = Literal[
894902
UniprotkbNamesTaxonomy,

0 commit comments

Comments
 (0)