openprotein-python 0.5.2__py3-none-any.whl → 0.5.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- openprotein/__init__.py +1 -1
- openprotein/schemas/job.py +6 -1
- {openprotein_python-0.5.2.dist-info → openprotein_python-0.5.4.dist-info}/METADATA +1 -1
- {openprotein_python-0.5.2.dist-info → openprotein_python-0.5.4.dist-info}/RECORD +6 -7
- openprotein/auth.py +0 -21
- {openprotein_python-0.5.2.dist-info → openprotein_python-0.5.4.dist-info}/WHEEL +0 -0
- {openprotein_python-0.5.2.dist-info → openprotein_python-0.5.4.dist-info}/licenses/LICENSE.txt +0 -0
openprotein/__init__.py
CHANGED
openprotein/schemas/job.py
CHANGED
|
@@ -30,6 +30,11 @@ class JobType(str, Enum):
|
|
|
30
30
|
|
|
31
31
|
align_align = "/align/align"
|
|
32
32
|
align_prompt = "/align/prompt"
|
|
33
|
+
|
|
34
|
+
clustalo = "/align/clustalo"
|
|
35
|
+
mafft = "/align/mafft"
|
|
36
|
+
abnumber = "/align/abnumber"
|
|
37
|
+
|
|
33
38
|
poet = "/poet"
|
|
34
39
|
poet_score = "/poet/score"
|
|
35
40
|
poet_single_site = "/poet/single_site"
|
|
@@ -105,7 +110,7 @@ class Job(BaseModel):
|
|
|
105
110
|
job_classes = Job.__subclasses__()
|
|
106
111
|
job = TypeAdapter(Union[tuple(job_classes)]).validate_python(d | kwargs) # type: ignore
|
|
107
112
|
except Exception as e:
|
|
108
|
-
|
|
113
|
+
job = Job.model_validate(d | kwargs)
|
|
109
114
|
return job # type: ignore - static checker cannot know runtime type
|
|
110
115
|
|
|
111
116
|
# hide extra allowed fields
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
openprotein/__init__.py,sha256=
|
|
1
|
+
openprotein/__init__.py,sha256=Bj0JWfpTY0dqBIk8OKU0Qq_0xks7SPiznHwc-SkDwFY,4198
|
|
2
2
|
openprotein/_version.py,sha256=QftQV7N-tBG04FM0XxsSZ6LxK2mTZxrkw4ipjVcL_2s,215
|
|
3
|
-
openprotein/auth.py,sha256=JgQpGcEhJP-8NLxbhOLjrj5wGYvBdPVgQ8_YQBWAB-c,803
|
|
4
3
|
openprotein/base.py,sha256=mFl7xcwzWiFvizuIzKysVTstZiDrC4P9MWMslx07WQA,3930
|
|
5
4
|
openprotein/config.py,sha256=f0ueMjXZ4SRPSKXDQlU2Ra6UES_JvAAcoYCh3i7N_9o,171
|
|
6
5
|
openprotein/csv.py,sha256=v6WSvaVW54vkGIx45vn7X-AgiHZHOXXHwugBi5w1FKI,592
|
|
@@ -74,7 +73,7 @@ openprotein/schemas/designer.py,sha256=rxhaXiAQTWF9zASoN-puY2gWUnOs2wduCuJjw1yZq
|
|
|
74
73
|
openprotein/schemas/embeddings.py,sha256=YpHJ46Qx0xox46LyyEdMc6iBfk4OP-_DtHJtNGOV-Bw,2176
|
|
75
74
|
openprotein/schemas/features.py,sha256=RpRBEwJ4oB18jGeJFjyXyvphcCa4SyXnduXk1D57Tbc,87
|
|
76
75
|
openprotein/schemas/fold.py,sha256=izLG-qTKWLsTeT4XlloFuWnRjdINZb44r6mcCKpJJJ0,185
|
|
77
|
-
openprotein/schemas/job.py,sha256=
|
|
76
|
+
openprotein/schemas/job.py,sha256=koqGBfVqyd8-HlEZrJoAKMhGM91yQgO63jCrm5HJlMU,3904
|
|
78
77
|
openprotein/schemas/predict.py,sha256=SZ3iWcM6vBfw2gVy229sfoGXLzQwGY3VNpPWx87nZJM,1931
|
|
79
78
|
openprotein/schemas/predictor.py,sha256=Juq8IkXoZcgKf-i8vce3Hw9UUqShrMJUfdIy3tIJnAM,1493
|
|
80
79
|
openprotein/schemas/svd.py,sha256=yIj14WyZusjy_ZYwKRBvfwN574fuaMdG5nn6iSNWsjA,668
|
|
@@ -82,7 +81,7 @@ openprotein/schemas/train.py,sha256=KVhVW1ZKWZ4RweBOXhxLH-vvkeDEHmMdwcrweTs2J5E,
|
|
|
82
81
|
openprotein/schemas/umap.py,sha256=Hfg_NwVTRv5uZHEWFYEx73IuZLMUJ50KBsbdsxMH8L4,792
|
|
83
82
|
openprotein/schemas/deprecated/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
84
83
|
openprotein/schemas/deprecated/poet.py,sha256=bWprjLIC7cSCNSMMTco0BGJ3lMCTH9R2X_bSr8BQLZY,1918
|
|
85
|
-
openprotein_python-0.5.
|
|
86
|
-
openprotein_python-0.5.
|
|
87
|
-
openprotein_python-0.5.
|
|
88
|
-
openprotein_python-0.5.
|
|
84
|
+
openprotein_python-0.5.4.dist-info/METADATA,sha256=LxOHaZcSNXZNWjQEI1fM32vbArj8gL0qTTymxbn1H1w,7348
|
|
85
|
+
openprotein_python-0.5.4.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
86
|
+
openprotein_python-0.5.4.dist-info/licenses/LICENSE.txt,sha256=amMkJEL2uNWuwaaj25UfyZ37g-KwGF7E3ingj7_Xu4A,1543
|
|
87
|
+
openprotein_python-0.5.4.dist-info/RECORD,,
|
openprotein/auth.py
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
from openprotein.base import APISession
|
|
2
|
-
from openprotein.errors import AuthError, HTTPError
|
|
3
|
-
|
|
4
|
-
PATH_PREFIX = "v1/login"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
def get_auth_token(session: APISession, username: str, password: str) -> str:
|
|
8
|
-
endpoint = PATH_PREFIX + "/access-token"
|
|
9
|
-
body = {"username": username, "password": password}
|
|
10
|
-
try:
|
|
11
|
-
response = session.post(endpoint, data=body, timeout=3)
|
|
12
|
-
except HTTPError as e:
|
|
13
|
-
# if an error occured during auth, we raise an AuthError with reference to the HTTPError
|
|
14
|
-
raise AuthError(
|
|
15
|
-
f"Authentication failed. Please check your credentials and connection."
|
|
16
|
-
) from e
|
|
17
|
-
result = response.json()
|
|
18
|
-
token = result.get("access_token")
|
|
19
|
-
if token is None:
|
|
20
|
-
raise AuthError("Unable to authenticate with given credentials.")
|
|
21
|
-
return token
|
|
File without changes
|
{openprotein_python-0.5.2.dist-info → openprotein_python-0.5.4.dist-info}/licenses/LICENSE.txt
RENAMED
|
File without changes
|