Skip to content

Commit a6470ed

Browse files
committed
fix: add missing dependencies
1 parent e37416c commit a6470ed

11 files changed

+43
-12
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -172,3 +172,5 @@ cython_debug/
172172

173173
# PyPI configuration file
174174
.pypirc
175+
176+
.idea

.idea/jaqpot-python-sdk.iml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/material_theme_project_new.xml

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/ruff.xml

-7
This file was deleted.

.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+5-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,11 @@ classifiers = [
2525
"Programming Language :: Python :: Implementation :: PyPy",
2626
]
2727
dependencies = [
28-
"jaqpot-api-client==6.42.3",
29-
"polling2"
28+
"jaqpot-api-client>=6.42.3",
29+
"polling2",
30+
"pydantic",
31+
"python-dateutil",
32+
"urllib3"
3033
]
3134

3235
[project.urls]

requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
jaqpot-api-client
22
polling2
3+
pydantic

src/jaqpot_python_sdk/jaqpot_api_client.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import polling2
22
import os
33

4+
from .patches.patched_dataset import PatchedDataset as Dataset
45
from jaqpot_api_client import Model
56
from jaqpot_api_client import (
67
ModelApi,
78
DatasetApi,
8-
Dataset,
99
DatasetType,
1010
DatasetCSV,
1111
)
12+
from pydantic import field_validator
1213
from .exceptions.exceptions import (
1314
JaqpotApiException,
1415
JaqpotPredictionTimeoutException,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from jaqpot_api_client import Dataset
2+
from pydantic import field_validator
3+
4+
5+
class PatchedDataset(Dataset):
6+
@field_validator('result_types', mode='before')
7+
def set_default_result_types(cls, value):
8+
return value if value is not None else {}

test.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from src.jaqpot_python_sdk.jaqpot_api_client import JaqpotApiClient
2+
3+
jaqpot_api_client = JaqpotApiClient()
4+
5+
prediction = jaqpot_api_client.qsartoolbox_qsar_model_predict_sync('CC', '111bb39c-c97c-4f54-b1de-327a230a8a0c')
6+
7+
print(prediction)

0 commit comments

Comments
 (0)