diff --git a/examples/example_classification_StringLabels.py b/examples/example_classification_StringLabels.py index 5a31595d..8e164ccf 100644 --- a/examples/example_classification_StringLabels.py +++ b/examples/example_classification_StringLabels.py @@ -14,7 +14,6 @@ ) from jaqpotpy.datasets import JaqpotpyDataset from jaqpotpy.models import SklearnModel -from jaqpotpy.doa import Leverage from jaqpotpy import Jaqpot path = "jaqpotpy/test_data/test_data_smiles_CATEGORICAL_classification_LABELS_new.csv" @@ -73,7 +72,6 @@ print(cross_val_scores["output_0"]["fold_1"]["confusionMatrix"]) print(cross_val_scores["output_0"]["fold_3"]["confusionMatrix"]) - # skl_predictions = molecularModel_t1.predict(prediction_dataset) # # skl_probabilities = molecularModel_t1.predict_proba(prediction_dataset) # onnx_predictions = molecularModel_t1.predict_onnx(prediction_dataset) diff --git a/examples/one_hot_encoding_example.py b/examples/one_hot_encoding_example.py index 0565ce53..57fb801f 100644 --- a/examples/one_hot_encoding_example.py +++ b/examples/one_hot_encoding_example.py @@ -9,7 +9,6 @@ ) from jaqpotpy.datasets import JaqpotpyDataset from jaqpotpy.models import SklearnModel -from jaqpotpy.doa import Leverage from jaqpotpy import Jaqpot path = "jaqpotpy/test_data/test_data_smiles_CATEGORICAL_classification.csv" @@ -40,7 +39,6 @@ remainder="passthrough", ) - model = RandomForestClassifier(random_state=42) molecularModel_t1 = SklearnModel( dataset=dataset, diff --git a/examples/onnx_example_classification.py b/examples/onnx_example_classification.py index 1faf0d4b..7399d28b 100644 --- a/examples/onnx_example_classification.py +++ b/examples/onnx_example_classification.py @@ -9,7 +9,9 @@ from jaqpotpy.doa import Leverage, BoundingBox, MeanVar from jaqpotpy import Jaqpot -path = "jaqpotpy/test_data/test_data_smiles_CATEGORICAL_classification_LABELS_new.csv" +path = ( + "../jaqpotpy/test_data/test_data_smiles_CATEGORICAL_classification_LABELS_new.csv" +) df = pd.read_csv(path).iloc[0:100, :] smiles_cols = ["SMILES"] @@ -42,7 +44,7 @@ ) molecularModel_t1.fit() -pred_path = "./jaqpotpy/test_data/test_data_smiles_categorical_prediction_dataset.csv" +pred_path = "../jaqpotpy/test_data/test_data_smiles_categorical_prediction_dataset.csv" test_dataset = pd.read_csv(pred_path) prediction_dataset = JaqpotpyDataset( @@ -69,20 +71,20 @@ # print("ONNX Probabilities:", onnx_probs) # Upload locally -# jaqpot = Jaqpot( -# base_url="http://localhost.jaqpot.org", -# app_url="http://localhost.jaqpot.org:3000", -# login_url="http://localhost.jaqpot.org:8070", -# api_url="http://localhost.jaqpot.org:8080", -# keycloak_realm="jaqpot-local", -# keycloak_client_id="jaqpot-local-test", -# ) +jaqpot = Jaqpot( + base_url="http://localhost.jaqpot.org", + app_url="http://localhost.jaqpot.org:3000", + login_url="http://localhost.jaqpot.org:8070", + api_url="http://localhost.jaqpot.org:8080", + keycloak_realm="jaqpot-local", + keycloak_client_id="jaqpot-local-test", +) # jaqpot = Jaqpot() -# jaqpot.login() -# molecularModel_t1.deploy_on_jaqpot( -# jaqpot=jaqpot, -# name="Demo: Regression topological and minmax scaler on y", -# description="Test", -# visibility="PRIVATE", -# ) +jaqpot.login() +molecularModel_t1.deploy_on_jaqpot( + jaqpot=jaqpot, + name="Demo: Regression topological and minmax scaler on y", + description="Test", + visibility="PRIVATE", +) diff --git a/examples/sdk_testing.py b/examples/sdk_testing.py index d1c6c1eb..62d3323e 100644 --- a/examples/sdk_testing.py +++ b/examples/sdk_testing.py @@ -6,48 +6,48 @@ jaqpot = JaqpotApiClient() # Get a model by id -model = jaqpot.get_model_by_id(model_id=1691) # 1812) +model = jaqpot.get_model_by_id(model_id=1860) # 1812) print(model) -# +# # # Get model summary # model_summary = jaqpot.get_model_summary(model_id=1691) # print(model_summary) -# +# # # Get shared models with organization # shared_models = jaqpot.get_shared_models() # print(shared_models) -# +# # # # Take a synchronous prediction with a model -# input_data = [{"SMILES": "CC", "X1": 1, "X2": 2}] -# prediction = jaqpot.predict_sync(model_id=1852, dataset=input_data) -# print(prediction) -# +input_data = [{"SMILES": "CC", "X1": 1, "X2": 2, "Cat_col": "CAT_1"}] +prediction = jaqpot.predict_sync(model_id=1853, dataset=input_data) +print(prediction) +# # # Take an asynchronous prediction with a model # input_data = [{"SMILES": "CC", "X1": 1, "X2": 2}] # prediction = jaqpot.predict_async(model_id=1812, dataset=input_data) -# +# # # Take prediction with a model and a csv file # csv_path = "/Users/vassilis/Desktop/test_csv.csv" # prediction = jaqpot.predict_with_csv_sync(model_id=1812, csv_path=csv_path) # print(prediction) -# -# +# +# # # Testing QsarToolBox # get_model = jaqpot.get_model_by_id(model_id=6) # print(get_model) -# +# # # Test QsarToolBox calculator # prediction = jaqpot.qsartoolbox_calculator_predict_sync( # smiles="CC", calculator_guid="1804a854-9041-4495-9931-7414c22a5e49" # ) # print(prediction) -# +# # # Test QsarToolBox Model # prediction = jaqpot.qsartoolbox_qsar_model_predict_sync( # smiles="CC", qsar_guid="c377150b-77ae-4f99-be14-357b85dd8d1f" # ) # print(prediction) -# +# # # Test QsarToolBox Profiler # prediction = jaqpot.qsartoolbox_profiler_predict_sync( # smiles="CC", profiler_guid="723eb011-3e5b-4565-9358-4c3d8620ba5d" diff --git a/examples/upload_on_jaqpot_example.py b/examples/upload_on_jaqpot_example.py index c7414d70..870cb669 100644 --- a/examples/upload_on_jaqpot_example.py +++ b/examples/upload_on_jaqpot_example.py @@ -1,15 +1,14 @@ import pandas as pd +from jaqpotpy.doa import Leverage, MeanVar, BoundingBox from sklearn.ensemble import RandomForestRegressor from sklearn.preprocessing import StandardScaler, MinMaxScaler from jaqpotpy.descriptors.molecular import TopologicalFingerprint, MordredDescriptors from jaqpotpy.datasets import JaqpotpyDataset from jaqpotpy.models import SklearnModel -from jaqpotpy.doa import Leverage -from jaqpotpy.models.preprocessing import Preprocess from jaqpotpy import Jaqpot -path = "./jaqpotpy/test_data/test_data_smiles_regression.csv" +path = "../jaqpotpy/test_data/test_data_smiles_regression.csv" df = pd.read_csv(path).iloc[0:100, :] smiles_cols = ["SMILES"] @@ -24,15 +23,15 @@ task="regression", featurizer=featurizer, ) -pre = Preprocess() # pre.register_preprocess_class("Standard Scaler", StandardScaler()) # pre.register_preprocess_class_y("minmax_y", MinMaxScaler()) model = RandomForestRegressor(random_state=42) -doa_method = Leverage() -molecularModel_t1 = SklearnModel( - dataset=dataset, doa=None, model=model, preprocessor=None, cv=None -) +doa_methods = [] +doa_methods.append(Leverage()) +doa_methods.append(MeanVar()) +doa_methods.append(BoundingBox()) +molecularModel_t1 = SklearnModel(dataset=dataset, doa=doa_methods, model=model) molecularModel_t1.fit() # # # print(molecularModel_t1.transformers_y) @@ -76,17 +75,17 @@ # print(df_predictions) -# # # # Upload locally -# # jaqpot = Jaqpot( -# # base_url="http://localhost.jaqpot.org", -# # app_url="http://localhost.jaqpot.org:3000", -# # login_url="http://localhost.jaqpot.org:8070", -# # api_url="http://localhost.jaqpot.org:8080", -# # keycloak_realm="jaqpot-local", -# # keycloak_client_id="jaqpot-local-test", -# # ) +# Upload locally +jaqpot = Jaqpot( + base_url="http://localhost.jaqpot.org", + app_url="http://localhost.jaqpot.org:3000", + login_url="http://localhost.jaqpot.org:8070", + api_url="http://localhost.jaqpot.org:8080", + keycloak_realm="jaqpot-local", + keycloak_client_id="jaqpot-local-test", +) -jaqpot = Jaqpot() +# jaqpot = Jaqpot() jaqpot.login() molecularModel_t1.deploy_on_jaqpot( jaqpot=jaqpot, diff --git a/jaqpotpy/api/jaqpot_api_client.py b/jaqpotpy/api/jaqpot_api_client.py index 329c696b..a0231aca 100644 --- a/jaqpotpy/api/jaqpot_api_client.py +++ b/jaqpotpy/api/jaqpot_api_client.py @@ -29,10 +29,10 @@ class JaqpotApiClient: def __init__( - self, - base_url=None, - api_url=None, - create_logs=False, + self, + base_url=None, + api_url=None, + create_logs=False, ): # logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.INFO) self.log = init_logger( @@ -247,7 +247,7 @@ def _get_dataset_with_polling(self, response): try: polling2.poll( lambda: self.get_dataset_by_id(dataset_id).status - in ["SUCCESS", "FAILURE"], + in ["SUCCESS", "FAILURE"], step=3, timeout=60, ) diff --git a/jaqpotpy/api/jaqpot_api_client_builder.py b/jaqpotpy/api/jaqpot_api_client_builder.py index bc7d9d4c..31b1efb1 100644 --- a/jaqpotpy/api/jaqpot_api_client_builder.py +++ b/jaqpotpy/api/jaqpot_api_client_builder.py @@ -11,7 +11,7 @@ def build_with_access_token(self, access_token): def build_with_api_keys(self, api_key, api_secret): if api_key is None or api_secret is None: - raise ValueError('api_key and api_secret must be set') + raise ValueError("api_key and api_secret must be set") self.http_client.set_default_header("X-Api-Key", api_key) self.http_client.set_default_header("X-Api-Secret", api_secret) return self diff --git a/jaqpotpy/api/openapi/.github/workflows/python.yml b/jaqpotpy/api/openapi/.github/workflows/python.yml deleted file mode 100644 index bbaa1734..00000000 --- a/jaqpotpy/api/openapi/.github/workflows/python.yml +++ /dev/null @@ -1,38 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: jaqpotpy.api.openapi Python package - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pytest diff --git a/jaqpotpy/api/openapi/.gitignore b/jaqpotpy/api/openapi/.gitignore deleted file mode 100644 index 43995bd4..00000000 --- a/jaqpotpy/api/openapi/.gitignore +++ /dev/null @@ -1,66 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -*.egg-info/ -.installed.cfg -*.egg - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*,cover -.hypothesis/ -venv/ -.venv/ -.python-version -.pytest_cache - -# Translations -*.mo -*.pot - -# Django stuff: -*.log - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -#Ipython Notebook -.ipynb_checkpoints diff --git a/jaqpotpy/api/openapi/.gitlab-ci.yml b/jaqpotpy/api/openapi/.gitlab-ci.yml deleted file mode 100644 index 99519d48..00000000 --- a/jaqpotpy/api/openapi/.gitlab-ci.yml +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.gitlab.com/ee/ci/README.html -# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml - -stages: - - test - -.pytest: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=jaqpotpy.api.openapi - -pytest-3.7: - extends: .pytest - image: python:3.7-alpine -pytest-3.8: - extends: .pytest - image: python:3.8-alpine -pytest-3.9: - extends: .pytest - image: python:3.9-alpine -pytest-3.10: - extends: .pytest - image: python:3.10-alpine -pytest-3.11: - extends: .pytest - image: python:3.11-alpine diff --git a/jaqpotpy/api/openapi/.openapi-generator-ignore b/jaqpotpy/api/openapi/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/jaqpotpy/api/openapi/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/jaqpotpy/api/openapi/.openapi-generator/FILES b/jaqpotpy/api/openapi/.openapi-generator/FILES deleted file mode 100644 index e5dfb0dd..00000000 --- a/jaqpotpy/api/openapi/.openapi-generator/FILES +++ /dev/null @@ -1,136 +0,0 @@ -.github/workflows/python.yml -.gitignore -.gitlab-ci.yml -.openapi-generator-ignore -.travis.yml -README.md -docs/AuthApi.md -docs/CreateInvitationsRequest.md -docs/Dataset.md -docs/DatasetApi.md -docs/DatasetCSV.md -docs/DatasetType.md -docs/ErrorCode.md -docs/ErrorResponse.md -docs/Feature.md -docs/FeatureApi.md -docs/FeaturePossibleValue.md -docs/FeatureType.md -docs/GetDatasets200Response.md -docs/GetModels200Response.md -docs/Lead.md -docs/LeadApi.md -docs/Library.md -docs/Model.md -docs/ModelApi.md -docs/ModelExtraConfig.md -docs/ModelSummary.md -docs/ModelTask.md -docs/ModelType.md -docs/ModelVisibility.md -docs/Organization.md -docs/OrganizationApi.md -docs/OrganizationInvitation.md -docs/OrganizationInvitationApi.md -docs/OrganizationSummary.md -docs/OrganizationUser.md -docs/OrganizationUserAssociationType.md -docs/OrganizationVisibility.md -docs/PartialUpdateOrganizationRequest.md -docs/PartiallyUpdateModelFeatureRequest.md -docs/PartiallyUpdateModelRequest.md -docs/Transformer.md -docs/User.md -git_push.sh -jaqpotpy/__init__.py -jaqpotpy/api/__init__.py -jaqpotpy/api/openapi/__init__.py -jaqpotpy/api/openapi/api/__init__.py -jaqpotpy/api/openapi/api/auth_api.py -jaqpotpy/api/openapi/api/dataset_api.py -jaqpotpy/api/openapi/api/feature_api.py -jaqpotpy/api/openapi/api/lead_api.py -jaqpotpy/api/openapi/api/model_api.py -jaqpotpy/api/openapi/api/organization_api.py -jaqpotpy/api/openapi/api/organization_invitation_api.py -jaqpotpy/api/openapi/api_client.py -jaqpotpy/api/openapi/api_response.py -jaqpotpy/api/openapi/configuration.py -jaqpotpy/api/openapi/exceptions.py -jaqpotpy/api/openapi/models/__init__.py -jaqpotpy/api/openapi/models/create_invitations_request.py -jaqpotpy/api/openapi/models/dataset.py -jaqpotpy/api/openapi/models/dataset_csv.py -jaqpotpy/api/openapi/models/dataset_type.py -jaqpotpy/api/openapi/models/error_code.py -jaqpotpy/api/openapi/models/error_response.py -jaqpotpy/api/openapi/models/feature.py -jaqpotpy/api/openapi/models/feature_possible_value.py -jaqpotpy/api/openapi/models/feature_type.py -jaqpotpy/api/openapi/models/get_datasets200_response.py -jaqpotpy/api/openapi/models/get_models200_response.py -jaqpotpy/api/openapi/models/lead.py -jaqpotpy/api/openapi/models/library.py -jaqpotpy/api/openapi/models/model.py -jaqpotpy/api/openapi/models/model_extra_config.py -jaqpotpy/api/openapi/models/model_summary.py -jaqpotpy/api/openapi/models/model_task.py -jaqpotpy/api/openapi/models/model_type.py -jaqpotpy/api/openapi/models/model_visibility.py -jaqpotpy/api/openapi/models/organization.py -jaqpotpy/api/openapi/models/organization_invitation.py -jaqpotpy/api/openapi/models/organization_summary.py -jaqpotpy/api/openapi/models/organization_user.py -jaqpotpy/api/openapi/models/organization_user_association_type.py -jaqpotpy/api/openapi/models/organization_visibility.py -jaqpotpy/api/openapi/models/partial_update_organization_request.py -jaqpotpy/api/openapi/models/partially_update_model_feature_request.py -jaqpotpy/api/openapi/models/partially_update_model_request.py -jaqpotpy/api/openapi/models/transformer.py -jaqpotpy/api/openapi/models/user.py -jaqpotpy/api/openapi/py.typed -jaqpotpy/api/openapi/rest.py -pyproject.toml -requirements.txt -setup.cfg -setup.py -test-requirements.txt -test/__init__.py -test/test_auth_api.py -test/test_create_invitations_request.py -test/test_dataset.py -test/test_dataset_api.py -test/test_dataset_csv.py -test/test_dataset_type.py -test/test_error_code.py -test/test_error_response.py -test/test_feature.py -test/test_feature_api.py -test/test_feature_possible_value.py -test/test_feature_type.py -test/test_get_datasets200_response.py -test/test_get_models200_response.py -test/test_lead.py -test/test_lead_api.py -test/test_library.py -test/test_model.py -test/test_model_api.py -test/test_model_extra_config.py -test/test_model_summary.py -test/test_model_task.py -test/test_model_type.py -test/test_model_visibility.py -test/test_organization.py -test/test_organization_api.py -test/test_organization_invitation.py -test/test_organization_invitation_api.py -test/test_organization_summary.py -test/test_organization_user.py -test/test_organization_user_association_type.py -test/test_organization_visibility.py -test/test_partial_update_organization_request.py -test/test_partially_update_model_feature_request.py -test/test_partially_update_model_request.py -test/test_transformer.py -test/test_user.py -tox.ini diff --git a/jaqpotpy/api/openapi/.openapi-generator/VERSION b/jaqpotpy/api/openapi/.openapi-generator/VERSION deleted file mode 100644 index 09a6d308..00000000 --- a/jaqpotpy/api/openapi/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.8.0 diff --git a/jaqpotpy/api/openapi/.travis.yml b/jaqpotpy/api/openapi/.travis.yml deleted file mode 100644 index b857c2f3..00000000 --- a/jaqpotpy/api/openapi/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.7" - - "3.8" - - "3.9" - - "3.10" - - "3.11" - # uncomment the following if needed - #- "3.11-dev" # 3.11 development branch - #- "nightly" # nightly build -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=jaqpotpy.api.openapi diff --git a/jaqpotpy/api/openapi/README.md b/jaqpotpy/api/openapi/README.md deleted file mode 100644 index dd344ebc..00000000 --- a/jaqpotpy/api/openapi/README.md +++ /dev/null @@ -1,175 +0,0 @@ -# jaqpotpy.api.openapi -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 1.0.0 -- Package version: 1.0.0 -- Generator version: 7.8.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen -For more information, please visit [https://jaqpot.org](https://jaqpot.org) - -## Requirements. - -Python 3.7+ - -## Installation & Usage -### pip install - -If the python package is hosted on a repository, you can install directly using: - -```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) - -Then import the package: -```python -import jaqpotpy.api.openapi -``` - -### Setuptools - -Install via [Setuptools](http://pypi.python.org/pypi/setuptools). - -```sh -python setup.py install --user -``` -(or `sudo python setup.py install` to install the package for all users) - -Then import the package: -```python -import jaqpotpy.api.openapi -``` - -### Tests - -Execute `pytest` to run the tests. - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import jaqpotpy.api.openapi -from jaqpotpy.api.openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.jaqpot.org -# See configuration.py for a list of all supported configuration parameters. -configuration = jaqpotpy.api.openapi.Configuration( - host = "https://api.jaqpot.org" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (JWT): bearerAuth -configuration = jaqpotpy.api.openapi.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - - -# Enter a context with an instance of the API client -with jaqpotpy.api.openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jaqpotpy.api.openapi.AuthApi(api_client) - - try: - # Validate JWT - api_instance.validate_jwt() - except ApiException as e: - print("Exception when calling AuthApi->validate_jwt: %s\n" % e) - -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.jaqpot.org* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AuthApi* | [**validate_jwt**](docs/AuthApi.md#validate_jwt) | **GET** /v1/auth/validate | Validate JWT -*DatasetApi* | [**get_dataset_by_id**](docs/DatasetApi.md#get_dataset_by_id) | **GET** /v1/datasets/{id} | Get a Dataset -*DatasetApi* | [**get_datasets**](docs/DatasetApi.md#get_datasets) | **GET** /v1/user/datasets | Get Datasets by User ID -*FeatureApi* | [**partially_update_model_feature**](docs/FeatureApi.md#partially_update_model_feature) | **PATCH** /v1/models/{modelId}/features/{featureId} | Update a feature for a specific model -*LeadApi* | [**create_lead**](docs/LeadApi.md#create_lead) | **POST** /v1/leads | Create a Lead -*LeadApi* | [**delete_lead_by_id**](docs/LeadApi.md#delete_lead_by_id) | **DELETE** /v1/leads/{id} | Delete a Lead by ID -*LeadApi* | [**get_all_leads**](docs/LeadApi.md#get_all_leads) | **GET** /v1/leads | Get All Leads -*LeadApi* | [**get_lead_by_id**](docs/LeadApi.md#get_lead_by_id) | **GET** /v1/leads/{id} | Get a Lead by ID -*LeadApi* | [**update_lead_by_id**](docs/LeadApi.md#update_lead_by_id) | **PUT** /v1/leads/{id} | Update a Lead by ID -*ModelApi* | [**create_model**](docs/ModelApi.md#create_model) | **POST** /v1/models | Create a new model -*ModelApi* | [**delete_model_by_id**](docs/ModelApi.md#delete_model_by_id) | **DELETE** /v1/models/{id} | Delete a Model -*ModelApi* | [**get_legacy_model_by_id**](docs/ModelApi.md#get_legacy_model_by_id) | **GET** /v1/models/legacy/{id} | Get a legacy model -*ModelApi* | [**get_model_by_id**](docs/ModelApi.md#get_model_by_id) | **GET** /v1/models/{id} | Get a Model -*ModelApi* | [**get_models**](docs/ModelApi.md#get_models) | **GET** /v1/user/models | Get paginated models -*ModelApi* | [**get_shared_models**](docs/ModelApi.md#get_shared_models) | **GET** /v1/user/shared-models | Get paginated shared models -*ModelApi* | [**partially_update_model**](docs/ModelApi.md#partially_update_model) | **PATCH** /v1/models/{id}/partial | Partially update specific fields of a model -*ModelApi* | [**predict_with_model**](docs/ModelApi.md#predict_with_model) | **POST** /v1/models/{modelId}/predict | Predict with Model -*ModelApi* | [**predict_with_model_csv**](docs/ModelApi.md#predict_with_model_csv) | **POST** /v1/models/{modelId}/predict/csv | Predict using CSV with Model -*ModelApi* | [**search_models**](docs/ModelApi.md#search_models) | **GET** /v1/models/search | Search for models -*OrganizationApi* | [**create_organization**](docs/OrganizationApi.md#create_organization) | **POST** /v1/organizations | Create a new organization -*OrganizationApi* | [**get_all_organizations_by_user**](docs/OrganizationApi.md#get_all_organizations_by_user) | **GET** /v1/user/organizations | Get all user organizations -*OrganizationApi* | [**get_all_organizations_for_user**](docs/OrganizationApi.md#get_all_organizations_for_user) | **GET** /v1/organizations | Get all organizations for a specific user -*OrganizationApi* | [**get_organization_by_name**](docs/OrganizationApi.md#get_organization_by_name) | **GET** /v1/organizations/{name} | Get organization by name -*OrganizationApi* | [**partial_update_organization**](docs/OrganizationApi.md#partial_update_organization) | **PATCH** /v1/organizations/{id}/partial | Partially update an existing organization -*OrganizationInvitationApi* | [**create_invitations**](docs/OrganizationInvitationApi.md#create_invitations) | **POST** /v1/organizations/{orgName}/invitations | Create new invitations for an organization -*OrganizationInvitationApi* | [**get_all_invitations**](docs/OrganizationInvitationApi.md#get_all_invitations) | **GET** /v1/organizations/{orgName}/invitations | Get all invitations for an organization -*OrganizationInvitationApi* | [**get_invitation**](docs/OrganizationInvitationApi.md#get_invitation) | **GET** /v1/organizations/{name}/invitations/{uuid} | Get the status of an invitation -*OrganizationInvitationApi* | [**resend_invitation**](docs/OrganizationInvitationApi.md#resend_invitation) | **POST** /v1/organizations/{orgId}/invitations/{id}/resend | Resend an invitation email -*OrganizationInvitationApi* | [**update_invitation**](docs/OrganizationInvitationApi.md#update_invitation) | **PUT** /v1/organizations/{name}/invitations/{uuid} | Update the status of an invitation - - -## Documentation For Models - - - [CreateInvitationsRequest](docs/CreateInvitationsRequest.md) - - [Dataset](docs/Dataset.md) - - [DatasetCSV](docs/DatasetCSV.md) - - [DatasetType](docs/DatasetType.md) - - [ErrorCode](docs/ErrorCode.md) - - [ErrorResponse](docs/ErrorResponse.md) - - [Feature](docs/Feature.md) - - [FeaturePossibleValue](docs/FeaturePossibleValue.md) - - [FeatureType](docs/FeatureType.md) - - [GetDatasets200Response](docs/GetDatasets200Response.md) - - [GetModels200Response](docs/GetModels200Response.md) - - [Lead](docs/Lead.md) - - [Library](docs/Library.md) - - [Model](docs/Model.md) - - [ModelExtraConfig](docs/ModelExtraConfig.md) - - [ModelSummary](docs/ModelSummary.md) - - [ModelTask](docs/ModelTask.md) - - [ModelType](docs/ModelType.md) - - [ModelVisibility](docs/ModelVisibility.md) - - [Organization](docs/Organization.md) - - [OrganizationInvitation](docs/OrganizationInvitation.md) - - [OrganizationSummary](docs/OrganizationSummary.md) - - [OrganizationUser](docs/OrganizationUser.md) - - [OrganizationUserAssociationType](docs/OrganizationUserAssociationType.md) - - [OrganizationVisibility](docs/OrganizationVisibility.md) - - [PartialUpdateOrganizationRequest](docs/PartialUpdateOrganizationRequest.md) - - [PartiallyUpdateModelFeatureRequest](docs/PartiallyUpdateModelFeatureRequest.md) - - [PartiallyUpdateModelRequest](docs/PartiallyUpdateModelRequest.md) - - [Transformer](docs/Transformer.md) - - [User](docs/User.md) - - - -## Documentation For Authorization - - -Authentication schemes defined for the API: - -### bearerAuth - -- **Type**: Bearer authentication (JWT) - - -## Author - -upci.ntua@gmail.com - - diff --git a/jaqpotpy/api/openapi/__init__.py b/jaqpotpy/api/openapi/__init__.py index d5e33877..cca7c764 100644 --- a/jaqpotpy/api/openapi/__init__.py +++ b/jaqpotpy/api/openapi/__init__.py @@ -3,18 +3,17 @@ # flake8: noqa """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - __version__ = "1.0.0" # import apis into sdk package @@ -25,7 +24,9 @@ from jaqpotpy.api.openapi.api.lead_api import LeadApi from jaqpotpy.api.openapi.api.model_api import ModelApi from jaqpotpy.api.openapi.api.organization_api import OrganizationApi -from jaqpotpy.api.openapi.api.organization_invitation_api import OrganizationInvitationApi +from jaqpotpy.api.openapi.api.organization_invitation_api import ( + OrganizationInvitationApi, +) # import ApiClient from jaqpotpy.api.openapi.api_response import ApiResponse @@ -40,11 +41,17 @@ # import models into sdk package from jaqpotpy.api.openapi.models.api_key import ApiKey -from jaqpotpy.api.openapi.models.binary_classification_scores import BinaryClassificationScores +from jaqpotpy.api.openapi.models.binary_classification_scores import ( + BinaryClassificationScores, +) from jaqpotpy.api.openapi.models.bounding_box_doa import BoundingBoxDoa from jaqpotpy.api.openapi.models.city_block_doa import CityBlockDoa -from jaqpotpy.api.openapi.models.create_api_key201_response import CreateApiKey201Response -from jaqpotpy.api.openapi.models.create_invitations_request import CreateInvitationsRequest +from jaqpotpy.api.openapi.models.create_api_key201_response import ( + CreateApiKey201Response, +) +from jaqpotpy.api.openapi.models.create_invitations_request import ( + CreateInvitationsRequest, +) from jaqpotpy.api.openapi.models.dataset import Dataset from jaqpotpy.api.openapi.models.dataset_csv import DatasetCSV from jaqpotpy.api.openapi.models.dataset_type import DatasetType @@ -55,7 +62,9 @@ from jaqpotpy.api.openapi.models.feature import Feature from jaqpotpy.api.openapi.models.feature_possible_value import FeaturePossibleValue from jaqpotpy.api.openapi.models.feature_type import FeatureType -from jaqpotpy.api.openapi.models.get_all_api_keys_for_user200_response_inner import GetAllApiKeysForUser200ResponseInner +from jaqpotpy.api.openapi.models.get_all_api_keys_for_user200_response_inner import ( + GetAllApiKeysForUser200ResponseInner, +) from jaqpotpy.api.openapi.models.get_datasets200_response import GetDatasets200Response from jaqpotpy.api.openapi.models.get_models200_response import GetModels200Response from jaqpotpy.api.openapi.models.kernel_based_doa import KernelBasedDoa @@ -65,22 +74,31 @@ from jaqpotpy.api.openapi.models.mahalanobis_doa import MahalanobisDoa from jaqpotpy.api.openapi.models.mean_var_doa import MeanVarDoa from jaqpotpy.api.openapi.models.model import Model -from jaqpotpy.api.openapi.models.model_extra_config import ModelExtraConfig from jaqpotpy.api.openapi.models.model_scores import ModelScores from jaqpotpy.api.openapi.models.model_summary import ModelSummary from jaqpotpy.api.openapi.models.model_task import ModelTask from jaqpotpy.api.openapi.models.model_type import ModelType from jaqpotpy.api.openapi.models.model_visibility import ModelVisibility -from jaqpotpy.api.openapi.models.multiclass_classification_scores import MulticlassClassificationScores +from jaqpotpy.api.openapi.models.multiclass_classification_scores import ( + MulticlassClassificationScores, +) from jaqpotpy.api.openapi.models.organization import Organization from jaqpotpy.api.openapi.models.organization_invitation import OrganizationInvitation from jaqpotpy.api.openapi.models.organization_summary import OrganizationSummary from jaqpotpy.api.openapi.models.organization_user import OrganizationUser -from jaqpotpy.api.openapi.models.organization_user_association_type import OrganizationUserAssociationType +from jaqpotpy.api.openapi.models.organization_user_association_type import ( + OrganizationUserAssociationType, +) from jaqpotpy.api.openapi.models.organization_visibility import OrganizationVisibility -from jaqpotpy.api.openapi.models.partial_update_organization_request import PartialUpdateOrganizationRequest -from jaqpotpy.api.openapi.models.partially_update_model_feature_request import PartiallyUpdateModelFeatureRequest -from jaqpotpy.api.openapi.models.partially_update_model_request import PartiallyUpdateModelRequest +from jaqpotpy.api.openapi.models.partial_update_organization_request import ( + PartialUpdateOrganizationRequest, +) +from jaqpotpy.api.openapi.models.partially_update_model_feature_request import ( + PartiallyUpdateModelFeatureRequest, +) +from jaqpotpy.api.openapi.models.partially_update_model_request import ( + PartiallyUpdateModelRequest, +) from jaqpotpy.api.openapi.models.prediction_doa import PredictionDoa from jaqpotpy.api.openapi.models.prediction_model import PredictionModel from jaqpotpy.api.openapi.models.prediction_request import PredictionRequest @@ -88,6 +106,8 @@ from jaqpotpy.api.openapi.models.regression_scores import RegressionScores from jaqpotpy.api.openapi.models.scores import Scores from jaqpotpy.api.openapi.models.transformer import Transformer -from jaqpotpy.api.openapi.models.update_api_key200_response import UpdateApiKey200Response +from jaqpotpy.api.openapi.models.update_api_key200_response import ( + UpdateApiKey200Response, +) from jaqpotpy.api.openapi.models.update_api_key_request import UpdateApiKeyRequest from jaqpotpy.api.openapi.models.user import User diff --git a/jaqpotpy/api/openapi/api/__init__.py b/jaqpotpy/api/openapi/api/__init__.py index c7dc3e6c..b962d71b 100644 --- a/jaqpotpy/api/openapi/api/__init__.py +++ b/jaqpotpy/api/openapi/api/__init__.py @@ -8,5 +8,6 @@ from jaqpotpy.api.openapi.api.lead_api import LeadApi from jaqpotpy.api.openapi.api.model_api import ModelApi from jaqpotpy.api.openapi.api.organization_api import OrganizationApi -from jaqpotpy.api.openapi.api.organization_invitation_api import OrganizationInvitationApi - +from jaqpotpy.api.openapi.api.organization_invitation_api import ( + OrganizationInvitationApi, +) diff --git a/jaqpotpy/api/openapi/api/api_keys_api.py b/jaqpotpy/api/openapi/api/api_keys_api.py index 03225ca0..257bb96c 100644 --- a/jaqpotpy/api/openapi/api/api_keys_api.py +++ b/jaqpotpy/api/openapi/api/api_keys_api.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 import warnings @@ -21,9 +21,15 @@ from typing import List from typing_extensions import Annotated from jaqpotpy.api.openapi.models.api_key import ApiKey -from jaqpotpy.api.openapi.models.create_api_key201_response import CreateApiKey201Response -from jaqpotpy.api.openapi.models.get_all_api_keys_for_user200_response_inner import GetAllApiKeysForUser200ResponseInner -from jaqpotpy.api.openapi.models.update_api_key200_response import UpdateApiKey200Response +from jaqpotpy.api.openapi.models.create_api_key201_response import ( + CreateApiKey201Response, +) +from jaqpotpy.api.openapi.models.get_all_api_keys_for_user200_response_inner import ( + GetAllApiKeysForUser200ResponseInner, +) +from jaqpotpy.api.openapi.models.update_api_key200_response import ( + UpdateApiKey200Response, +) from jaqpotpy.api.openapi.models.update_api_key_request import UpdateApiKeyRequest from jaqpotpy.api.openapi.api_client import ApiClient, RequestSerialized @@ -43,18 +49,18 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def create_api_key( self, - api_key: Annotated[ApiKey, Field(description="Payload to create a new API key")], + api_key: Annotated[ + ApiKey, Field(description="Payload to create a new API key") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -87,25 +93,24 @@ def create_api_key( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_api_key_serialize( api_key=api_key, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateApiKey201Response", - '400': None, - '401': None, - '404': None, + "201": "CreateApiKey201Response", + "400": None, + "401": None, + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -113,18 +118,18 @@ def create_api_key( response_types_map=_response_types_map, ).data - @validate_call def create_api_key_with_http_info( self, - api_key: Annotated[ApiKey, Field(description="Payload to create a new API key")], + api_key: Annotated[ + ApiKey, Field(description="Payload to create a new API key") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -157,25 +162,24 @@ def create_api_key_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_api_key_serialize( api_key=api_key, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateApiKey201Response", - '400': None, - '401': None, - '404': None, + "201": "CreateApiKey201Response", + "400": None, + "401": None, + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -183,18 +187,18 @@ def create_api_key_with_http_info( response_types_map=_response_types_map, ) - @validate_call def create_api_key_without_preload_content( self, - api_key: Annotated[ApiKey, Field(description="Payload to create a new API key")], + api_key: Annotated[ + ApiKey, Field(description="Payload to create a new API key") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -227,29 +231,27 @@ def create_api_key_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_api_key_serialize( api_key=api_key, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateApiKey201Response", - '400': None, - '401': None, - '404': None, + "201": "CreateApiKey201Response", + "400": None, + "401": None, + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _create_api_key_serialize( self, api_key, @@ -258,11 +260,9 @@ def _create_api_key_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -279,37 +279,28 @@ def _create_api_key_serialize( if api_key is not None: _body_params = api_key - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/v1/user/api-keys', + method="POST", + resource_path="/v1/user/api-keys", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -319,12 +310,9 @@ def _create_api_key_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def delete_api_key( self, @@ -333,9 +321,8 @@ def delete_api_key( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -368,24 +355,23 @@ def delete_api_key( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_api_key_serialize( key=key, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '401': None, - '404': None, + "204": None, + "401": None, + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -393,7 +379,6 @@ def delete_api_key( response_types_map=_response_types_map, ).data - @validate_call def delete_api_key_with_http_info( self, @@ -402,9 +387,8 @@ def delete_api_key_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -437,24 +421,23 @@ def delete_api_key_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_api_key_serialize( key=key, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '401': None, - '404': None, + "204": None, + "401": None, + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -462,7 +445,6 @@ def delete_api_key_with_http_info( response_types_map=_response_types_map, ) - @validate_call def delete_api_key_without_preload_content( self, @@ -471,9 +453,8 @@ def delete_api_key_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -506,28 +487,26 @@ def delete_api_key_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_api_key_serialize( key=key, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '401': None, - '404': None, + "204": None, + "401": None, + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _delete_api_key_serialize( self, key, @@ -536,11 +515,9 @@ def _delete_api_key_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -551,23 +528,18 @@ def _delete_api_key_serialize( # process the path parameters if key is not None: - _path_params['key'] = key + _path_params["key"] = key # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v1/user/api-keys/{key}', + method="DELETE", + resource_path="/v1/user/api-keys/{key}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -577,12 +549,9 @@ def _delete_api_key_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def get_all_api_keys_for_user( self, @@ -590,9 +559,8 @@ def get_all_api_keys_for_user( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -623,22 +591,21 @@ def get_all_api_keys_for_user( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_all_api_keys_for_user_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[GetAllApiKeysForUser200ResponseInner]", - '401': None, + "200": "List[GetAllApiKeysForUser200ResponseInner]", + "401": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -646,7 +613,6 @@ def get_all_api_keys_for_user( response_types_map=_response_types_map, ).data - @validate_call def get_all_api_keys_for_user_with_http_info( self, @@ -654,9 +620,8 @@ def get_all_api_keys_for_user_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -687,22 +652,21 @@ def get_all_api_keys_for_user_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_all_api_keys_for_user_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[GetAllApiKeysForUser200ResponseInner]", - '401': None, + "200": "List[GetAllApiKeysForUser200ResponseInner]", + "401": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -710,7 +674,6 @@ def get_all_api_keys_for_user_with_http_info( response_types_map=_response_types_map, ) - @validate_call def get_all_api_keys_for_user_without_preload_content( self, @@ -718,9 +681,8 @@ def get_all_api_keys_for_user_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -751,26 +713,24 @@ def get_all_api_keys_for_user_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_all_api_keys_for_user_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[GetAllApiKeysForUser200ResponseInner]", - '401': None, + "200": "List[GetAllApiKeysForUser200ResponseInner]", + "401": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _get_all_api_keys_for_user_serialize( self, _request_auth, @@ -778,11 +738,9 @@ def _get_all_api_keys_for_user_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -797,24 +755,18 @@ def _get_all_api_keys_for_user_serialize( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/v1/user/api-keys', + method="GET", + resource_path="/v1/user/api-keys", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -824,24 +776,22 @@ def _get_all_api_keys_for_user_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def update_api_key( self, key: Annotated[StrictStr, Field(description="The API key to update")], - update_api_key_request: Annotated[UpdateApiKeyRequest, Field(description="Payload to update API key metadata")], + update_api_key_request: Annotated[ + UpdateApiKeyRequest, Field(description="Payload to update API key metadata") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -876,7 +826,7 @@ def update_api_key( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_api_key_serialize( key=key, @@ -884,18 +834,17 @@ def update_api_key( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UpdateApiKey200Response", - '400': None, - '401': None, - '404': None, + "200": "UpdateApiKey200Response", + "400": None, + "401": None, + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -903,19 +852,19 @@ def update_api_key( response_types_map=_response_types_map, ).data - @validate_call def update_api_key_with_http_info( self, key: Annotated[StrictStr, Field(description="The API key to update")], - update_api_key_request: Annotated[UpdateApiKeyRequest, Field(description="Payload to update API key metadata")], + update_api_key_request: Annotated[ + UpdateApiKeyRequest, Field(description="Payload to update API key metadata") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -950,7 +899,7 @@ def update_api_key_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_api_key_serialize( key=key, @@ -958,18 +907,17 @@ def update_api_key_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UpdateApiKey200Response", - '400': None, - '401': None, - '404': None, + "200": "UpdateApiKey200Response", + "400": None, + "401": None, + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -977,19 +925,19 @@ def update_api_key_with_http_info( response_types_map=_response_types_map, ) - @validate_call def update_api_key_without_preload_content( self, key: Annotated[StrictStr, Field(description="The API key to update")], - update_api_key_request: Annotated[UpdateApiKeyRequest, Field(description="Payload to update API key metadata")], + update_api_key_request: Annotated[ + UpdateApiKeyRequest, Field(description="Payload to update API key metadata") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1024,7 +972,7 @@ def update_api_key_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_api_key_serialize( key=key, @@ -1032,22 +980,20 @@ def update_api_key_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UpdateApiKey200Response", - '400': None, - '401': None, - '404': None, + "200": "UpdateApiKey200Response", + "400": None, + "401": None, + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _update_api_key_serialize( self, key, @@ -1057,11 +1003,9 @@ def _update_api_key_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1072,7 +1016,7 @@ def _update_api_key_serialize( # process the path parameters if key is not None: - _path_params['key'] = key + _path_params["key"] = key # process the query parameters # process the header parameters # process the form parameters @@ -1080,37 +1024,28 @@ def _update_api_key_serialize( if update_api_key_request is not None: _body_params = update_api_key_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/v1/user/api-keys/{key}', + method="PATCH", + resource_path="/v1/user/api-keys/{key}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1120,7 +1055,5 @@ def _update_api_key_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/jaqpotpy/api/openapi/api/auth_api.py b/jaqpotpy/api/openapi/api/auth_api.py index 4064b156..f6baea5d 100644 --- a/jaqpotpy/api/openapi/api/auth_api.py +++ b/jaqpotpy/api/openapi/api/auth_api.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 import warnings @@ -35,7 +35,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def validate_jwt( self, @@ -43,9 +42,8 @@ def validate_jwt( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -76,22 +74,21 @@ def validate_jwt( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._validate_jwt_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, + "200": None, + "401": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -99,7 +96,6 @@ def validate_jwt( response_types_map=_response_types_map, ).data - @validate_call def validate_jwt_with_http_info( self, @@ -107,9 +103,8 @@ def validate_jwt_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -140,22 +135,21 @@ def validate_jwt_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._validate_jwt_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, + "200": None, + "401": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -163,7 +157,6 @@ def validate_jwt_with_http_info( response_types_map=_response_types_map, ) - @validate_call def validate_jwt_without_preload_content( self, @@ -171,9 +164,8 @@ def validate_jwt_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -204,26 +196,24 @@ def validate_jwt_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._validate_jwt_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, + "200": None, + "401": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _validate_jwt_serialize( self, _request_auth, @@ -231,11 +221,9 @@ def _validate_jwt_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -250,17 +238,12 @@ def _validate_jwt_serialize( # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/v1/auth/validate', + method="GET", + resource_path="/v1/auth/validate", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -270,7 +253,5 @@ def _validate_jwt_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/jaqpotpy/api/openapi/api/dataset_api.py b/jaqpotpy/api/openapi/api/dataset_api.py index 01f9233c..7b796aca 100644 --- a/jaqpotpy/api/openapi/api/dataset_api.py +++ b/jaqpotpy/api/openapi/api/dataset_api.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 import warnings @@ -40,18 +40,18 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def get_dataset_by_id( self, - id: Annotated[StrictInt, Field(description="The ID of the dataset to retrieve")], + id: Annotated[ + StrictInt, Field(description="The ID of the dataset to retrieve") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -84,23 +84,22 @@ def get_dataset_by_id( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_dataset_by_id_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Dataset", - '404': None, + "200": "Dataset", + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -108,18 +107,18 @@ def get_dataset_by_id( response_types_map=_response_types_map, ).data - @validate_call def get_dataset_by_id_with_http_info( self, - id: Annotated[StrictInt, Field(description="The ID of the dataset to retrieve")], + id: Annotated[ + StrictInt, Field(description="The ID of the dataset to retrieve") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -152,23 +151,22 @@ def get_dataset_by_id_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_dataset_by_id_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Dataset", - '404': None, + "200": "Dataset", + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -176,18 +174,18 @@ def get_dataset_by_id_with_http_info( response_types_map=_response_types_map, ) - @validate_call def get_dataset_by_id_without_preload_content( self, - id: Annotated[StrictInt, Field(description="The ID of the dataset to retrieve")], + id: Annotated[ + StrictInt, Field(description="The ID of the dataset to retrieve") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -220,27 +218,25 @@ def get_dataset_by_id_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_dataset_by_id_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Dataset", - '404': None, + "200": "Dataset", + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _get_dataset_by_id_serialize( self, id, @@ -249,11 +245,9 @@ def _get_dataset_by_id_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -264,30 +258,24 @@ def _get_dataset_by_id_serialize( # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/v1/datasets/{id}', + method="GET", + resource_path="/v1/datasets/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -297,12 +285,9 @@ def _get_dataset_by_id_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def get_datasets( self, @@ -313,9 +298,8 @@ def get_datasets( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -352,7 +336,7 @@ def get_datasets( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_datasets_serialize( page=page, @@ -361,16 +345,15 @@ def get_datasets( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetDatasets200Response", - '404': None, + "200": "GetDatasets200Response", + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -378,7 +361,6 @@ def get_datasets( response_types_map=_response_types_map, ).data - @validate_call def get_datasets_with_http_info( self, @@ -389,9 +371,8 @@ def get_datasets_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -428,7 +409,7 @@ def get_datasets_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_datasets_serialize( page=page, @@ -437,16 +418,15 @@ def get_datasets_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetDatasets200Response", - '404': None, + "200": "GetDatasets200Response", + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -454,7 +434,6 @@ def get_datasets_with_http_info( response_types_map=_response_types_map, ) - @validate_call def get_datasets_without_preload_content( self, @@ -465,9 +444,8 @@ def get_datasets_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -504,7 +482,7 @@ def get_datasets_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_datasets_serialize( page=page, @@ -513,20 +491,18 @@ def get_datasets_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetDatasets200Response", - '404': None, + "200": "GetDatasets200Response", + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _get_datasets_serialize( self, page, @@ -537,11 +513,10 @@ def _get_datasets_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None _collection_formats: Dict[str, str] = { - 'sort': 'multi', + "sort": "multi", } _path_params: Dict[str, str] = {} @@ -554,39 +529,30 @@ def _get_datasets_serialize( # process the path parameters # process the query parameters if page is not None: - - _query_params.append(('page', page)) - + _query_params.append(("page", page)) + if size is not None: - - _query_params.append(('size', size)) - + _query_params.append(("size", size)) + if sort is not None: - - _query_params.append(('sort', sort)) - + _query_params.append(("sort", sort)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/v1/user/datasets', + method="GET", + resource_path="/v1/user/datasets", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -596,7 +562,5 @@ def _get_datasets_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/jaqpotpy/api/openapi/api/feature_api.py b/jaqpotpy/api/openapi/api/feature_api.py index 179c03c7..f778e52a 100644 --- a/jaqpotpy/api/openapi/api/feature_api.py +++ b/jaqpotpy/api/openapi/api/feature_api.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 import warnings @@ -20,7 +20,9 @@ from pydantic import Field, StrictInt from typing_extensions import Annotated from jaqpotpy.api.openapi.models.feature import Feature -from jaqpotpy.api.openapi.models.partially_update_model_feature_request import PartiallyUpdateModelFeatureRequest +from jaqpotpy.api.openapi.models.partially_update_model_feature_request import ( + PartiallyUpdateModelFeatureRequest, +) from jaqpotpy.api.openapi.api_client import ApiClient, RequestSerialized from jaqpotpy.api.openapi.api_response import ApiResponse @@ -39,20 +41,22 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def partially_update_model_feature( self, - model_id: Annotated[StrictInt, Field(description="The ID of the model containing the feature")], - feature_id: Annotated[StrictInt, Field(description="The ID of the feature to update")], + model_id: Annotated[ + StrictInt, Field(description="The ID of the model containing the feature") + ], + feature_id: Annotated[ + StrictInt, Field(description="The ID of the feature to update") + ], partially_update_model_feature_request: PartiallyUpdateModelFeatureRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -89,7 +93,7 @@ def partially_update_model_feature( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._partially_update_model_feature_serialize( model_id=model_id, @@ -98,19 +102,18 @@ def partially_update_model_feature( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Feature", - '400': None, - '404': None, - '401': None, - '403': None, + "200": "Feature", + "400": None, + "404": None, + "401": None, + "403": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -118,20 +121,22 @@ def partially_update_model_feature( response_types_map=_response_types_map, ).data - @validate_call def partially_update_model_feature_with_http_info( self, - model_id: Annotated[StrictInt, Field(description="The ID of the model containing the feature")], - feature_id: Annotated[StrictInt, Field(description="The ID of the feature to update")], + model_id: Annotated[ + StrictInt, Field(description="The ID of the model containing the feature") + ], + feature_id: Annotated[ + StrictInt, Field(description="The ID of the feature to update") + ], partially_update_model_feature_request: PartiallyUpdateModelFeatureRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -168,7 +173,7 @@ def partially_update_model_feature_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._partially_update_model_feature_serialize( model_id=model_id, @@ -177,19 +182,18 @@ def partially_update_model_feature_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Feature", - '400': None, - '404': None, - '401': None, - '403': None, + "200": "Feature", + "400": None, + "404": None, + "401": None, + "403": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -197,20 +201,22 @@ def partially_update_model_feature_with_http_info( response_types_map=_response_types_map, ) - @validate_call def partially_update_model_feature_without_preload_content( self, - model_id: Annotated[StrictInt, Field(description="The ID of the model containing the feature")], - feature_id: Annotated[StrictInt, Field(description="The ID of the feature to update")], + model_id: Annotated[ + StrictInt, Field(description="The ID of the model containing the feature") + ], + feature_id: Annotated[ + StrictInt, Field(description="The ID of the feature to update") + ], partially_update_model_feature_request: PartiallyUpdateModelFeatureRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -247,7 +253,7 @@ def partially_update_model_feature_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._partially_update_model_feature_serialize( model_id=model_id, @@ -256,23 +262,21 @@ def partially_update_model_feature_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Feature", - '400': None, - '404': None, - '401': None, - '403': None, + "200": "Feature", + "400": None, + "404": None, + "401": None, + "403": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _partially_update_model_feature_serialize( self, model_id, @@ -283,11 +287,9 @@ def _partially_update_model_feature_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -298,9 +300,9 @@ def _partially_update_model_feature_serialize( # process the path parameters if model_id is not None: - _path_params['modelId'] = model_id + _path_params["modelId"] = model_id if feature_id is not None: - _path_params['featureId'] = feature_id + _path_params["featureId"] = feature_id # process the query parameters # process the header parameters # process the form parameters @@ -308,37 +310,28 @@ def _partially_update_model_feature_serialize( if partially_update_model_feature_request is not None: _body_params = partially_update_model_feature_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/v1/models/{modelId}/features/{featureId}', + method="PATCH", + resource_path="/v1/models/{modelId}/features/{featureId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -348,7 +341,5 @@ def _partially_update_model_feature_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/jaqpotpy/api/openapi/api/lead_api.py b/jaqpotpy/api/openapi/api/lead_api.py index a28a14b4..7d892987 100644 --- a/jaqpotpy/api/openapi/api/lead_api.py +++ b/jaqpotpy/api/openapi/api/lead_api.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 import warnings @@ -39,7 +39,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def create_lead( self, @@ -47,9 +46,8 @@ def create_lead( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -80,22 +78,21 @@ def create_lead( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_lead_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, + "201": None, + "400": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -103,7 +100,6 @@ def create_lead( response_types_map=_response_types_map, ).data - @validate_call def create_lead_with_http_info( self, @@ -111,9 +107,8 @@ def create_lead_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -144,22 +139,21 @@ def create_lead_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_lead_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, + "201": None, + "400": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -167,7 +161,6 @@ def create_lead_with_http_info( response_types_map=_response_types_map, ) - @validate_call def create_lead_without_preload_content( self, @@ -175,9 +168,8 @@ def create_lead_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -208,26 +200,24 @@ def create_lead_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_lead_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, + "201": None, + "400": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _create_lead_serialize( self, _request_auth, @@ -235,11 +225,9 @@ def _create_lead_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -254,17 +242,12 @@ def _create_lead_serialize( # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/v1/leads', + method="POST", + resource_path="/v1/leads", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -274,12 +257,9 @@ def _create_lead_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def delete_lead_by_id( self, @@ -288,9 +268,8 @@ def delete_lead_by_id( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -323,23 +302,22 @@ def delete_lead_by_id( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_lead_by_id_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '404': None, + "204": None, + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -347,7 +325,6 @@ def delete_lead_by_id( response_types_map=_response_types_map, ).data - @validate_call def delete_lead_by_id_with_http_info( self, @@ -356,9 +333,8 @@ def delete_lead_by_id_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -391,23 +367,22 @@ def delete_lead_by_id_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_lead_by_id_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '404': None, + "204": None, + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -415,7 +390,6 @@ def delete_lead_by_id_with_http_info( response_types_map=_response_types_map, ) - @validate_call def delete_lead_by_id_without_preload_content( self, @@ -424,9 +398,8 @@ def delete_lead_by_id_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -459,27 +432,25 @@ def delete_lead_by_id_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_lead_by_id_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '404': None, + "204": None, + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _delete_lead_by_id_serialize( self, id, @@ -488,11 +459,9 @@ def _delete_lead_by_id_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -503,23 +472,18 @@ def _delete_lead_by_id_serialize( # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v1/leads/{id}', + method="DELETE", + resource_path="/v1/leads/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -529,12 +493,9 @@ def _delete_lead_by_id_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def get_all_leads( self, @@ -542,9 +503,8 @@ def get_all_leads( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -575,21 +535,20 @@ def get_all_leads( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_all_leads_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Lead]", + "200": "List[Lead]", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -597,7 +556,6 @@ def get_all_leads( response_types_map=_response_types_map, ).data - @validate_call def get_all_leads_with_http_info( self, @@ -605,9 +563,8 @@ def get_all_leads_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -638,21 +595,20 @@ def get_all_leads_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_all_leads_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Lead]", + "200": "List[Lead]", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -660,7 +616,6 @@ def get_all_leads_with_http_info( response_types_map=_response_types_map, ) - @validate_call def get_all_leads_without_preload_content( self, @@ -668,9 +623,8 @@ def get_all_leads_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -701,25 +655,23 @@ def get_all_leads_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_all_leads_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Lead]", + "200": "List[Lead]", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _get_all_leads_serialize( self, _request_auth, @@ -727,11 +679,9 @@ def _get_all_leads_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -746,24 +696,18 @@ def _get_all_leads_serialize( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/v1/leads', + method="GET", + resource_path="/v1/leads", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -773,12 +717,9 @@ def _get_all_leads_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def get_lead_by_id( self, @@ -787,9 +728,8 @@ def get_lead_by_id( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -822,23 +762,22 @@ def get_lead_by_id( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_lead_by_id_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Lead", - '404': None, + "200": "Lead", + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -846,7 +785,6 @@ def get_lead_by_id( response_types_map=_response_types_map, ).data - @validate_call def get_lead_by_id_with_http_info( self, @@ -855,9 +793,8 @@ def get_lead_by_id_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -890,23 +827,22 @@ def get_lead_by_id_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_lead_by_id_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Lead", - '404': None, + "200": "Lead", + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -914,7 +850,6 @@ def get_lead_by_id_with_http_info( response_types_map=_response_types_map, ) - @validate_call def get_lead_by_id_without_preload_content( self, @@ -923,9 +858,8 @@ def get_lead_by_id_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -958,27 +892,25 @@ def get_lead_by_id_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_lead_by_id_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Lead", - '404': None, + "200": "Lead", + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _get_lead_by_id_serialize( self, id, @@ -987,11 +919,9 @@ def _get_lead_by_id_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1002,30 +932,24 @@ def _get_lead_by_id_serialize( # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/v1/leads/{id}', + method="GET", + resource_path="/v1/leads/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1035,12 +959,9 @@ def _get_lead_by_id_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def update_lead_by_id( self, @@ -1050,9 +971,8 @@ def update_lead_by_id( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1087,7 +1007,7 @@ def update_lead_by_id( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_lead_by_id_serialize( id=id, @@ -1095,17 +1015,16 @@ def update_lead_by_id( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '404': None, + "200": None, + "400": None, + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1113,7 +1032,6 @@ def update_lead_by_id( response_types_map=_response_types_map, ).data - @validate_call def update_lead_by_id_with_http_info( self, @@ -1123,9 +1041,8 @@ def update_lead_by_id_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1160,7 +1077,7 @@ def update_lead_by_id_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_lead_by_id_serialize( id=id, @@ -1168,17 +1085,16 @@ def update_lead_by_id_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '404': None, + "200": None, + "400": None, + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1186,7 +1102,6 @@ def update_lead_by_id_with_http_info( response_types_map=_response_types_map, ) - @validate_call def update_lead_by_id_without_preload_content( self, @@ -1196,9 +1111,8 @@ def update_lead_by_id_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1233,7 +1147,7 @@ def update_lead_by_id_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_lead_by_id_serialize( id=id, @@ -1241,21 +1155,19 @@ def update_lead_by_id_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '404': None, + "200": None, + "400": None, + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _update_lead_by_id_serialize( self, id, @@ -1265,11 +1177,9 @@ def _update_lead_by_id_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1280,7 +1190,7 @@ def _update_lead_by_id_serialize( # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id # process the query parameters # process the header parameters # process the form parameters @@ -1288,30 +1198,22 @@ def _update_lead_by_id_serialize( if lead is not None: _body_params = lead - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PUT', - resource_path='/v1/leads/{id}', + method="PUT", + resource_path="/v1/leads/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1321,7 +1223,5 @@ def _update_lead_by_id_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/jaqpotpy/api/openapi/api/model_api.py b/jaqpotpy/api/openapi/api/model_api.py index bfe07587..dfd80532 100644 --- a/jaqpotpy/api/openapi/api/model_api.py +++ b/jaqpotpy/api/openapi/api/model_api.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 import warnings @@ -24,7 +24,9 @@ from jaqpotpy.api.openapi.models.dataset_csv import DatasetCSV from jaqpotpy.api.openapi.models.get_models200_response import GetModels200Response from jaqpotpy.api.openapi.models.model import Model -from jaqpotpy.api.openapi.models.partially_update_model_request import PartiallyUpdateModelRequest +from jaqpotpy.api.openapi.models.partially_update_model_request import ( + PartiallyUpdateModelRequest, +) from jaqpotpy.api.openapi.api_client import ApiClient, RequestSerialized from jaqpotpy.api.openapi.api_response import ApiResponse @@ -43,7 +45,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def create_model( self, @@ -52,9 +53,8 @@ def create_model( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -86,23 +86,22 @@ def create_model( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_model_serialize( model=model, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, + "201": None, + "400": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -110,7 +109,6 @@ def create_model( response_types_map=_response_types_map, ).data - @validate_call def create_model_with_http_info( self, @@ -119,9 +117,8 @@ def create_model_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -153,23 +150,22 @@ def create_model_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_model_serialize( model=model, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, + "201": None, + "400": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -177,7 +173,6 @@ def create_model_with_http_info( response_types_map=_response_types_map, ) - @validate_call def create_model_without_preload_content( self, @@ -186,9 +181,8 @@ def create_model_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -220,27 +214,25 @@ def create_model_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_model_serialize( model=model, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, + "201": None, + "400": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _create_model_serialize( self, model, @@ -249,11 +241,9 @@ def _create_model_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -270,30 +260,22 @@ def _create_model_serialize( if model is not None: _body_params = model - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/v1/models', + method="POST", + resource_path="/v1/models", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -303,12 +285,9 @@ def _create_model_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def delete_model_by_id( self, @@ -317,9 +296,8 @@ def delete_model_by_id( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -352,23 +330,22 @@ def delete_model_by_id( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_model_by_id_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '404': None, + "204": None, + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -376,7 +353,6 @@ def delete_model_by_id( response_types_map=_response_types_map, ).data - @validate_call def delete_model_by_id_with_http_info( self, @@ -385,9 +361,8 @@ def delete_model_by_id_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -420,23 +395,22 @@ def delete_model_by_id_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_model_by_id_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '404': None, + "204": None, + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -444,7 +418,6 @@ def delete_model_by_id_with_http_info( response_types_map=_response_types_map, ) - @validate_call def delete_model_by_id_without_preload_content( self, @@ -453,9 +426,8 @@ def delete_model_by_id_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -488,27 +460,25 @@ def delete_model_by_id_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_model_by_id_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '404': None, + "204": None, + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _delete_model_by_id_serialize( self, id, @@ -517,11 +487,9 @@ def _delete_model_by_id_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -532,23 +500,18 @@ def _delete_model_by_id_serialize( # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v1/models/{id}', + method="DELETE", + resource_path="/v1/models/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -558,12 +521,9 @@ def _delete_model_by_id_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def get_legacy_model_by_id( self, @@ -572,9 +532,8 @@ def get_legacy_model_by_id( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -607,23 +566,22 @@ def get_legacy_model_by_id( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_legacy_model_by_id_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Model", - '404': None, + "200": "Model", + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -631,7 +589,6 @@ def get_legacy_model_by_id( response_types_map=_response_types_map, ).data - @validate_call def get_legacy_model_by_id_with_http_info( self, @@ -640,9 +597,8 @@ def get_legacy_model_by_id_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -675,23 +631,22 @@ def get_legacy_model_by_id_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_legacy_model_by_id_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Model", - '404': None, + "200": "Model", + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -699,7 +654,6 @@ def get_legacy_model_by_id_with_http_info( response_types_map=_response_types_map, ) - @validate_call def get_legacy_model_by_id_without_preload_content( self, @@ -708,9 +662,8 @@ def get_legacy_model_by_id_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -743,27 +696,25 @@ def get_legacy_model_by_id_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_legacy_model_by_id_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Model", - '404': None, + "200": "Model", + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _get_legacy_model_by_id_serialize( self, id, @@ -772,11 +723,9 @@ def _get_legacy_model_by_id_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -787,30 +736,24 @@ def _get_legacy_model_by_id_serialize( # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/v1/models/legacy/{id}', + method="GET", + resource_path="/v1/models/legacy/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -820,12 +763,9 @@ def _get_legacy_model_by_id_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def get_model_by_id( self, @@ -834,9 +774,8 @@ def get_model_by_id( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -869,23 +808,22 @@ def get_model_by_id( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_model_by_id_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Model", - '404': None, + "200": "Model", + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -893,7 +831,6 @@ def get_model_by_id( response_types_map=_response_types_map, ).data - @validate_call def get_model_by_id_with_http_info( self, @@ -902,9 +839,8 @@ def get_model_by_id_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -937,23 +873,22 @@ def get_model_by_id_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_model_by_id_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Model", - '404': None, + "200": "Model", + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -961,7 +896,6 @@ def get_model_by_id_with_http_info( response_types_map=_response_types_map, ) - @validate_call def get_model_by_id_without_preload_content( self, @@ -970,9 +904,8 @@ def get_model_by_id_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1005,27 +938,25 @@ def get_model_by_id_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_model_by_id_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Model", - '404': None, + "200": "Model", + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _get_model_by_id_serialize( self, id, @@ -1034,11 +965,9 @@ def _get_model_by_id_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1049,30 +978,24 @@ def _get_model_by_id_serialize( # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/v1/models/{id}', + method="GET", + resource_path="/v1/models/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1082,12 +1005,9 @@ def _get_model_by_id_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def get_models( self, @@ -1098,9 +1018,8 @@ def get_models( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1136,7 +1055,7 @@ def get_models( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_models_serialize( page=page, @@ -1145,16 +1064,15 @@ def get_models( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetModels200Response", - '400': None, + "200": "GetModels200Response", + "400": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1162,7 +1080,6 @@ def get_models( response_types_map=_response_types_map, ).data - @validate_call def get_models_with_http_info( self, @@ -1173,9 +1090,8 @@ def get_models_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1211,7 +1127,7 @@ def get_models_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_models_serialize( page=page, @@ -1220,16 +1136,15 @@ def get_models_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetModels200Response", - '400': None, + "200": "GetModels200Response", + "400": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1237,7 +1152,6 @@ def get_models_with_http_info( response_types_map=_response_types_map, ) - @validate_call def get_models_without_preload_content( self, @@ -1248,9 +1162,8 @@ def get_models_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1286,7 +1199,7 @@ def get_models_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_models_serialize( page=page, @@ -1295,20 +1208,18 @@ def get_models_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetModels200Response", - '400': None, + "200": "GetModels200Response", + "400": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _get_models_serialize( self, page, @@ -1319,11 +1230,10 @@ def _get_models_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None _collection_formats: Dict[str, str] = { - 'sort': 'multi', + "sort": "multi", } _path_params: Dict[str, str] = {} @@ -1336,39 +1246,30 @@ def _get_models_serialize( # process the path parameters # process the query parameters if page is not None: - - _query_params.append(('page', page)) - + _query_params.append(("page", page)) + if size is not None: - - _query_params.append(('size', size)) - + _query_params.append(("size", size)) + if sort is not None: - - _query_params.append(('sort', sort)) - + _query_params.append(("sort", sort)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/v1/user/models', + method="GET", + resource_path="/v1/user/models", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1378,12 +1279,9 @@ def _get_models_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def get_shared_models( self, @@ -1395,9 +1293,8 @@ def get_shared_models( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1435,7 +1332,7 @@ def get_shared_models( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_shared_models_serialize( page=page, @@ -1445,16 +1342,15 @@ def get_shared_models( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetModels200Response", - '400': None, + "200": "GetModels200Response", + "400": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1462,7 +1358,6 @@ def get_shared_models( response_types_map=_response_types_map, ).data - @validate_call def get_shared_models_with_http_info( self, @@ -1474,9 +1369,8 @@ def get_shared_models_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1514,7 +1408,7 @@ def get_shared_models_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_shared_models_serialize( page=page, @@ -1524,16 +1418,15 @@ def get_shared_models_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetModels200Response", - '400': None, + "200": "GetModels200Response", + "400": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1541,7 +1434,6 @@ def get_shared_models_with_http_info( response_types_map=_response_types_map, ) - @validate_call def get_shared_models_without_preload_content( self, @@ -1553,9 +1445,8 @@ def get_shared_models_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1593,7 +1484,7 @@ def get_shared_models_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_shared_models_serialize( page=page, @@ -1603,20 +1494,18 @@ def get_shared_models_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetModels200Response", - '400': None, + "200": "GetModels200Response", + "400": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _get_shared_models_serialize( self, page, @@ -1628,11 +1517,10 @@ def _get_shared_models_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None _collection_formats: Dict[str, str] = { - 'sort': 'multi', + "sort": "multi", } _path_params: Dict[str, str] = {} @@ -1645,43 +1533,33 @@ def _get_shared_models_serialize( # process the path parameters # process the query parameters if page is not None: - - _query_params.append(('page', page)) - + _query_params.append(("page", page)) + if size is not None: - - _query_params.append(('size', size)) - + _query_params.append(("size", size)) + if sort is not None: - - _query_params.append(('sort', sort)) - + _query_params.append(("sort", sort)) + if organization_id is not None: - - _query_params.append(('organizationId', organization_id)) - + _query_params.append(("organizationId", organization_id)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/v1/user/shared-models', + method="GET", + resource_path="/v1/user/shared-models", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1691,12 +1569,9 @@ def _get_shared_models_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def partially_update_model( self, @@ -1706,9 +1581,8 @@ def partially_update_model( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1742,7 +1616,7 @@ def partially_update_model( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._partially_update_model_serialize( id=id, @@ -1750,17 +1624,16 @@ def partially_update_model( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Model", - '404': None, - '400': None, + "200": "Model", + "404": None, + "400": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1768,7 +1641,6 @@ def partially_update_model( response_types_map=_response_types_map, ).data - @validate_call def partially_update_model_with_http_info( self, @@ -1778,9 +1650,8 @@ def partially_update_model_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1814,7 +1685,7 @@ def partially_update_model_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._partially_update_model_serialize( id=id, @@ -1822,17 +1693,16 @@ def partially_update_model_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Model", - '404': None, - '400': None, + "200": "Model", + "404": None, + "400": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1840,7 +1710,6 @@ def partially_update_model_with_http_info( response_types_map=_response_types_map, ) - @validate_call def partially_update_model_without_preload_content( self, @@ -1850,9 +1719,8 @@ def partially_update_model_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1886,7 +1754,7 @@ def partially_update_model_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._partially_update_model_serialize( id=id, @@ -1894,21 +1762,19 @@ def partially_update_model_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Model", - '404': None, - '400': None, + "200": "Model", + "404": None, + "400": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _partially_update_model_serialize( self, id, @@ -1918,11 +1784,9 @@ def _partially_update_model_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1933,7 +1797,7 @@ def _partially_update_model_serialize( # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id # process the query parameters # process the header parameters # process the form parameters @@ -1941,37 +1805,28 @@ def _partially_update_model_serialize( if partially_update_model_request is not None: _body_params = partially_update_model_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/v1/models/{id}/partial', + method="PATCH", + resource_path="/v1/models/{id}/partial", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1981,24 +1836,22 @@ def _partially_update_model_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def predict_with_model( self, - model_id: Annotated[StrictInt, Field(description="The ID of the model to use for prediction")], + model_id: Annotated[ + StrictInt, Field(description="The ID of the model to use for prediction") + ], dataset: Dataset, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2033,7 +1886,7 @@ def predict_with_model( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._predict_with_model_serialize( model_id=model_id, @@ -2041,18 +1894,17 @@ def predict_with_model( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '404': None, - '500': None, + "201": None, + "400": None, + "404": None, + "500": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2060,19 +1912,19 @@ def predict_with_model( response_types_map=_response_types_map, ).data - @validate_call def predict_with_model_with_http_info( self, - model_id: Annotated[StrictInt, Field(description="The ID of the model to use for prediction")], + model_id: Annotated[ + StrictInt, Field(description="The ID of the model to use for prediction") + ], dataset: Dataset, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2107,7 +1959,7 @@ def predict_with_model_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._predict_with_model_serialize( model_id=model_id, @@ -2115,18 +1967,17 @@ def predict_with_model_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '404': None, - '500': None, + "201": None, + "400": None, + "404": None, + "500": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2134,19 +1985,19 @@ def predict_with_model_with_http_info( response_types_map=_response_types_map, ) - @validate_call def predict_with_model_without_preload_content( self, - model_id: Annotated[StrictInt, Field(description="The ID of the model to use for prediction")], + model_id: Annotated[ + StrictInt, Field(description="The ID of the model to use for prediction") + ], dataset: Dataset, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2181,7 +2032,7 @@ def predict_with_model_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._predict_with_model_serialize( model_id=model_id, @@ -2189,22 +2040,20 @@ def predict_with_model_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '404': None, - '500': None, + "201": None, + "400": None, + "404": None, + "500": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _predict_with_model_serialize( self, model_id, @@ -2214,11 +2063,9 @@ def _predict_with_model_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2229,7 +2076,7 @@ def _predict_with_model_serialize( # process the path parameters if model_id is not None: - _path_params['modelId'] = model_id + _path_params["modelId"] = model_id # process the query parameters # process the header parameters # process the form parameters @@ -2237,30 +2084,22 @@ def _predict_with_model_serialize( if dataset is not None: _body_params = dataset - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/v1/models/{modelId}/predict', + method="POST", + resource_path="/v1/models/{modelId}/predict", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2270,24 +2109,22 @@ def _predict_with_model_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def predict_with_model_csv( self, - model_id: Annotated[StrictInt, Field(description="The ID of the model to use for prediction")], + model_id: Annotated[ + StrictInt, Field(description="The ID of the model to use for prediction") + ], dataset_csv: DatasetCSV, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2322,7 +2159,7 @@ def predict_with_model_csv( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._predict_with_model_csv_serialize( model_id=model_id, @@ -2330,18 +2167,17 @@ def predict_with_model_csv( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '404': None, - '500': None, + "201": None, + "400": None, + "404": None, + "500": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2349,19 +2185,19 @@ def predict_with_model_csv( response_types_map=_response_types_map, ).data - @validate_call def predict_with_model_csv_with_http_info( self, - model_id: Annotated[StrictInt, Field(description="The ID of the model to use for prediction")], + model_id: Annotated[ + StrictInt, Field(description="The ID of the model to use for prediction") + ], dataset_csv: DatasetCSV, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2396,7 +2232,7 @@ def predict_with_model_csv_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._predict_with_model_csv_serialize( model_id=model_id, @@ -2404,18 +2240,17 @@ def predict_with_model_csv_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '404': None, - '500': None, + "201": None, + "400": None, + "404": None, + "500": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2423,19 +2258,19 @@ def predict_with_model_csv_with_http_info( response_types_map=_response_types_map, ) - @validate_call def predict_with_model_csv_without_preload_content( self, - model_id: Annotated[StrictInt, Field(description="The ID of the model to use for prediction")], + model_id: Annotated[ + StrictInt, Field(description="The ID of the model to use for prediction") + ], dataset_csv: DatasetCSV, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2470,7 +2305,7 @@ def predict_with_model_csv_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._predict_with_model_csv_serialize( model_id=model_id, @@ -2478,22 +2313,20 @@ def predict_with_model_csv_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '404': None, - '500': None, + "201": None, + "400": None, + "404": None, + "500": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _predict_with_model_csv_serialize( self, model_id, @@ -2503,11 +2336,9 @@ def _predict_with_model_csv_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2518,7 +2349,7 @@ def _predict_with_model_csv_serialize( # process the path parameters if model_id is not None: - _path_params['modelId'] = model_id + _path_params["modelId"] = model_id # process the query parameters # process the header parameters # process the form parameters @@ -2526,30 +2357,22 @@ def _predict_with_model_csv_serialize( if dataset_csv is not None: _body_params = dataset_csv - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/v1/models/{modelId}/predict/csv', + method="POST", + resource_path="/v1/models/{modelId}/predict/csv", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2559,12 +2382,9 @@ def _predict_with_model_csv_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def search_models( self, @@ -2575,9 +2395,8 @@ def search_models( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2613,7 +2432,7 @@ def search_models( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._search_models_serialize( query=query, @@ -2622,16 +2441,15 @@ def search_models( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetModels200Response", - '400': None, + "200": "GetModels200Response", + "400": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2639,7 +2457,6 @@ def search_models( response_types_map=_response_types_map, ).data - @validate_call def search_models_with_http_info( self, @@ -2650,9 +2467,8 @@ def search_models_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2688,7 +2504,7 @@ def search_models_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._search_models_serialize( query=query, @@ -2697,16 +2513,15 @@ def search_models_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetModels200Response", - '400': None, + "200": "GetModels200Response", + "400": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2714,7 +2529,6 @@ def search_models_with_http_info( response_types_map=_response_types_map, ) - @validate_call def search_models_without_preload_content( self, @@ -2725,9 +2539,8 @@ def search_models_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2763,7 +2576,7 @@ def search_models_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._search_models_serialize( query=query, @@ -2772,20 +2585,18 @@ def search_models_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetModels200Response", - '400': None, + "200": "GetModels200Response", + "400": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _search_models_serialize( self, query, @@ -2796,11 +2607,9 @@ def _search_models_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2812,39 +2621,30 @@ def _search_models_serialize( # process the path parameters # process the query parameters if query is not None: - - _query_params.append(('query', query)) - + _query_params.append(("query", query)) + if page is not None: - - _query_params.append(('page', page)) - + _query_params.append(("page", page)) + if size is not None: - - _query_params.append(('size', size)) - + _query_params.append(("size", size)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/v1/models/search', + method="GET", + resource_path="/v1/models/search", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2854,7 +2654,5 @@ def _search_models_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/jaqpotpy/api/openapi/api/organization_api.py b/jaqpotpy/api/openapi/api/organization_api.py index 53e97f02..fa50f33d 100644 --- a/jaqpotpy/api/openapi/api/organization_api.py +++ b/jaqpotpy/api/openapi/api/organization_api.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 import warnings @@ -20,7 +20,9 @@ from pydantic import StrictInt, StrictStr from typing import List from jaqpotpy.api.openapi.models.organization import Organization -from jaqpotpy.api.openapi.models.partial_update_organization_request import PartialUpdateOrganizationRequest +from jaqpotpy.api.openapi.models.partial_update_organization_request import ( + PartialUpdateOrganizationRequest, +) from jaqpotpy.api.openapi.api_client import ApiClient, RequestSerialized from jaqpotpy.api.openapi.api_response import ApiResponse @@ -39,7 +41,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def create_organization( self, @@ -48,9 +49,8 @@ def create_organization( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -82,22 +82,21 @@ def create_organization( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_organization_serialize( organization=organization, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + "201": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -105,7 +104,6 @@ def create_organization( response_types_map=_response_types_map, ).data - @validate_call def create_organization_with_http_info( self, @@ -114,9 +112,8 @@ def create_organization_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -148,22 +145,21 @@ def create_organization_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_organization_serialize( organization=organization, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + "201": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -171,7 +167,6 @@ def create_organization_with_http_info( response_types_map=_response_types_map, ) - @validate_call def create_organization_without_preload_content( self, @@ -180,9 +175,8 @@ def create_organization_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -214,26 +208,24 @@ def create_organization_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_organization_serialize( organization=organization, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + "201": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _create_organization_serialize( self, organization, @@ -242,11 +234,9 @@ def _create_organization_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -263,30 +253,22 @@ def _create_organization_serialize( if organization is not None: _body_params = organization - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/v1/organizations', + method="POST", + resource_path="/v1/organizations", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -296,12 +278,9 @@ def _create_organization_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def get_all_organizations_by_user( self, @@ -309,9 +288,8 @@ def get_all_organizations_by_user( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -341,21 +319,20 @@ def get_all_organizations_by_user( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_all_organizations_by_user_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Organization]", + "200": "List[Organization]", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -363,7 +340,6 @@ def get_all_organizations_by_user( response_types_map=_response_types_map, ).data - @validate_call def get_all_organizations_by_user_with_http_info( self, @@ -371,9 +347,8 @@ def get_all_organizations_by_user_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -403,21 +378,20 @@ def get_all_organizations_by_user_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_all_organizations_by_user_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Organization]", + "200": "List[Organization]", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -425,7 +399,6 @@ def get_all_organizations_by_user_with_http_info( response_types_map=_response_types_map, ) - @validate_call def get_all_organizations_by_user_without_preload_content( self, @@ -433,9 +406,8 @@ def get_all_organizations_by_user_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -465,25 +437,23 @@ def get_all_organizations_by_user_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_all_organizations_by_user_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Organization]", + "200": "List[Organization]", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _get_all_organizations_by_user_serialize( self, _request_auth, @@ -491,11 +461,9 @@ def _get_all_organizations_by_user_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -510,24 +478,18 @@ def _get_all_organizations_by_user_serialize( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/v1/user/organizations', + method="GET", + resource_path="/v1/user/organizations", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -537,12 +499,9 @@ def _get_all_organizations_by_user_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def get_all_organizations_for_user( self, @@ -550,9 +509,8 @@ def get_all_organizations_for_user( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -582,21 +540,20 @@ def get_all_organizations_for_user( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_all_organizations_for_user_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Organization]", + "200": "List[Organization]", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -604,7 +561,6 @@ def get_all_organizations_for_user( response_types_map=_response_types_map, ).data - @validate_call def get_all_organizations_for_user_with_http_info( self, @@ -612,9 +568,8 @@ def get_all_organizations_for_user_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -644,21 +599,20 @@ def get_all_organizations_for_user_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_all_organizations_for_user_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Organization]", + "200": "List[Organization]", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -666,7 +620,6 @@ def get_all_organizations_for_user_with_http_info( response_types_map=_response_types_map, ) - @validate_call def get_all_organizations_for_user_without_preload_content( self, @@ -674,9 +627,8 @@ def get_all_organizations_for_user_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -706,25 +658,23 @@ def get_all_organizations_for_user_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_all_organizations_for_user_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Organization]", + "200": "List[Organization]", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _get_all_organizations_for_user_serialize( self, _request_auth, @@ -732,11 +682,9 @@ def _get_all_organizations_for_user_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -751,24 +699,18 @@ def _get_all_organizations_for_user_serialize( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/v1/organizations', + method="GET", + resource_path="/v1/organizations", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -778,12 +720,9 @@ def _get_all_organizations_for_user_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def get_organization_by_name( self, @@ -792,9 +731,8 @@ def get_organization_by_name( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -826,23 +764,22 @@ def get_organization_by_name( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_by_name_serialize( name=name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Organization", - '404': None, + "200": "Organization", + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -850,7 +787,6 @@ def get_organization_by_name( response_types_map=_response_types_map, ).data - @validate_call def get_organization_by_name_with_http_info( self, @@ -859,9 +795,8 @@ def get_organization_by_name_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -893,23 +828,22 @@ def get_organization_by_name_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_by_name_serialize( name=name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Organization", - '404': None, + "200": "Organization", + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -917,7 +851,6 @@ def get_organization_by_name_with_http_info( response_types_map=_response_types_map, ) - @validate_call def get_organization_by_name_without_preload_content( self, @@ -926,9 +859,8 @@ def get_organization_by_name_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -960,27 +892,25 @@ def get_organization_by_name_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_by_name_serialize( name=name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Organization", - '404': None, + "200": "Organization", + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _get_organization_by_name_serialize( self, name, @@ -989,11 +919,9 @@ def _get_organization_by_name_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1004,30 +932,24 @@ def _get_organization_by_name_serialize( # process the path parameters if name is not None: - _path_params['name'] = name + _path_params["name"] = name # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/v1/organizations/{name}', + method="GET", + resource_path="/v1/organizations/{name}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1037,12 +959,9 @@ def _get_organization_by_name_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def partial_update_organization( self, @@ -1052,9 +971,8 @@ def partial_update_organization( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1088,7 +1006,7 @@ def partial_update_organization( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._partial_update_organization_serialize( id=id, @@ -1096,16 +1014,15 @@ def partial_update_organization( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Organization", - '404': None, + "200": "Organization", + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1113,7 +1030,6 @@ def partial_update_organization( response_types_map=_response_types_map, ).data - @validate_call def partial_update_organization_with_http_info( self, @@ -1123,9 +1039,8 @@ def partial_update_organization_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1159,7 +1074,7 @@ def partial_update_organization_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._partial_update_organization_serialize( id=id, @@ -1167,16 +1082,15 @@ def partial_update_organization_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Organization", - '404': None, + "200": "Organization", + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1184,7 +1098,6 @@ def partial_update_organization_with_http_info( response_types_map=_response_types_map, ) - @validate_call def partial_update_organization_without_preload_content( self, @@ -1194,9 +1107,8 @@ def partial_update_organization_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1230,7 +1142,7 @@ def partial_update_organization_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._partial_update_organization_serialize( id=id, @@ -1238,20 +1150,18 @@ def partial_update_organization_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Organization", - '404': None, + "200": "Organization", + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _partial_update_organization_serialize( self, id, @@ -1261,11 +1171,9 @@ def _partial_update_organization_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1276,7 +1184,7 @@ def _partial_update_organization_serialize( # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id # process the query parameters # process the header parameters # process the form parameters @@ -1284,37 +1192,28 @@ def _partial_update_organization_serialize( if partial_update_organization_request is not None: _body_params = partial_update_organization_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/v1/organizations/{id}/partial', + method="PATCH", + resource_path="/v1/organizations/{id}/partial", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1324,7 +1223,5 @@ def _partial_update_organization_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/jaqpotpy/api/openapi/api/organization_invitation_api.py b/jaqpotpy/api/openapi/api/organization_invitation_api.py index a06567db..5508e505 100644 --- a/jaqpotpy/api/openapi/api/organization_invitation_api.py +++ b/jaqpotpy/api/openapi/api/organization_invitation_api.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 import warnings @@ -20,7 +20,9 @@ from pydantic import Field, StrictInt, StrictStr from typing import List from typing_extensions import Annotated -from jaqpotpy.api.openapi.models.create_invitations_request import CreateInvitationsRequest +from jaqpotpy.api.openapi.models.create_invitations_request import ( + CreateInvitationsRequest, +) from jaqpotpy.api.openapi.models.organization_invitation import OrganizationInvitation from jaqpotpy.api.openapi.api_client import ApiClient, RequestSerialized @@ -40,19 +42,19 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def create_invitations( self, org_name: Annotated[StrictStr, Field(description="Name of the organization")], - create_invitations_request: Annotated[CreateInvitationsRequest, Field(description="Invitation request payload")], + create_invitations_request: Annotated[ + CreateInvitationsRequest, Field(description="Invitation request payload") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -87,7 +89,7 @@ def create_invitations( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_invitations_serialize( org_name=org_name, @@ -95,18 +97,17 @@ def create_invitations( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '401': None, - '429': None, + "201": None, + "400": None, + "401": None, + "429": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -114,19 +115,19 @@ def create_invitations( response_types_map=_response_types_map, ).data - @validate_call def create_invitations_with_http_info( self, org_name: Annotated[StrictStr, Field(description="Name of the organization")], - create_invitations_request: Annotated[CreateInvitationsRequest, Field(description="Invitation request payload")], + create_invitations_request: Annotated[ + CreateInvitationsRequest, Field(description="Invitation request payload") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -161,7 +162,7 @@ def create_invitations_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_invitations_serialize( org_name=org_name, @@ -169,18 +170,17 @@ def create_invitations_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '401': None, - '429': None, + "201": None, + "400": None, + "401": None, + "429": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -188,19 +188,19 @@ def create_invitations_with_http_info( response_types_map=_response_types_map, ) - @validate_call def create_invitations_without_preload_content( self, org_name: Annotated[StrictStr, Field(description="Name of the organization")], - create_invitations_request: Annotated[CreateInvitationsRequest, Field(description="Invitation request payload")], + create_invitations_request: Annotated[ + CreateInvitationsRequest, Field(description="Invitation request payload") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -235,7 +235,7 @@ def create_invitations_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_invitations_serialize( org_name=org_name, @@ -243,22 +243,20 @@ def create_invitations_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '401': None, - '429': None, + "201": None, + "400": None, + "401": None, + "429": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _create_invitations_serialize( self, org_name, @@ -268,11 +266,9 @@ def _create_invitations_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -283,7 +279,7 @@ def _create_invitations_serialize( # process the path parameters if org_name is not None: - _path_params['orgName'] = org_name + _path_params["orgName"] = org_name # process the query parameters # process the header parameters # process the form parameters @@ -291,30 +287,22 @@ def _create_invitations_serialize( if create_invitations_request is not None: _body_params = create_invitations_request - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/v1/organizations/{orgName}/invitations', + method="POST", + resource_path="/v1/organizations/{orgName}/invitations", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -324,12 +312,9 @@ def _create_invitations_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def get_all_invitations( self, @@ -338,9 +323,8 @@ def get_all_invitations( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -373,25 +357,24 @@ def get_all_invitations( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_all_invitations_serialize( org_name=org_name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OrganizationInvitation]", - '400': "ErrorResponse", - '401': "ErrorResponse", - '404': "ErrorResponse", + "200": "List[OrganizationInvitation]", + "400": "ErrorResponse", + "401": "ErrorResponse", + "404": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -399,7 +382,6 @@ def get_all_invitations( response_types_map=_response_types_map, ).data - @validate_call def get_all_invitations_with_http_info( self, @@ -408,9 +390,8 @@ def get_all_invitations_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -443,25 +424,24 @@ def get_all_invitations_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_all_invitations_serialize( org_name=org_name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OrganizationInvitation]", - '400': "ErrorResponse", - '401': "ErrorResponse", - '404': "ErrorResponse", + "200": "List[OrganizationInvitation]", + "400": "ErrorResponse", + "401": "ErrorResponse", + "404": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -469,7 +449,6 @@ def get_all_invitations_with_http_info( response_types_map=_response_types_map, ) - @validate_call def get_all_invitations_without_preload_content( self, @@ -478,9 +457,8 @@ def get_all_invitations_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -513,29 +491,27 @@ def get_all_invitations_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_all_invitations_serialize( org_name=org_name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OrganizationInvitation]", - '400': "ErrorResponse", - '401': "ErrorResponse", - '404': "ErrorResponse", + "200": "List[OrganizationInvitation]", + "400": "ErrorResponse", + "401": "ErrorResponse", + "404": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _get_all_invitations_serialize( self, org_name, @@ -544,11 +520,9 @@ def _get_all_invitations_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -559,30 +533,24 @@ def _get_all_invitations_serialize( # process the path parameters if org_name is not None: - _path_params['orgName'] = org_name + _path_params["orgName"] = org_name # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/v1/organizations/{orgName}/invitations', + method="GET", + resource_path="/v1/organizations/{orgName}/invitations", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -592,12 +560,9 @@ def _get_all_invitations_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def get_invitation( self, @@ -607,9 +572,8 @@ def get_invitation( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -644,7 +608,7 @@ def get_invitation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_invitation_serialize( name=name, @@ -652,17 +616,16 @@ def get_invitation( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OrganizationInvitation", - '400': None, - '404': None, + "200": "OrganizationInvitation", + "400": None, + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -670,7 +633,6 @@ def get_invitation( response_types_map=_response_types_map, ).data - @validate_call def get_invitation_with_http_info( self, @@ -680,9 +642,8 @@ def get_invitation_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -717,7 +678,7 @@ def get_invitation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_invitation_serialize( name=name, @@ -725,17 +686,16 @@ def get_invitation_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OrganizationInvitation", - '400': None, - '404': None, + "200": "OrganizationInvitation", + "400": None, + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -743,7 +703,6 @@ def get_invitation_with_http_info( response_types_map=_response_types_map, ) - @validate_call def get_invitation_without_preload_content( self, @@ -753,9 +712,8 @@ def get_invitation_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -790,7 +748,7 @@ def get_invitation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_invitation_serialize( name=name, @@ -798,21 +756,19 @@ def get_invitation_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OrganizationInvitation", - '400': None, - '404': None, + "200": "OrganizationInvitation", + "400": None, + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _get_invitation_serialize( self, name, @@ -822,11 +778,9 @@ def _get_invitation_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -837,32 +791,26 @@ def _get_invitation_serialize( # process the path parameters if name is not None: - _path_params['name'] = name + _path_params["name"] = name if uuid is not None: - _path_params['uuid'] = uuid + _path_params["uuid"] = uuid # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/v1/organizations/{name}/invitations/{uuid}', + method="GET", + resource_path="/v1/organizations/{name}/invitations/{uuid}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -872,12 +820,9 @@ def _get_invitation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def resend_invitation( self, @@ -887,9 +832,8 @@ def resend_invitation( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -924,7 +868,7 @@ def resend_invitation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resend_invitation_serialize( org_id=org_id, @@ -932,19 +876,18 @@ def resend_invitation( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "ErrorResponse", - '401': "ErrorResponse", - '404': "ErrorResponse", - '410': "ErrorResponse", + "200": None, + "400": "ErrorResponse", + "401": "ErrorResponse", + "404": "ErrorResponse", + "410": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -952,7 +895,6 @@ def resend_invitation( response_types_map=_response_types_map, ).data - @validate_call def resend_invitation_with_http_info( self, @@ -962,9 +904,8 @@ def resend_invitation_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -999,7 +940,7 @@ def resend_invitation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resend_invitation_serialize( org_id=org_id, @@ -1007,19 +948,18 @@ def resend_invitation_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "ErrorResponse", - '401': "ErrorResponse", - '404': "ErrorResponse", - '410': "ErrorResponse", + "200": None, + "400": "ErrorResponse", + "401": "ErrorResponse", + "404": "ErrorResponse", + "410": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1027,7 +967,6 @@ def resend_invitation_with_http_info( response_types_map=_response_types_map, ) - @validate_call def resend_invitation_without_preload_content( self, @@ -1037,9 +976,8 @@ def resend_invitation_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1074,7 +1012,7 @@ def resend_invitation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resend_invitation_serialize( org_id=org_id, @@ -1082,23 +1020,21 @@ def resend_invitation_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "ErrorResponse", - '401': "ErrorResponse", - '404': "ErrorResponse", - '410': "ErrorResponse", + "200": None, + "400": "ErrorResponse", + "401": "ErrorResponse", + "404": "ErrorResponse", + "410": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _resend_invitation_serialize( self, org_id, @@ -1108,11 +1044,9 @@ def _resend_invitation_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1123,32 +1057,26 @@ def _resend_invitation_serialize( # process the path parameters if org_id is not None: - _path_params['orgId'] = org_id + _path_params["orgId"] = org_id if id is not None: - _path_params['id'] = id + _path_params["id"] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/v1/organizations/{orgId}/invitations/{id}/resend', + method="POST", + resource_path="/v1/organizations/{orgId}/invitations/{id}/resend", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1158,25 +1086,24 @@ def _resend_invitation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def update_invitation( self, name: Annotated[StrictStr, Field(description="Name of the organization")], uuid: Annotated[StrictStr, Field(description="UUID of the invitation")], - organization_invitation: Annotated[OrganizationInvitation, Field(description="Invitation status update payload")], + organization_invitation: Annotated[ + OrganizationInvitation, + Field(description="Invitation status update payload"), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1213,7 +1140,7 @@ def update_invitation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_invitation_serialize( name=name, @@ -1222,17 +1149,16 @@ def update_invitation( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OrganizationInvitation", - '400': None, - '404': None, + "200": "OrganizationInvitation", + "400": None, + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1240,20 +1166,21 @@ def update_invitation( response_types_map=_response_types_map, ).data - @validate_call def update_invitation_with_http_info( self, name: Annotated[StrictStr, Field(description="Name of the organization")], uuid: Annotated[StrictStr, Field(description="UUID of the invitation")], - organization_invitation: Annotated[OrganizationInvitation, Field(description="Invitation status update payload")], + organization_invitation: Annotated[ + OrganizationInvitation, + Field(description="Invitation status update payload"), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1290,7 +1217,7 @@ def update_invitation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_invitation_serialize( name=name, @@ -1299,17 +1226,16 @@ def update_invitation_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OrganizationInvitation", - '400': None, - '404': None, + "200": "OrganizationInvitation", + "400": None, + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1317,20 +1243,21 @@ def update_invitation_with_http_info( response_types_map=_response_types_map, ) - @validate_call def update_invitation_without_preload_content( self, name: Annotated[StrictStr, Field(description="Name of the organization")], uuid: Annotated[StrictStr, Field(description="UUID of the invitation")], - organization_invitation: Annotated[OrganizationInvitation, Field(description="Invitation status update payload")], + organization_invitation: Annotated[ + OrganizationInvitation, + Field(description="Invitation status update payload"), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1367,7 +1294,7 @@ def update_invitation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_invitation_serialize( name=name, @@ -1376,21 +1303,19 @@ def update_invitation_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OrganizationInvitation", - '400': None, - '404': None, + "200": "OrganizationInvitation", + "400": None, + "404": None, } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _update_invitation_serialize( self, name, @@ -1401,11 +1326,9 @@ def _update_invitation_serialize( _headers, _host_index, ) -> RequestSerialized: - _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1416,9 +1339,9 @@ def _update_invitation_serialize( # process the path parameters if name is not None: - _path_params['name'] = name + _path_params["name"] = name if uuid is not None: - _path_params['uuid'] = uuid + _path_params["uuid"] = uuid # process the query parameters # process the header parameters # process the form parameters @@ -1426,37 +1349,28 @@ def _update_invitation_serialize( if organization_invitation is not None: _body_params = organization_invitation - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='PUT', - resource_path='/v1/organizations/{name}/invitations/{uuid}', + method="PUT", + resource_path="/v1/organizations/{name}/invitations/{uuid}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1466,7 +1380,5 @@ def _update_invitation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/jaqpotpy/api/openapi/api_client.py b/jaqpotpy/api/openapi/api_client.py index 30a66c8b..12c672fd 100644 --- a/jaqpotpy/api/openapi/api_client.py +++ b/jaqpotpy/api/openapi/api_client.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - import datetime from dateutil.parser import parse from enum import Enum @@ -38,11 +37,12 @@ UnauthorizedException, ForbiddenException, NotFoundException, - ServiceException + ServiceException, ) RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + class ApiClient: """Generic API client for OpenAPI client library builds. @@ -61,24 +61,20 @@ class ApiClient: PRIMITIVE_TYPES = (float, bool, bytes, str, int) NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'decimal': decimal.Decimal, - 'object': object, + "int": int, + "long": int, # TODO remove as only py3 is supported? + "float": float, + "str": str, + "bool": bool, + "date": datetime.date, + "datetime": datetime.datetime, + "decimal": decimal.Decimal, + "object": object, } _pool = None def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None + self, configuration=None, header_name=None, header_value=None, cookie=None ) -> None: # use default configuration if none is provided if configuration is None: @@ -91,7 +87,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.user_agent = "OpenAPI-Generator/1.0.0/python" self.client_side_validation = configuration.client_side_validation def __enter__(self): @@ -103,16 +99,15 @@ def __exit__(self, exc_type, exc_value, traceback): @property def user_agent(self): """User agent for this API client""" - return self.default_headers['User-Agent'] + return self.default_headers["User-Agent"] @user_agent.setter def user_agent(self, value): - self.default_headers['User-Agent'] = value + self.default_headers["User-Agent"] = value def set_default_header(self, header_name, header_value): self.default_headers[header_name] = header_value - _default = None @classmethod @@ -148,12 +143,12 @@ def param_serialize( header_params=None, body=None, post_params=None, - files=None, auth_settings=None, + files=None, + auth_settings=None, collection_formats=None, _host=None, - _request_auth=None + _request_auth=None, ) -> RequestSerialized: - """Builds the HTTP request params needed by the request. :param method: Method to call. :param resource_path: Path to method endpoint. @@ -182,35 +177,28 @@ def param_serialize( header_params = header_params or {} header_params.update(self.default_headers) if self.cookie: - header_params['Cookie'] = self.cookie + header_params["Cookie"] = self.cookie if header_params: header_params = self.sanitize_for_serialization(header_params) header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) + self.parameters_to_tuples(header_params, collection_formats) ) # path parameters if path_params: path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) + path_params = self.parameters_to_tuples(path_params, collection_formats) for k, v in path_params: # specified safe chars, encode everything resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) + "{%s}" % k, quote(str(v), safe=config.safe_chars_for_path_param) ) # post parameters if post_params or files: post_params = post_params if post_params else [] post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) + post_params = self.parameters_to_tuples(post_params, collection_formats) if files: post_params.extend(self.files_parameters(files)) @@ -222,7 +210,7 @@ def param_serialize( resource_path, method, body, - request_auth=_request_auth + request_auth=_request_auth, ) # body @@ -239,15 +227,11 @@ def param_serialize( # query parameters if query_params: query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) + url_query = self.parameters_to_url_query(query_params, collection_formats) url += "?" + url_query return method, url, header_params, body, post_params - def call_api( self, method, @@ -255,7 +239,7 @@ def call_api( header_params=None, body=None, post_params=None, - _request_timeout=None + _request_timeout=None, ) -> rest.RESTResponse: """Makes the HTTP request (synchronous) :param method: Method to call. @@ -272,10 +256,12 @@ def call_api( try: # perform request and return response response_data = self.rest_client.request( - method, url, + method, + url, headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout + body=body, + post_params=post_params, + _request_timeout=_request_timeout, ) except ApiException as e: @@ -286,7 +272,7 @@ def call_api( def response_deserialize( self, response_data: rest.RESTResponse, - response_types_map: Optional[Dict[str, ApiResponseT]]=None + response_types_map: Optional[Dict[str, ApiResponseT]] = None, ) -> ApiResponse[ApiResponseT]: """Deserializes response into an object. :param response_data: RESTResponse object to be deserialized. @@ -298,9 +284,15 @@ def response_deserialize( assert response_data.data is not None, msg response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + if ( + not response_type + and isinstance(response_data.status, int) + and 100 <= response_data.status <= 599 + ): # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + response_type = response_types_map.get( + str(response_data.status)[0] + "XX", None + ) # deserialize response data response_text = None @@ -312,12 +304,14 @@ def response_deserialize( return_data = self.__deserialize_file(response_data) elif response_type is not None: match = None - content_type = response_data.getheader('content-type') + content_type = response_data.getheader("content-type") if content_type is not None: match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) encoding = match.group(1) if match else "utf-8" response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type, content_type) + return_data = self.deserialize( + response_text, response_type, content_type + ) finally: if not 200 <= response_data.status <= 299: raise ApiException.from_response( @@ -327,10 +321,10 @@ def response_deserialize( ) return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data + status_code=response_data.status, + data=return_data, + headers=response_data.getheaders(), + raw_data=response_data.data, ) def sanitize_for_serialization(self, obj): @@ -358,13 +352,9 @@ def sanitize_for_serialization(self, obj): elif isinstance(obj, self.PRIMITIVE_TYPES): return obj elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] + return [self.sanitize_for_serialization(sub_obj) for sub_obj in obj] elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) + return tuple(self.sanitize_for_serialization(sub_obj) for sub_obj in obj) elif isinstance(obj, (datetime.datetime, datetime.date)): return obj.isoformat() elif isinstance(obj, decimal.Decimal): @@ -378,17 +368,18 @@ def sanitize_for_serialization(self, obj): # and attributes which value is not None. # Convert attribute name to json key in # model definition for request. - if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + if hasattr(obj, "to_dict") and callable(getattr(obj, "to_dict")): obj_dict = obj.to_dict() else: obj_dict = obj.__dict__ return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() + key: self.sanitize_for_serialization(val) for key, val in obj_dict.items() } - def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): + def deserialize( + self, response_text: str, response_type: str, content_type: Optional[str] + ): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. @@ -414,8 +405,7 @@ def deserialize(self, response_text: str, response_type: str, content_type: Opti data = response_text else: raise ApiException( - status=0, - reason="Unsupported content type: {0}".format(content_type) + status=0, reason="Unsupported content type: {0}".format(content_type) ) return self.__deserialize(data, response_type) @@ -432,19 +422,17 @@ def __deserialize(self, data, klass): return None if isinstance(klass, str): - if klass.startswith('List['): - m = re.match(r'List\[(.*)]', klass) + if klass.startswith("List["): + m = re.match(r"List\[(.*)]", klass) assert m is not None, "Malformed List type definition" sub_kls = m.group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] + return [self.__deserialize(sub_data, sub_kls) for sub_data in data] - if klass.startswith('Dict['): - m = re.match(r'Dict\[([^,]*), (.*)]', klass) + if klass.startswith("Dict["): + m = re.match(r"Dict\[([^,]*), (.*)]", klass) assert m is not None, "Malformed Dict type definition" sub_kls = m.group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} + return {k: self.__deserialize(v, sub_kls) for k, v in data.items()} # convert str to class if klass in self.NATIVE_TYPES_MAPPING: @@ -480,19 +468,18 @@ def parameters_to_tuples(self, params, collection_formats): for k, v in params.items() if isinstance(params, dict) else params: if k in collection_formats: collection_format = collection_formats[k] - if collection_format == 'multi': + if collection_format == "multi": new_params.extend((k, value) for value in v) else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' + if collection_format == "ssv": + delimiter = " " + elif collection_format == "tsv": + delimiter = "\t" + elif collection_format == "pipes": + delimiter = "|" else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) + delimiter = "," + new_params.append((k, delimiter.join(str(value) for value in v))) else: new_params.append((k, v)) return new_params @@ -517,17 +504,17 @@ def parameters_to_url_query(self, params, collection_formats): if k in collection_formats: collection_format = collection_formats[k] - if collection_format == 'multi': + if collection_format == "multi": new_params.extend((k, str(value)) for value in v) else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' + if collection_format == "ssv": + delimiter = " " + elif collection_format == "tsv": + delimiter = "\t" + elif collection_format == "pipes": + delimiter = "|" else: # csv is the default - delimiter = ',' + delimiter = "," new_params.append( (k, delimiter.join(quote(str(value)) for value in v)) ) @@ -545,7 +532,7 @@ def files_parameters(self, files: Dict[str, Union[str, bytes]]): params = [] for k, v in files.items(): if isinstance(v, str): - with open(v, 'rb') as f: + with open(v, "rb") as f: filename = os.path.basename(f.name) filedata = f.read() elif isinstance(v, bytes): @@ -553,13 +540,8 @@ def files_parameters(self, files: Dict[str, Union[str, bytes]]): filedata = v else: raise ValueError("Unsupported file value") - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) + mimetype = mimetypes.guess_type(filename)[0] or "application/octet-stream" + params.append(tuple([k, tuple([filename, filedata, mimetype])])) return params def select_header_accept(self, accepts: List[str]) -> Optional[str]: @@ -572,7 +554,7 @@ def select_header_accept(self, accepts: List[str]) -> Optional[str]: return None for accept in accepts: - if re.search('json', accept, re.IGNORECASE): + if re.search("json", accept, re.IGNORECASE): return accept return accepts[0] @@ -587,7 +569,7 @@ def select_header_content_type(self, content_types): return None for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): + if re.search("json", content_type, re.IGNORECASE): return content_type return content_types[0] @@ -600,7 +582,7 @@ def update_params_for_auth( resource_path, method, body, - request_auth=None + request_auth=None, ) -> None: """Updates header and query params based on authentication setting. @@ -619,34 +601,18 @@ def update_params_for_auth( if request_auth: self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth + headers, queries, resource_path, method, body, request_auth ) else: for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting + headers, queries, resource_path, method, body, auth_setting ) def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting + self, headers, queries, resource_path, method, body, auth_setting ) -> None: """Updates the request parameters based on a single auth_setting @@ -658,17 +624,15 @@ def _apply_auth_params( The object type is the return value of sanitize_for_serialization(). :param auth_setting: auth settings for the endpoint """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) + if auth_setting["in"] == "cookie": + headers["Cookie"] = auth_setting["value"] + elif auth_setting["in"] == "header": + if auth_setting["type"] != "http-signature": + headers[auth_setting["key"]] = auth_setting["value"] + elif auth_setting["in"] == "query": + queries.append((auth_setting["key"], auth_setting["value"])) else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) + raise ApiValueError("Authentication token must be in `query` or `header`") def __deserialize_file(self, response): """Deserializes body to file @@ -688,10 +652,7 @@ def __deserialize_file(self, response): content_disposition = response.getheader("Content-Disposition") if content_disposition: - m = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ) + m = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition) assert m is not None, "Unexpected 'content-disposition' header value" filename = m.group(1) path = os.path.join(os.path.dirname(path), filename) @@ -735,8 +696,7 @@ def __deserialize_date(self, string): return string except ValueError: raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) + status=0, reason="Failed to parse `{0}` as date object".format(string) ) def __deserialize_datetime(self, string): @@ -754,10 +714,7 @@ def __deserialize_datetime(self, string): except ValueError: raise rest.ApiException( status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) + reason=("Failed to parse `{0}` as datetime object".format(string)), ) def __deserialize_enum(self, data, klass): @@ -771,11 +728,7 @@ def __deserialize_enum(self, data, klass): return klass(data) except ValueError: raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as `{1}`" - .format(data, klass) - ) + status=0, reason=("Failed to parse `{0}` as `{1}`".format(data, klass)) ) def __deserialize_model(self, data, klass): diff --git a/jaqpotpy/api/openapi/api_response.py b/jaqpotpy/api/openapi/api_response.py index 9bc7c11f..1ce13729 100644 --- a/jaqpotpy/api/openapi/api_response.py +++ b/jaqpotpy/api/openapi/api_response.py @@ -6,6 +6,7 @@ T = TypeVar("T") + class ApiResponse(BaseModel, Generic[T]): """ API response object @@ -16,6 +17,4 @@ class ApiResponse(BaseModel, Generic[T]): data: T = Field(description="Deserialized data given the data type") raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - model_config = { - "arbitrary_types_allowed": True - } + model_config = {"arbitrary_types_allowed": True} diff --git a/jaqpotpy/api/openapi/configuration.py b/jaqpotpy/api/openapi/configuration.py index 1f09b0be..6230baaa 100644 --- a/jaqpotpy/api/openapi/configuration.py +++ b/jaqpotpy/api/openapi/configuration.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - import copy import logging from logging import FileHandler @@ -24,11 +23,19 @@ import http.client as httplib JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' + "multipleOf", + "maximum", + "exclusiveMaximum", + "minimum", + "exclusiveMinimum", + "maxLength", + "minLength", + "pattern", + "maxItems", + "minItems", } + class Configuration: """This class contains various settings of the API client. @@ -65,20 +72,25 @@ class Configuration: _default = None - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - access_token=None, - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ignore_operation_servers=False, - ssl_ca_cert=None, - retries=None, - *, - debug: Optional[bool] = None - ) -> None: - """Constructor - """ + def __init__( + self, + host=None, + api_key=None, + api_key_prefix=None, + username=None, + password=None, + access_token=None, + server_index=None, + server_variables=None, + server_operation_index=None, + server_operation_variables=None, + ignore_operation_servers=False, + ssl_ca_cert=None, + retries=None, + *, + debug: Optional[bool] = None, + ) -> None: + """Constructor""" self._base_path = "https://api.jaqpot.org" if host is None else host """Default Base url """ @@ -124,7 +136,7 @@ def __init__(self, host=None, """ self.logger["package_logger"] = logging.getLogger("jaqpotpy.api.openapi") self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' + self.logger_format = "%(asctime)s %(levelname)s %(message)s" """Log format """ self.logger_stream_handler = None @@ -179,7 +191,7 @@ def __init__(self, host=None, self.proxy_headers = None """Proxy headers """ - self.safe_chars_for_path_param = '' + self.safe_chars_for_path_param = "" """Safe chars for path_param """ self.retries = retries @@ -205,7 +217,7 @@ def __deepcopy__(self, memo): result = cls.__new__(cls) memo[id(self)] = result for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): + if k not in ("logger", "logger_file_handler"): setattr(result, k, copy.deepcopy(v, memo)) # shallow copy of loggers result.logger = copy.copy(self.logger) @@ -346,7 +358,9 @@ def get_api_key_with_prefix(self, identifier, alias=None): """ if self.refresh_api_key_hook is not None: self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + key = self.api_key.get( + identifier, self.api_key.get(alias) if alias is not None else None + ) if key: prefix = self.api_key_prefix.get(identifier) if prefix: @@ -365,9 +379,9 @@ def get_basic_auth_token(self): password = "" if self.password is not None: password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') + return urllib3.util.make_headers(basic_auth=username + ":" + password).get( + "authorization" + ) def auth_settings(self): """Gets Auth Settings dict for api client. @@ -376,12 +390,12 @@ def auth_settings(self): """ auth = {} if self.access_token is not None: - auth['bearerAuth'] = { - 'type': 'bearer', - 'in': 'header', - 'format': 'JWT', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token + auth["bearerAuth"] = { + "type": "bearer", + "in": "header", + "format": "JWT", + "key": "Authorization", + "value": "Bearer " + self.access_token, } return auth @@ -390,12 +404,13 @@ def to_debug_report(self): :return: The report for debugging. """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 1.0.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) + return ( + "Python SDK Debug Report:\n" + "OS: {env}\n" + "Python Version: {pyversion}\n" + "Version of the API: 1.0.0\n" + "SDK Package Version: 1.0.0".format(env=sys.platform, pyversion=sys.version) + ) def get_host_settings(self): """Gets an array of host settings @@ -404,8 +419,8 @@ def get_host_settings(self): """ return [ { - 'url': "https://api.jaqpot.org", - 'description': "Jaqpot API", + "url": "https://api.jaqpot.org", + "description": "Jaqpot API", } ] @@ -427,22 +442,22 @@ def get_host_from_settings(self, index, variables=None, servers=None): except IndexError: raise ValueError( "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) + "Must be less than {1}".format(index, len(servers)) + ) - url = server['url'] + url = server["url"] # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) + for variable_name, variable in server.get("variables", {}).items(): + used_value = variables.get(variable_name, variable["default_value"]) - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: + if "enum_values" in variable and used_value not in variable["enum_values"]: raise ValueError( "The variable `{0}` in the host URL has invalid value " "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) + variable_name, variables[variable_name], variable["enum_values"] + ) + ) url = url.replace("{" + variable_name + "}", used_value) @@ -451,7 +466,9 @@ def get_host_from_settings(self, index, variables=None, servers=None): @property def host(self): """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) + return self.get_host_from_settings( + self.server_index, variables=self.server_variables + ) @host.setter def host(self, value): diff --git a/jaqpotpy/api/openapi/exceptions.py b/jaqpotpy/api/openapi/exceptions.py index f9d33430..8daffe74 100644 --- a/jaqpotpy/api/openapi/exceptions.py +++ b/jaqpotpy/api/openapi/exceptions.py @@ -1,28 +1,30 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 from typing import Any, Optional from typing_extensions import Self + class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors + def __init__( + self, msg, path_to_item=None, valid_classes=None, key_type=None + ) -> None: + """Raises an exception for TypeErrors Args: msg (str): the exception message @@ -103,11 +105,10 @@ def __init__(self, msg, path_to_item=None) -> None: class ApiException(OpenApiException): - def __init__( - self, - status=None, - reason=None, + self, + status=None, + reason=None, http_resp=None, *, body: Optional[str] = None, @@ -126,17 +127,17 @@ def __init__( self.reason = http_resp.reason if self.body is None: try: - self.body = http_resp.data.decode('utf-8') + self.body = http_resp.data.decode("utf-8") except Exception: pass self.headers = http_resp.getheaders() @classmethod def from_response( - cls, - *, - http_resp, - body: Optional[str], + cls, + *, + http_resp, + body: Optional[str], data: Optional[Any], ) -> Self: if http_resp.status == 400: @@ -157,11 +158,9 @@ def from_response( def __str__(self): """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) + error_message = "({0})\n" "Reason: {1}\n".format(self.status, self.reason) if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) + error_message += "HTTP response headers: {0}\n".format(self.headers) if self.data or self.body: error_message += "HTTP response body: {0}\n".format(self.data or self.body) diff --git a/jaqpotpy/api/openapi/git_push.sh b/jaqpotpy/api/openapi/git_push.sh deleted file mode 100644 index f53a75d4..00000000 --- a/jaqpotpy/api/openapi/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/jaqpotpy/api/openapi/models/__init__.py b/jaqpotpy/api/openapi/models/__init__.py index 040d7a2b..ec05ab3e 100644 --- a/jaqpotpy/api/openapi/models/__init__.py +++ b/jaqpotpy/api/openapi/models/__init__.py @@ -2,25 +2,30 @@ # flake8: noqa """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - # import models into model package from jaqpotpy.api.openapi.models.api_key import ApiKey -from jaqpotpy.api.openapi.models.binary_classification_scores import BinaryClassificationScores +from jaqpotpy.api.openapi.models.binary_classification_scores import ( + BinaryClassificationScores, +) from jaqpotpy.api.openapi.models.bounding_box_doa import BoundingBoxDoa from jaqpotpy.api.openapi.models.city_block_doa import CityBlockDoa -from jaqpotpy.api.openapi.models.create_api_key201_response import CreateApiKey201Response -from jaqpotpy.api.openapi.models.create_invitations_request import CreateInvitationsRequest +from jaqpotpy.api.openapi.models.create_api_key201_response import ( + CreateApiKey201Response, +) +from jaqpotpy.api.openapi.models.create_invitations_request import ( + CreateInvitationsRequest, +) from jaqpotpy.api.openapi.models.dataset import Dataset from jaqpotpy.api.openapi.models.dataset_csv import DatasetCSV from jaqpotpy.api.openapi.models.dataset_type import DatasetType @@ -31,7 +36,9 @@ from jaqpotpy.api.openapi.models.feature import Feature from jaqpotpy.api.openapi.models.feature_possible_value import FeaturePossibleValue from jaqpotpy.api.openapi.models.feature_type import FeatureType -from jaqpotpy.api.openapi.models.get_all_api_keys_for_user200_response_inner import GetAllApiKeysForUser200ResponseInner +from jaqpotpy.api.openapi.models.get_all_api_keys_for_user200_response_inner import ( + GetAllApiKeysForUser200ResponseInner, +) from jaqpotpy.api.openapi.models.get_datasets200_response import GetDatasets200Response from jaqpotpy.api.openapi.models.get_models200_response import GetModels200Response from jaqpotpy.api.openapi.models.kernel_based_doa import KernelBasedDoa @@ -41,22 +48,31 @@ from jaqpotpy.api.openapi.models.mahalanobis_doa import MahalanobisDoa from jaqpotpy.api.openapi.models.mean_var_doa import MeanVarDoa from jaqpotpy.api.openapi.models.model import Model -from jaqpotpy.api.openapi.models.model_extra_config import ModelExtraConfig from jaqpotpy.api.openapi.models.model_scores import ModelScores from jaqpotpy.api.openapi.models.model_summary import ModelSummary from jaqpotpy.api.openapi.models.model_task import ModelTask from jaqpotpy.api.openapi.models.model_type import ModelType from jaqpotpy.api.openapi.models.model_visibility import ModelVisibility -from jaqpotpy.api.openapi.models.multiclass_classification_scores import MulticlassClassificationScores +from jaqpotpy.api.openapi.models.multiclass_classification_scores import ( + MulticlassClassificationScores, +) from jaqpotpy.api.openapi.models.organization import Organization from jaqpotpy.api.openapi.models.organization_invitation import OrganizationInvitation from jaqpotpy.api.openapi.models.organization_summary import OrganizationSummary from jaqpotpy.api.openapi.models.organization_user import OrganizationUser -from jaqpotpy.api.openapi.models.organization_user_association_type import OrganizationUserAssociationType +from jaqpotpy.api.openapi.models.organization_user_association_type import ( + OrganizationUserAssociationType, +) from jaqpotpy.api.openapi.models.organization_visibility import OrganizationVisibility -from jaqpotpy.api.openapi.models.partial_update_organization_request import PartialUpdateOrganizationRequest -from jaqpotpy.api.openapi.models.partially_update_model_feature_request import PartiallyUpdateModelFeatureRequest -from jaqpotpy.api.openapi.models.partially_update_model_request import PartiallyUpdateModelRequest +from jaqpotpy.api.openapi.models.partial_update_organization_request import ( + PartialUpdateOrganizationRequest, +) +from jaqpotpy.api.openapi.models.partially_update_model_feature_request import ( + PartiallyUpdateModelFeatureRequest, +) +from jaqpotpy.api.openapi.models.partially_update_model_request import ( + PartiallyUpdateModelRequest, +) from jaqpotpy.api.openapi.models.prediction_doa import PredictionDoa from jaqpotpy.api.openapi.models.prediction_model import PredictionModel from jaqpotpy.api.openapi.models.prediction_request import PredictionRequest @@ -64,6 +80,8 @@ from jaqpotpy.api.openapi.models.regression_scores import RegressionScores from jaqpotpy.api.openapi.models.scores import Scores from jaqpotpy.api.openapi.models.transformer import Transformer -from jaqpotpy.api.openapi.models.update_api_key200_response import UpdateApiKey200Response +from jaqpotpy.api.openapi.models.update_api_key200_response import ( + UpdateApiKey200Response, +) from jaqpotpy.api.openapi.models.update_api_key_request import UpdateApiKeyRequest from jaqpotpy.api.openapi.models.user import User diff --git a/jaqpotpy/api/openapi/models/api_key.py b/jaqpotpy/api/openapi/models/api_key.py index 596194a0..ad7aee1d 100644 --- a/jaqpotpy/api/openapi/models/api_key.py +++ b/jaqpotpy/api/openapi/models/api_key.py @@ -1,48 +1,87 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictStr, + field_validator, +) from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self + class ApiKey(BaseModel): """ ApiKey - """ # noqa: E501 - client_key: Optional[StrictStr] = Field(default=None, description="The generated API key", alias="clientKey") - note: Optional[StrictStr] = Field(default=None, description="A note for the API key") - user_id: Optional[StrictStr] = Field(default=None, description="The ID of the user associated with the API key", alias="userId") - expires_at: Optional[datetime] = Field(default=None, description="The expiration time of the API key (if any)", alias="expiresAt") - expiration_time: StrictStr = Field(alias="expirationTime") - last_used: Optional[datetime] = Field(default=None, description="The last time the API key was used", alias="lastUsed") - last_used_ip: Optional[StrictStr] = Field(default=None, description="The IP address from which the API key was last used", alias="lastUsedIp") - enabled: Optional[StrictBool] = Field(default=None, description="Whether the API key is active or disabled") - __properties: ClassVar[List[str]] = ["clientKey", "note", "userId", "expiresAt", "expirationTime", "lastUsed", "lastUsedIp", "enabled"] + """ # noqa: E501 - @field_validator('expiration_time') + client_key: Optional[StrictStr] = Field( + default=None, description="The generated API key", alias="clientKey" + ) + note: Optional[StrictStr] = Field( + default=None, description="A note for the API key" + ) + user_id: Optional[StrictStr] = Field( + default=None, + description="The ID of the user associated with the API key", + alias="userId", + ) + expires_at: Optional[datetime] = Field( + default=None, + description="The expiration time of the API key (if any)", + alias="expiresAt", + ) + expiration_time: StrictStr = Field(alias="expirationTime") + last_used: Optional[datetime] = Field( + default=None, description="The last time the API key was used", alias="lastUsed" + ) + last_used_ip: Optional[StrictStr] = Field( + default=None, + description="The IP address from which the API key was last used", + alias="lastUsedIp", + ) + enabled: Optional[StrictBool] = Field( + default=None, description="Whether the API key is active or disabled" + ) + __properties: ClassVar[List[str]] = [ + "clientKey", + "note", + "userId", + "expiresAt", + "expirationTime", + "lastUsed", + "lastUsedIp", + "enabled", + ] + + @field_validator("expiration_time") def expiration_time_validate_enum(cls, value): """Validates the enum""" - if value not in set(['THREE_MONTHS', 'SIX_MONTHS']): - raise ValueError("must be one of enum values ('THREE_MONTHS', 'SIX_MONTHS')") + if value not in set(["THREE_MONTHS", "SIX_MONTHS"]): + raise ValueError( + "must be one of enum values ('THREE_MONTHS', 'SIX_MONTHS')" + ) return value model_config = ConfigDict( @@ -51,7 +90,6 @@ def expiration_time_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -76,8 +114,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -87,17 +124,17 @@ def to_dict(self) -> Dict[str, Any]: # set to None if expires_at (nullable) is None # and model_fields_set contains the field if self.expires_at is None and "expires_at" in self.model_fields_set: - _dict['expiresAt'] = None + _dict["expiresAt"] = None # set to None if last_used (nullable) is None # and model_fields_set contains the field if self.last_used is None and "last_used" in self.model_fields_set: - _dict['lastUsed'] = None + _dict["lastUsed"] = None # set to None if last_used_ip (nullable) is None # and model_fields_set contains the field if self.last_used_ip is None and "last_used_ip" in self.model_fields_set: - _dict['lastUsedIp'] = None + _dict["lastUsedIp"] = None return _dict @@ -110,16 +147,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "clientKey": obj.get("clientKey"), - "note": obj.get("note"), - "userId": obj.get("userId"), - "expiresAt": obj.get("expiresAt"), - "expirationTime": obj.get("expirationTime"), - "lastUsed": obj.get("lastUsed"), - "lastUsedIp": obj.get("lastUsedIp"), - "enabled": obj.get("enabled") - }) + _obj = cls.model_validate( + { + "clientKey": obj.get("clientKey"), + "note": obj.get("note"), + "userId": obj.get("userId"), + "expiresAt": obj.get("expiresAt"), + "expirationTime": obj.get("expirationTime"), + "lastUsed": obj.get("lastUsed"), + "lastUsedIp": obj.get("lastUsedIp"), + "enabled": obj.get("enabled"), + } + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/binary_classification_scores.py b/jaqpotpy/api/openapi/models/binary_classification_scores.py index edcdc870..f0f9efb4 100644 --- a/jaqpotpy/api/openapi/models/binary_classification_scores.py +++ b/jaqpotpy/api/openapi/models/binary_classification_scores.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -24,21 +23,53 @@ from typing import Optional, Set from typing_extensions import Self + class BinaryClassificationScores(BaseModel): """ BinaryClassificationScores - """ # noqa: E501 + """ # noqa: E501 + labels: Optional[List[StrictStr]] = None y_name: StrictStr = Field(alias="yName") accuracy: Optional[Union[StrictFloat, StrictInt]] = None - balanced_accuracy: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="balancedAccuracy") - precision: Optional[Annotated[List[Union[StrictFloat, StrictInt]], Field(max_length=1000)]] = None - recall: Optional[Annotated[List[Union[StrictFloat, StrictInt]], Field(max_length=1000)]] = None - f1_score: Optional[Annotated[List[Union[StrictFloat, StrictInt]], Field(max_length=1000)]] = Field(default=None, alias="f1Score") - jaccard: Optional[Annotated[List[Union[StrictFloat, StrictInt]], Field(max_length=1000)]] = None - matthews_corr_coef: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="matthewsCorrCoef") - confusion_matrix: Optional[Annotated[List[Annotated[List[Union[StrictFloat, StrictInt]], Field(max_length=1000)]], Field(max_length=1000)]] = Field(default=None, alias="confusionMatrix") - __properties: ClassVar[List[str]] = ["labels", "yName", "accuracy", "balancedAccuracy", "precision", "recall", "f1Score", "jaccard", "matthewsCorrCoef", "confusionMatrix"] + balanced_accuracy: Optional[Union[StrictFloat, StrictInt]] = Field( + default=None, alias="balancedAccuracy" + ) + precision: Optional[ + Annotated[List[Union[StrictFloat, StrictInt]], Field(max_length=1000)] + ] = None + recall: Optional[ + Annotated[List[Union[StrictFloat, StrictInt]], Field(max_length=1000)] + ] = None + f1_score: Optional[ + Annotated[List[Union[StrictFloat, StrictInt]], Field(max_length=1000)] + ] = Field(default=None, alias="f1Score") + jaccard: Optional[ + Annotated[List[Union[StrictFloat, StrictInt]], Field(max_length=1000)] + ] = None + matthews_corr_coef: Optional[Union[StrictFloat, StrictInt]] = Field( + default=None, alias="matthewsCorrCoef" + ) + confusion_matrix: Optional[ + Annotated[ + List[ + Annotated[List[Union[StrictFloat, StrictInt]], Field(max_length=1000)] + ], + Field(max_length=1000), + ] + ] = Field(default=None, alias="confusionMatrix") + __properties: ClassVar[List[str]] = [ + "labels", + "yName", + "accuracy", + "balancedAccuracy", + "precision", + "recall", + "f1Score", + "jaccard", + "matthewsCorrCoef", + "confusionMatrix", + ] model_config = ConfigDict( populate_by_name=True, @@ -46,7 +77,6 @@ class BinaryClassificationScores(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -71,8 +101,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -90,18 +119,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "labels": obj.get("labels"), - "yName": obj.get("yName"), - "accuracy": obj.get("accuracy"), - "balancedAccuracy": obj.get("balancedAccuracy"), - "precision": obj.get("precision"), - "recall": obj.get("recall"), - "f1Score": obj.get("f1Score"), - "jaccard": obj.get("jaccard"), - "matthewsCorrCoef": obj.get("matthewsCorrCoef"), - "confusionMatrix": obj.get("confusionMatrix") - }) + _obj = cls.model_validate( + { + "labels": obj.get("labels"), + "yName": obj.get("yName"), + "accuracy": obj.get("accuracy"), + "balancedAccuracy": obj.get("balancedAccuracy"), + "precision": obj.get("precision"), + "recall": obj.get("recall"), + "f1Score": obj.get("f1Score"), + "jaccard": obj.get("jaccard"), + "matthewsCorrCoef": obj.get("matthewsCorrCoef"), + "confusionMatrix": obj.get("confusionMatrix"), + } + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/bounding_box_doa.py b/jaqpotpy/api/openapi/models/bounding_box_doa.py index fa1f988f..2f4a5b2f 100644 --- a/jaqpotpy/api/openapi/models/bounding_box_doa.py +++ b/jaqpotpy/api/openapi/models/bounding_box_doa.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -20,15 +19,18 @@ from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt from typing import Any, ClassVar, Dict, List, Optional, Union -from typing_extensions import Annotated from typing import Optional, Set from typing_extensions import Self + class BoundingBoxDoa(BaseModel): """ BoundingBoxDoa - """ # noqa: E501 - bounding_box: Optional[Annotated[List[Annotated[List[Union[StrictFloat, StrictInt]], Field(max_length=1000)]], Field(max_length=1000)]] = Field(default=None, alias="boundingBox") + """ # noqa: E501 + + bounding_box: Optional[List[List[Union[StrictFloat, StrictInt]]]] = Field( + default=None, alias="boundingBox" + ) __properties: ClassVar[List[str]] = ["boundingBox"] model_config = ConfigDict( @@ -37,7 +39,6 @@ class BoundingBoxDoa(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,8 +63,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -81,9 +81,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "boundingBox": obj.get("boundingBox") - }) + _obj = cls.model_validate({"boundingBox": obj.get("boundingBox")}) return _obj - - diff --git a/jaqpotpy/api/openapi/models/city_block_doa.py b/jaqpotpy/api/openapi/models/city_block_doa.py index 60445365..e271d1b5 100644 --- a/jaqpotpy/api/openapi/models/city_block_doa.py +++ b/jaqpotpy/api/openapi/models/city_block_doa.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -23,10 +22,12 @@ from typing import Optional, Set from typing_extensions import Self + class CityBlockDoa(BaseModel): """ CityBlockDoa - """ # noqa: E501 + """ # noqa: E501 + data: Optional[Dict[str, Any]] = None __properties: ClassVar[List[str]] = ["data"] @@ -36,7 +37,6 @@ class CityBlockDoa(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,8 +61,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -80,9 +79,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "data": obj.get("data") - }) + _obj = cls.model_validate({"data": obj.get("data")}) return _obj - - diff --git a/jaqpotpy/api/openapi/models/create_api_key201_response.py b/jaqpotpy/api/openapi/models/create_api_key201_response.py index af226f56..7c350322 100644 --- a/jaqpotpy/api/openapi/models/create_api_key201_response.py +++ b/jaqpotpy/api/openapi/models/create_api_key201_response.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -23,12 +22,18 @@ from typing import Optional, Set from typing_extensions import Self + class CreateApiKey201Response(BaseModel): """ CreateApiKey201Response - """ # noqa: E501 - client_key: Optional[StrictStr] = Field(default=None, description="The generated API key", alias="clientKey") - client_secret: Optional[StrictStr] = Field(default=None, description="The generated API secret", alias="clientSecret") + """ # noqa: E501 + + client_key: Optional[StrictStr] = Field( + default=None, description="The generated API key", alias="clientKey" + ) + client_secret: Optional[StrictStr] = Field( + default=None, description="The generated API secret", alias="clientSecret" + ) __properties: ClassVar[List[str]] = ["clientKey", "clientSecret"] model_config = ConfigDict( @@ -37,7 +42,6 @@ class CreateApiKey201Response(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,8 +66,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -81,10 +84,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "clientKey": obj.get("clientKey"), - "clientSecret": obj.get("clientSecret") - }) + _obj = cls.model_validate( + {"clientKey": obj.get("clientKey"), "clientSecret": obj.get("clientSecret")} + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/create_invitations_request.py b/jaqpotpy/api/openapi/models/create_invitations_request.py index f34b2f78..212b70aa 100644 --- a/jaqpotpy/api/openapi/models/create_invitations_request.py +++ b/jaqpotpy/api/openapi/models/create_invitations_request.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -24,11 +23,15 @@ from typing import Optional, Set from typing_extensions import Self + class CreateInvitationsRequest(BaseModel): """ CreateInvitationsRequest - """ # noqa: E501 - emails: Optional[Annotated[List[StrictStr], Field(min_length=1, max_length=10)]] = Field(default=None, description="List of email addresses to invite") + """ # noqa: E501 + + emails: Optional[Annotated[List[StrictStr], Field(min_length=1, max_length=10)]] = ( + Field(default=None, description="List of email addresses to invite") + ) __properties: ClassVar[List[str]] = ["emails"] model_config = ConfigDict( @@ -37,7 +40,6 @@ class CreateInvitationsRequest(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,8 +64,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -81,9 +82,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "emails": obj.get("emails") - }) + _obj = cls.model_validate({"emails": obj.get("emails")}) return _obj - - diff --git a/jaqpotpy/api/openapi/models/dataset.py b/jaqpotpy/api/openapi/models/dataset.py index 4015a51f..a759af8a 100644 --- a/jaqpotpy/api/openapi/models/dataset.py +++ b/jaqpotpy/api/openapi/models/dataset.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -26,10 +25,12 @@ from typing import Optional, Set from typing_extensions import Self + class Dataset(BaseModel): """ Dataset - """ # noqa: E501 + """ # noqa: E501 + id: Optional[StrictInt] = None type: DatasetType entry_type: StrictStr = Field(alias="entryType") @@ -41,26 +42,45 @@ class Dataset(BaseModel): model_id: Optional[StrictInt] = Field(default=None, alias="modelId") model_name: Optional[StrictStr] = Field(default=None, alias="modelName") executed_at: Optional[datetime] = Field(default=None, alias="executedAt") - execution_finished_at: Optional[datetime] = Field(default=None, alias="executionFinishedAt") + execution_finished_at: Optional[datetime] = Field( + default=None, alias="executionFinishedAt" + ) created_at: Optional[datetime] = Field(default=None, alias="createdAt") updated_at: Optional[datetime] = Field(default=None, alias="updatedAt") - __properties: ClassVar[List[str]] = ["id", "type", "entryType", "input", "result", "status", "failureReason", "userId", "modelId", "modelName", "executedAt", "executionFinishedAt", "createdAt", "updatedAt"] - - @field_validator('entry_type') + __properties: ClassVar[List[str]] = [ + "id", + "type", + "entryType", + "input", + "result", + "status", + "failureReason", + "userId", + "modelId", + "modelName", + "executedAt", + "executionFinishedAt", + "createdAt", + "updatedAt", + ] + + @field_validator("entry_type") def entry_type_validate_enum(cls, value): """Validates the enum""" - if value not in set(['ARRAY']): + if value not in set(["ARRAY"]): raise ValueError("must be one of enum values ('ARRAY')") return value - @field_validator('status') + @field_validator("status") def status_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['CREATED', 'EXECUTING', 'FAILURE', 'SUCCESS']): - raise ValueError("must be one of enum values ('CREATED', 'EXECUTING', 'FAILURE', 'SUCCESS')") + if value not in set(["CREATED", "EXECUTING", "FAILURE", "SUCCESS"]): + raise ValueError( + "must be one of enum values ('CREATED', 'EXECUTING', 'FAILURE', 'SUCCESS')" + ) return value model_config = ConfigDict( @@ -69,7 +89,6 @@ def status_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -94,8 +113,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -113,22 +131,22 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "type": obj.get("type"), - "entryType": obj.get("entryType"), - "input": obj.get("input"), - "result": obj.get("result"), - "status": obj.get("status"), - "failureReason": obj.get("failureReason"), - "userId": obj.get("userId"), - "modelId": obj.get("modelId"), - "modelName": obj.get("modelName"), - "executedAt": obj.get("executedAt"), - "executionFinishedAt": obj.get("executionFinishedAt"), - "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "type": obj.get("type"), + "entryType": obj.get("entryType"), + "input": obj.get("input"), + "result": obj.get("result"), + "status": obj.get("status"), + "failureReason": obj.get("failureReason"), + "userId": obj.get("userId"), + "modelId": obj.get("modelId"), + "modelName": obj.get("modelName"), + "executedAt": obj.get("executedAt"), + "executionFinishedAt": obj.get("executionFinishedAt"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt"), + } + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/dataset_csv.py b/jaqpotpy/api/openapi/models/dataset_csv.py index d17700f8..306e6745 100644 --- a/jaqpotpy/api/openapi/models/dataset_csv.py +++ b/jaqpotpy/api/openapi/models/dataset_csv.py @@ -1,56 +1,85 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictInt, StrictStr, field_validator +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBytes, + StrictInt, + StrictStr, + field_validator, +) from typing import Any, ClassVar, Dict, List, Optional, Union from jaqpotpy.api.openapi.models.dataset_type import DatasetType from typing import Optional, Set from typing_extensions import Self + class DatasetCSV(BaseModel): """ DatasetCSV - """ # noqa: E501 + """ # noqa: E501 + id: Optional[StrictInt] = None type: DatasetType - input_file: Union[StrictBytes, StrictStr] = Field(description="A base64 representation in CSV format of the input values.", alias="inputFile") + input_file: Union[StrictBytes, StrictStr] = Field( + description="A base64 representation in CSV format of the input values.", + alias="inputFile", + ) values: Optional[List[Any]] = None status: Optional[StrictStr] = None failure_reason: Optional[StrictStr] = Field(default=None, alias="failureReason") model_id: Optional[StrictInt] = Field(default=None, alias="modelId") model_name: Optional[StrictStr] = Field(default=None, alias="modelName") executed_at: Optional[datetime] = Field(default=None, alias="executedAt") - execution_finished_at: Optional[datetime] = Field(default=None, alias="executionFinishedAt") + execution_finished_at: Optional[datetime] = Field( + default=None, alias="executionFinishedAt" + ) created_at: Optional[datetime] = Field(default=None, alias="createdAt") updated_at: Optional[datetime] = Field(default=None, alias="updatedAt") - __properties: ClassVar[List[str]] = ["id", "type", "inputFile", "values", "status", "failureReason", "modelId", "modelName", "executedAt", "executionFinishedAt", "createdAt", "updatedAt"] - - @field_validator('status') + __properties: ClassVar[List[str]] = [ + "id", + "type", + "inputFile", + "values", + "status", + "failureReason", + "modelId", + "modelName", + "executedAt", + "executionFinishedAt", + "createdAt", + "updatedAt", + ] + + @field_validator("status") def status_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['CREATED', 'EXECUTING', 'FAILURE', 'SUCCESS']): - raise ValueError("must be one of enum values ('CREATED', 'EXECUTING', 'FAILURE', 'SUCCESS')") + if value not in set(["CREATED", "EXECUTING", "FAILURE", "SUCCESS"]): + raise ValueError( + "must be one of enum values ('CREATED', 'EXECUTING', 'FAILURE', 'SUCCESS')" + ) return value model_config = ConfigDict( @@ -59,7 +88,6 @@ def status_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -84,8 +112,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -103,20 +130,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "type": obj.get("type"), - "inputFile": obj.get("inputFile"), - "values": obj.get("values"), - "status": obj.get("status"), - "failureReason": obj.get("failureReason"), - "modelId": obj.get("modelId"), - "modelName": obj.get("modelName"), - "executedAt": obj.get("executedAt"), - "executionFinishedAt": obj.get("executionFinishedAt"), - "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "type": obj.get("type"), + "inputFile": obj.get("inputFile"), + "values": obj.get("values"), + "status": obj.get("status"), + "failureReason": obj.get("failureReason"), + "modelId": obj.get("modelId"), + "modelName": obj.get("modelName"), + "executedAt": obj.get("executedAt"), + "executionFinishedAt": obj.get("executionFinishedAt"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt"), + } + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/dataset_type.py b/jaqpotpy/api/openapi/models/dataset_type.py index b0eb3b2c..74139527 100644 --- a/jaqpotpy/api/openapi/models/dataset_type.py +++ b/jaqpotpy/api/openapi/models/dataset_type.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import json from enum import Enum @@ -27,11 +26,9 @@ class DatasetType(str, Enum): """ allowed enum values """ - PREDICTION = 'PREDICTION' + PREDICTION = "PREDICTION" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of DatasetType from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/jaqpotpy/api/openapi/models/doa.py b/jaqpotpy/api/openapi/models/doa.py index 2b90708e..7bc6d71f 100644 --- a/jaqpotpy/api/openapi/models/doa.py +++ b/jaqpotpy/api/openapi/models/doa.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -25,16 +24,32 @@ from typing import Optional, Set from typing_extensions import Self + class Doa(BaseModel): """ Doa - """ # noqa: E501 + """ # noqa: E501 + id: Optional[StrictInt] = None method: DoaMethod data: Dict[str, Any] - created_at: Optional[datetime] = Field(default=None, description="The date and time when the feature was created.", alias="createdAt") - updated_at: Optional[datetime] = Field(default=None, description="The date and time when the feature was last updated.", alias="updatedAt") - __properties: ClassVar[List[str]] = ["id", "method", "data", "createdAt", "updatedAt"] + created_at: Optional[datetime] = Field( + default=None, + description="The date and time when the feature was created.", + alias="createdAt", + ) + updated_at: Optional[datetime] = Field( + default=None, + description="The date and time when the feature was last updated.", + alias="updatedAt", + ) + __properties: ClassVar[List[str]] = [ + "id", + "method", + "data", + "createdAt", + "updatedAt", + ] model_config = ConfigDict( populate_by_name=True, @@ -42,7 +57,6 @@ class Doa(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,8 +81,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -86,13 +99,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "method": obj.get("method"), - "data": obj.get("data"), - "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "method": obj.get("method"), + "data": obj.get("data"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt"), + } + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/doa_data.py b/jaqpotpy/api/openapi/models/doa_data.py deleted file mode 100644 index 1e1cf07b..00000000 --- a/jaqpotpy/api/openapi/models/doa_data.py +++ /dev/null @@ -1,262 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations -import json -import pprint -from pydantic import ( - BaseModel, - ConfigDict, - Field, - StrictStr, - ValidationError, - field_validator, -) -from typing import Any, List, Optional -from jaqpotpy.api.openapi.models.bounding_box_doa import BoundingBoxDoa -from jaqpotpy.api.openapi.models.city_block_doa import CityBlockDoa -from jaqpotpy.api.openapi.models.kernel_based_doa import KernelBasedDoa -from jaqpotpy.api.openapi.models.leverage_doa import LeverageDoa -from jaqpotpy.api.openapi.models.mahalanobis_doa import MahalanobisDoa -from jaqpotpy.api.openapi.models.mean_var_doa import MeanVarDoa -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -DOADATA_ONE_OF_SCHEMAS = [ - "BoundingBoxDoa", - "CityBlockDoa", - "KernelBasedDoa", - "LeverageDoa", - "MahalanobisDoa", - "MeanVarDoa", -] - - -class DoaData(BaseModel): - """ - The doa calculated data - """ - - # data type: LeverageDoa - oneof_schema_1_validator: Optional[LeverageDoa] = None - # data type: BoundingBoxDoa - oneof_schema_2_validator: Optional[BoundingBoxDoa] = None - # data type: KernelBasedDoa - oneof_schema_3_validator: Optional[KernelBasedDoa] = None - # data type: MeanVarDoa - oneof_schema_4_validator: Optional[MeanVarDoa] = None - # data type: MahalanobisDoa - oneof_schema_5_validator: Optional[MahalanobisDoa] = None - # data type: CityBlockDoa - oneof_schema_6_validator: Optional[CityBlockDoa] = None - actual_instance: Optional[ - Union[ - BoundingBoxDoa, - CityBlockDoa, - KernelBasedDoa, - LeverageDoa, - MahalanobisDoa, - MeanVarDoa, - ] - ] = None - one_of_schemas: Set[str] = { - "BoundingBoxDoa", - "CityBlockDoa", - "KernelBasedDoa", - "LeverageDoa", - "MahalanobisDoa", - "MeanVarDoa", - } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError( - "If a position argument is used, only 1 is allowed to set `actual_instance`" - ) - if kwargs: - raise ValueError( - "If a position argument is used, keyword arguments cannot be used." - ) - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator("actual_instance") - def actual_instance_must_validate_oneof(cls, v): - instance = DoaData.model_construct() - error_messages = [] - match = 0 - # validate data type: LeverageDoa - if not isinstance(v, LeverageDoa): - error_messages.append(f"Error! Input type `{type(v)}` is not `LeverageDoa`") - else: - match += 1 - # validate data type: BoundingBoxDoa - if not isinstance(v, BoundingBoxDoa): - error_messages.append( - f"Error! Input type `{type(v)}` is not `BoundingBoxDoa`" - ) - else: - match += 1 - # validate data type: KernelBasedDoa - if not isinstance(v, KernelBasedDoa): - error_messages.append( - f"Error! Input type `{type(v)}` is not `KernelBasedDoa`" - ) - else: - match += 1 - # validate data type: MeanVarDoa - if not isinstance(v, MeanVarDoa): - error_messages.append(f"Error! Input type `{type(v)}` is not `MeanVarDoa`") - else: - match += 1 - # validate data type: MahalanobisDoa - if not isinstance(v, MahalanobisDoa): - error_messages.append( - f"Error! Input type `{type(v)}` is not `MahalanobisDoa`" - ) - else: - match += 1 - # validate data type: CityBlockDoa - if not isinstance(v, CityBlockDoa): - error_messages.append( - f"Error! Input type `{type(v)}` is not `CityBlockDoa`" - ) - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError( - "Multiple matches found when setting `actual_instance` in DoaData with oneOf schemas: BoundingBoxDoa, CityBlockDoa, KernelBasedDoa, LeverageDoa, MahalanobisDoa, MeanVarDoa. Details: " - + ", ".join(error_messages) - ) - elif match == 0: - # no match - raise ValueError( - "No match found when setting `actual_instance` in DoaData with oneOf schemas: BoundingBoxDoa, CityBlockDoa, KernelBasedDoa, LeverageDoa, MahalanobisDoa, MeanVarDoa. Details: " - + ", ".join(error_messages) - ) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into LeverageDoa - try: - instance.actual_instance = LeverageDoa.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into BoundingBoxDoa - try: - instance.actual_instance = BoundingBoxDoa.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into KernelBasedDoa - try: - instance.actual_instance = KernelBasedDoa.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into MeanVarDoa - try: - instance.actual_instance = MeanVarDoa.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into MahalanobisDoa - try: - instance.actual_instance = MahalanobisDoa.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into CityBlockDoa - try: - instance.actual_instance = CityBlockDoa.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError( - "Multiple matches found when deserializing the JSON string into DoaData with oneOf schemas: BoundingBoxDoa, CityBlockDoa, KernelBasedDoa, LeverageDoa, MahalanobisDoa, MeanVarDoa. Details: " - + ", ".join(error_messages) - ) - elif match == 0: - # no match - raise ValueError( - "No match found when deserializing the JSON string into DoaData with oneOf schemas: BoundingBoxDoa, CityBlockDoa, KernelBasedDoa, LeverageDoa, MahalanobisDoa, MeanVarDoa. Details: " - + ", ".join(error_messages) - ) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable( - self.actual_instance.to_json - ): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict( - self, - ) -> Optional[ - Union[ - Dict[str, Any], - BoundingBoxDoa, - CityBlockDoa, - KernelBasedDoa, - LeverageDoa, - MahalanobisDoa, - MeanVarDoa, - ] - ]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable( - self.actual_instance.to_dict - ): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) diff --git a/jaqpotpy/api/openapi/models/doa_method.py b/jaqpotpy/api/openapi/models/doa_method.py index c8fbcb4e..e75f9274 100644 --- a/jaqpotpy/api/openapi/models/doa_method.py +++ b/jaqpotpy/api/openapi/models/doa_method.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import json from enum import Enum @@ -27,16 +26,14 @@ class DoaMethod(str, Enum): """ allowed enum values """ - LEVERAGE = 'LEVERAGE' - BOUNDING_BOX = 'BOUNDING_BOX' - KERNEL_BASED = 'KERNEL_BASED' - MEAN_VAR = 'MEAN_VAR' - MAHALANOBIS = 'MAHALANOBIS' - CITY_BLOCK = 'CITY_BLOCK' + LEVERAGE = "LEVERAGE" + BOUNDING_BOX = "BOUNDING_BOX" + KERNEL_BASED = "KERNEL_BASED" + MEAN_VAR = "MEAN_VAR" + MAHALANOBIS = "MAHALANOBIS" + CITY_BLOCK = "CITY_BLOCK" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of DoaMethod from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/jaqpotpy/api/openapi/models/error_code.py b/jaqpotpy/api/openapi/models/error_code.py index 2d4ebf80..e35f1e33 100644 --- a/jaqpotpy/api/openapi/models/error_code.py +++ b/jaqpotpy/api/openapi/models/error_code.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import json from enum import Enum @@ -27,11 +26,9 @@ class ErrorCode(str, Enum): """ allowed enum values """ - ENUM_1001 = '1001' + ENUM_1001 = "1001" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ErrorCode from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/jaqpotpy/api/openapi/models/error_response.py b/jaqpotpy/api/openapi/models/error_response.py index 3e3e8828..c45ba339 100644 --- a/jaqpotpy/api/openapi/models/error_response.py +++ b/jaqpotpy/api/openapi/models/error_response.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -23,10 +22,12 @@ from typing import Optional, Set from typing_extensions import Self + class ErrorResponse(BaseModel): """ ErrorResponse - """ # noqa: E501 + """ # noqa: E501 + message: Optional[StrictStr] = Field(default=None, description="Error message") code: Optional[StrictInt] = Field(default=None, description="Error code") __properties: ClassVar[List[str]] = ["message", "code"] @@ -37,7 +38,6 @@ class ErrorResponse(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,8 +62,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -81,10 +80,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "message": obj.get("message"), - "code": obj.get("code") - }) + _obj = cls.model_validate( + {"message": obj.get("message"), "code": obj.get("code")} + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/feature.py b/jaqpotpy/api/openapi/models/feature.py index c8f07ba8..ee820e91 100644 --- a/jaqpotpy/api/openapi/models/feature.py +++ b/jaqpotpy/api/openapi/models/feature.py @@ -1,25 +1,32 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictInt, + StrictStr, + field_validator, +) from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from jaqpotpy.api.openapi.models.feature_possible_value import FeaturePossibleValue @@ -27,31 +34,66 @@ from typing import Optional, Set from typing_extensions import Self + class Feature(BaseModel): """ Feature - """ # noqa: E501 + """ # noqa: E501 + id: Optional[StrictInt] = None - key: StrictStr = Field(description="A key that must start with a letter, followed by any combination of letters, digits, hyphens, or underscores. For example, 'abc123', 'abc-test', or 'Abc_test'. It cannot start with a digit.") - name: Annotated[str, Field(strict=True, max_length=255)] = Field(description="A name for the feature that will appear on top of the form field") - units: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The units for the feature") - range: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The range for the feature") + key: StrictStr = Field( + description="A key that must start with a letter, followed by any combination of letters, digits, hyphens, or underscores. For example, 'abc123', 'abc-test', or 'Abc_test'. It cannot start with a digit." + ) + name: Annotated[str, Field(strict=True, max_length=255)] = Field( + description="A name for the feature that will appear on top of the form field" + ) + units: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, description="The units for the feature" + ) + range: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, description="The range for the feature" + ) description: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = None feature_type: FeatureType = Field(alias="featureType") - feature_dependency: Optional[StrictStr] = Field(default=None, alias="featureDependency") + feature_dependency: Optional[StrictStr] = Field( + default=None, alias="featureDependency" + ) visible: Optional[StrictBool] = None - possible_values: Optional[Annotated[List[FeaturePossibleValue], Field(max_length=1000)]] = Field(default=None, alias="possibleValues") - created_at: Optional[datetime] = Field(default=None, description="The date and time when the feature was created.", alias="createdAt") - updated_at: Optional[datetime] = Field(default=None, description="The date and time when the feature was last updated.", alias="updatedAt") - __properties: ClassVar[List[str]] = ["id", "key", "name", "units", "range", "description", "featureType", "featureDependency", "visible", "possibleValues", "createdAt", "updatedAt"] - - @field_validator('feature_dependency') + possible_values: Optional[ + Annotated[List[FeaturePossibleValue], Field(max_length=1000)] + ] = Field(default=None, alias="possibleValues") + created_at: Optional[datetime] = Field( + default=None, + description="The date and time when the feature was created.", + alias="createdAt", + ) + updated_at: Optional[datetime] = Field( + default=None, + description="The date and time when the feature was last updated.", + alias="updatedAt", + ) + __properties: ClassVar[List[str]] = [ + "id", + "key", + "name", + "units", + "range", + "description", + "featureType", + "featureDependency", + "visible", + "possibleValues", + "createdAt", + "updatedAt", + ] + + @field_validator("feature_dependency") def feature_dependency_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['DEPENDENT', 'INDEPENDENT']): + if value not in set(["DEPENDENT", "INDEPENDENT"]): raise ValueError("must be one of enum values ('DEPENDENT', 'INDEPENDENT')") return value @@ -61,7 +103,6 @@ def feature_dependency_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -86,8 +127,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -100,7 +140,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_possible_values in self.possible_values: if _item_possible_values: _items.append(_item_possible_values.to_dict()) - _dict['possibleValues'] = _items + _dict["possibleValues"] = _items return _dict @classmethod @@ -112,20 +152,25 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "key": obj.get("key"), - "name": obj.get("name"), - "units": obj.get("units"), - "range": obj.get("range"), - "description": obj.get("description"), - "featureType": obj.get("featureType"), - "featureDependency": obj.get("featureDependency"), - "visible": obj.get("visible"), - "possibleValues": [FeaturePossibleValue.from_dict(_item) for _item in obj["possibleValues"]] if obj.get("possibleValues") is not None else None, - "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "key": obj.get("key"), + "name": obj.get("name"), + "units": obj.get("units"), + "range": obj.get("range"), + "description": obj.get("description"), + "featureType": obj.get("featureType"), + "featureDependency": obj.get("featureDependency"), + "visible": obj.get("visible"), + "possibleValues": [ + FeaturePossibleValue.from_dict(_item) + for _item in obj["possibleValues"] + ] + if obj.get("possibleValues") is not None + else None, + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt"), + } + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/feature_possible_value.py b/jaqpotpy/api/openapi/models/feature_possible_value.py index 6094e291..078d8f9f 100644 --- a/jaqpotpy/api/openapi/models/feature_possible_value.py +++ b/jaqpotpy/api/openapi/models/feature_possible_value.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -23,10 +22,12 @@ from typing import Optional, Set from typing_extensions import Self + class FeaturePossibleValue(BaseModel): """ FeaturePossibleValue - """ # noqa: E501 + """ # noqa: E501 + key: StrictStr value: StrictStr __properties: ClassVar[List[str]] = ["key", "value"] @@ -37,7 +38,6 @@ class FeaturePossibleValue(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,8 +62,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -81,10 +80,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "key": obj.get("key"), - "value": obj.get("value") - }) + _obj = cls.model_validate({"key": obj.get("key"), "value": obj.get("value")}) return _obj - - diff --git a/jaqpotpy/api/openapi/models/feature_type.py b/jaqpotpy/api/openapi/models/feature_type.py index 4f7ee4b8..269a0031 100644 --- a/jaqpotpy/api/openapi/models/feature_type.py +++ b/jaqpotpy/api/openapi/models/feature_type.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import json from enum import Enum @@ -27,18 +26,16 @@ class FeatureType(str, Enum): """ allowed enum values """ - INTEGER = 'INTEGER' - FLOAT = 'FLOAT' - CATEGORICAL = 'CATEGORICAL' - SMILES = 'SMILES' - STRING = 'STRING' - TEXT = 'TEXT' - FLOAT_ARRAY = 'FLOAT_ARRAY' - STRING_ARRAY = 'STRING_ARRAY' + INTEGER = "INTEGER" + FLOAT = "FLOAT" + CATEGORICAL = "CATEGORICAL" + SMILES = "SMILES" + STRING = "STRING" + TEXT = "TEXT" + FLOAT_ARRAY = "FLOAT_ARRAY" + STRING_ARRAY = "STRING_ARRAY" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of FeatureType from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/jaqpotpy/api/openapi/models/get_all_api_keys_for_user200_response_inner.py b/jaqpotpy/api/openapi/models/get_all_api_keys_for_user200_response_inner.py index 2385a891..cd895465 100644 --- a/jaqpotpy/api/openapi/models/get_all_api_keys_for_user200_response_inner.py +++ b/jaqpotpy/api/openapi/models/get_all_api_keys_for_user200_response_inner.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -24,16 +23,36 @@ from typing import Optional, Set from typing_extensions import Self + class GetAllApiKeysForUser200ResponseInner(BaseModel): """ GetAllApiKeysForUser200ResponseInner - """ # noqa: E501 - client_key: Optional[StrictStr] = Field(default=None, description="The API key", alias="clientKey") - note: Optional[StrictStr] = Field(default=None, description="Description of the API key") - created_at: Optional[datetime] = Field(default=None, description="Creation timestamp of the API key", alias="createdAt") - expires_at: Optional[datetime] = Field(default=None, description="Expiration timestamp of the API key (optional)", alias="expiresAt") - enabled: Optional[StrictBool] = Field(default=None, description="Whether the API key is active or disabled") - __properties: ClassVar[List[str]] = ["clientKey", "note", "createdAt", "expiresAt", "enabled"] + """ # noqa: E501 + + client_key: Optional[StrictStr] = Field( + default=None, description="The API key", alias="clientKey" + ) + note: Optional[StrictStr] = Field( + default=None, description="Description of the API key" + ) + created_at: Optional[datetime] = Field( + default=None, description="Creation timestamp of the API key", alias="createdAt" + ) + expires_at: Optional[datetime] = Field( + default=None, + description="Expiration timestamp of the API key (optional)", + alias="expiresAt", + ) + enabled: Optional[StrictBool] = Field( + default=None, description="Whether the API key is active or disabled" + ) + __properties: ClassVar[List[str]] = [ + "clientKey", + "note", + "createdAt", + "expiresAt", + "enabled", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +60,6 @@ class GetAllApiKeysForUser200ResponseInner(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,8 +84,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -85,13 +102,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "clientKey": obj.get("clientKey"), - "note": obj.get("note"), - "createdAt": obj.get("createdAt"), - "expiresAt": obj.get("expiresAt"), - "enabled": obj.get("enabled") - }) + _obj = cls.model_validate( + { + "clientKey": obj.get("clientKey"), + "note": obj.get("note"), + "createdAt": obj.get("createdAt"), + "expiresAt": obj.get("expiresAt"), + "enabled": obj.get("enabled"), + } + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/get_datasets200_response.py b/jaqpotpy/api/openapi/models/get_datasets200_response.py index 80c15b64..7e2bf76e 100644 --- a/jaqpotpy/api/openapi/models/get_datasets200_response.py +++ b/jaqpotpy/api/openapi/models/get_datasets200_response.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -24,16 +23,24 @@ from typing import Optional, Set from typing_extensions import Self + class GetDatasets200Response(BaseModel): """ GetDatasets200Response - """ # noqa: E501 + """ # noqa: E501 + content: Optional[List[Dataset]] = None total_elements: Optional[StrictInt] = Field(default=None, alias="totalElements") total_pages: Optional[StrictInt] = Field(default=None, alias="totalPages") page_size: Optional[StrictInt] = Field(default=None, alias="pageSize") page_number: Optional[StrictInt] = Field(default=None, alias="pageNumber") - __properties: ClassVar[List[str]] = ["content", "totalElements", "totalPages", "pageSize", "pageNumber"] + __properties: ClassVar[List[str]] = [ + "content", + "totalElements", + "totalPages", + "pageSize", + "pageNumber", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +48,6 @@ class GetDatasets200Response(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,8 +72,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -80,7 +85,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_content in self.content: if _item_content: _items.append(_item_content.to_dict()) - _dict['content'] = _items + _dict["content"] = _items return _dict @classmethod @@ -92,13 +97,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "content": [Dataset.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, - "totalElements": obj.get("totalElements"), - "totalPages": obj.get("totalPages"), - "pageSize": obj.get("pageSize"), - "pageNumber": obj.get("pageNumber") - }) + _obj = cls.model_validate( + { + "content": [Dataset.from_dict(_item) for _item in obj["content"]] + if obj.get("content") is not None + else None, + "totalElements": obj.get("totalElements"), + "totalPages": obj.get("totalPages"), + "pageSize": obj.get("pageSize"), + "pageNumber": obj.get("pageNumber"), + } + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/get_models200_response.py b/jaqpotpy/api/openapi/models/get_models200_response.py index df74ccb2..1fd720f7 100644 --- a/jaqpotpy/api/openapi/models/get_models200_response.py +++ b/jaqpotpy/api/openapi/models/get_models200_response.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -24,16 +23,24 @@ from typing import Optional, Set from typing_extensions import Self + class GetModels200Response(BaseModel): """ GetModels200Response - """ # noqa: E501 + """ # noqa: E501 + content: Optional[List[ModelSummary]] = None total_elements: Optional[StrictInt] = Field(default=None, alias="totalElements") total_pages: Optional[StrictInt] = Field(default=None, alias="totalPages") page_size: Optional[StrictInt] = Field(default=None, alias="pageSize") page_number: Optional[StrictInt] = Field(default=None, alias="pageNumber") - __properties: ClassVar[List[str]] = ["content", "totalElements", "totalPages", "pageSize", "pageNumber"] + __properties: ClassVar[List[str]] = [ + "content", + "totalElements", + "totalPages", + "pageSize", + "pageNumber", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +48,6 @@ class GetModels200Response(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,8 +72,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -80,7 +85,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_content in self.content: if _item_content: _items.append(_item_content.to_dict()) - _dict['content'] = _items + _dict["content"] = _items return _dict @classmethod @@ -92,13 +97,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "content": [ModelSummary.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, - "totalElements": obj.get("totalElements"), - "totalPages": obj.get("totalPages"), - "pageSize": obj.get("pageSize"), - "pageNumber": obj.get("pageNumber") - }) + _obj = cls.model_validate( + { + "content": [ModelSummary.from_dict(_item) for _item in obj["content"]] + if obj.get("content") is not None + else None, + "totalElements": obj.get("totalElements"), + "totalPages": obj.get("totalPages"), + "pageSize": obj.get("pageSize"), + "pageNumber": obj.get("pageNumber"), + } + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/kernel_based_doa.py b/jaqpotpy/api/openapi/models/kernel_based_doa.py index 7118e814..7a4df828 100644 --- a/jaqpotpy/api/openapi/models/kernel_based_doa.py +++ b/jaqpotpy/api/openapi/models/kernel_based_doa.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -23,10 +22,12 @@ from typing import Optional, Set from typing_extensions import Self + class KernelBasedDoa(BaseModel): """ KernelBasedDoa - """ # noqa: E501 + """ # noqa: E501 + data: Optional[Dict[str, Any]] = None __properties: ClassVar[List[str]] = ["data"] @@ -36,7 +37,6 @@ class KernelBasedDoa(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,8 +61,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -80,9 +79,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "data": obj.get("data") - }) + _obj = cls.model_validate({"data": obj.get("data")}) return _obj - - diff --git a/jaqpotpy/api/openapi/models/lead.py b/jaqpotpy/api/openapi/models/lead.py index 1e6e4a2a..8c798b3d 100644 --- a/jaqpotpy/api/openapi/models/lead.py +++ b/jaqpotpy/api/openapi/models/lead.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -23,24 +22,28 @@ from typing import Optional, Set from typing_extensions import Self + class Lead(BaseModel): """ Lead - """ # noqa: E501 + """ # noqa: E501 + id: Optional[StrictInt] = None email: Optional[StrictStr] = None name: Optional[StrictStr] = None status: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["id", "email", "name", "status"] - @field_validator('status') + @field_validator("status") def status_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['PENDING', 'APPROVED', 'DENIED']): - raise ValueError("must be one of enum values ('PENDING', 'APPROVED', 'DENIED')") + if value not in set(["PENDING", "APPROVED", "DENIED"]): + raise ValueError( + "must be one of enum values ('PENDING', 'APPROVED', 'DENIED')" + ) return value model_config = ConfigDict( @@ -49,7 +52,6 @@ def status_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,8 +76,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -93,12 +94,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "email": obj.get("email"), - "name": obj.get("name"), - "status": obj.get("status") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "email": obj.get("email"), + "name": obj.get("name"), + "status": obj.get("status"), + } + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/leverage_doa.py b/jaqpotpy/api/openapi/models/leverage_doa.py index b220f471..555c6cdf 100644 --- a/jaqpotpy/api/openapi/models/leverage_doa.py +++ b/jaqpotpy/api/openapi/models/leverage_doa.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -23,12 +22,16 @@ from typing import Optional, Set from typing_extensions import Self + class LeverageDoa(BaseModel): """ LeverageDoa - """ # noqa: E501 + """ # noqa: E501 + h_star: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="hStar") - doa_matrix: Optional[List[List[Union[StrictFloat, StrictInt]]]] = Field(default=None, alias="doaMatrix") + doa_matrix: Optional[List[List[Union[StrictFloat, StrictInt]]]] = Field( + default=None, alias="doaMatrix" + ) __properties: ClassVar[List[str]] = ["hStar", "doaMatrix"] model_config = ConfigDict( @@ -37,7 +40,6 @@ class LeverageDoa(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,8 +64,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -81,10 +82,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "hStar": obj.get("hStar"), - "doaMatrix": obj.get("doaMatrix") - }) + _obj = cls.model_validate( + {"hStar": obj.get("hStar"), "doaMatrix": obj.get("doaMatrix")} + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/library.py b/jaqpotpy/api/openapi/models/library.py index 070048b1..6c3fb6b1 100644 --- a/jaqpotpy/api/openapi/models/library.py +++ b/jaqpotpy/api/openapi/models/library.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -24,16 +23,32 @@ from typing import Optional, Set from typing_extensions import Self + class Library(BaseModel): """ Library - """ # noqa: E501 + """ # noqa: E501 + id: Optional[StrictInt] = None name: StrictStr version: StrictStr - created_at: Optional[datetime] = Field(default=None, description="The date and time when the feature was created.", alias="createdAt") - updated_at: Optional[datetime] = Field(default=None, description="The date and time when the feature was last updated.", alias="updatedAt") - __properties: ClassVar[List[str]] = ["id", "name", "version", "createdAt", "updatedAt"] + created_at: Optional[datetime] = Field( + default=None, + description="The date and time when the feature was created.", + alias="createdAt", + ) + updated_at: Optional[datetime] = Field( + default=None, + description="The date and time when the feature was last updated.", + alias="updatedAt", + ) + __properties: ClassVar[List[str]] = [ + "id", + "name", + "version", + "createdAt", + "updatedAt", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +56,6 @@ class Library(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,8 +80,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -85,13 +98,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "version": obj.get("version"), - "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "version": obj.get("version"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt"), + } + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/mahalanobis_doa.py b/jaqpotpy/api/openapi/models/mahalanobis_doa.py index 4a7b7b4e..2284d321 100644 --- a/jaqpotpy/api/openapi/models/mahalanobis_doa.py +++ b/jaqpotpy/api/openapi/models/mahalanobis_doa.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -23,10 +22,12 @@ from typing import Optional, Set from typing_extensions import Self + class MahalanobisDoa(BaseModel): """ MahalanobisDoa - """ # noqa: E501 + """ # noqa: E501 + data: Optional[Dict[str, Any]] = None __properties: ClassVar[List[str]] = ["data"] @@ -36,7 +37,6 @@ class MahalanobisDoa(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,8 +61,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -80,9 +79,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "data": obj.get("data") - }) + _obj = cls.model_validate({"data": obj.get("data")}) return _obj - - diff --git a/jaqpotpy/api/openapi/models/mean_var_doa.py b/jaqpotpy/api/openapi/models/mean_var_doa.py index 1add56be..aaf3b331 100644 --- a/jaqpotpy/api/openapi/models/mean_var_doa.py +++ b/jaqpotpy/api/openapi/models/mean_var_doa.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -24,11 +23,25 @@ from typing import Optional, Set from typing_extensions import Self + class MeanVarDoa(BaseModel): """ MeanVarDoa - """ # noqa: E501 - bounds: Optional[List[Annotated[List[Union[Annotated[float, Field(strict=True)], Annotated[int, Field(strict=True)]]], Field(max_length=1000)]]] = None + """ # noqa: E501 + + bounds: Optional[ + List[ + Annotated[ + List[ + Union[ + Annotated[float, Field(strict=True)], + Annotated[int, Field(strict=True)], + ] + ], + Field(max_length=1000), + ] + ] + ] = None __properties: ClassVar[List[str]] = ["bounds"] model_config = ConfigDict( @@ -37,7 +50,6 @@ class MeanVarDoa(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,8 +74,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -81,9 +92,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "bounds": obj.get("bounds") - }) + _obj = cls.model_validate({"bounds": obj.get("bounds")}) return _obj - - diff --git a/jaqpotpy/api/openapi/models/model.py b/jaqpotpy/api/openapi/models/model.py index 2e5eca6e..0d9f0622 100644 --- a/jaqpotpy/api/openapi/models/model.py +++ b/jaqpotpy/api/openapi/models/model.py @@ -1,31 +1,37 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictBytes, StrictInt, StrictStr +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictBytes, + StrictInt, + StrictStr, +) from typing import Any, ClassVar, Dict, List, Optional, Union from typing_extensions import Annotated from jaqpotpy.api.openapi.models.doa import Doa from jaqpotpy.api.openapi.models.feature import Feature from jaqpotpy.api.openapi.models.library import Library -from jaqpotpy.api.openapi.models.model_extra_config import ModelExtraConfig from jaqpotpy.api.openapi.models.model_scores import ModelScores from jaqpotpy.api.openapi.models.model_task import ModelTask from jaqpotpy.api.openapi.models.model_type import ModelType @@ -36,38 +42,96 @@ from typing import Optional, Set from typing_extensions import Self + class Model(BaseModel): """ Model - """ # noqa: E501 + """ # noqa: E501 + id: Optional[StrictInt] = None name: Annotated[str, Field(min_length=3, strict=True, max_length=255)] - description: Optional[Annotated[str, Field(min_length=3, strict=True, max_length=50000)]] = None + description: Optional[ + Annotated[str, Field(min_length=3, strict=True, max_length=50000)] + ] = None type: ModelType jaqpotpy_version: StrictStr = Field(alias="jaqpotpyVersion") doas: Optional[Annotated[List[Doa], Field(max_length=50)]] = None libraries: Annotated[List[Library], Field(max_length=1000)] - dependent_features: Annotated[List[Feature], Field(max_length=1000)] = Field(alias="dependentFeatures") - independent_features: Annotated[List[Feature], Field(max_length=1000)] = Field(alias="independentFeatures") - shared_with_organizations: Optional[List[Organization]] = Field(default=None, alias="sharedWithOrganizations") + dependent_features: Annotated[List[Feature], Field(max_length=1000)] = Field( + alias="dependentFeatures" + ) + independent_features: Annotated[List[Feature], Field(max_length=1000)] = Field( + alias="independentFeatures" + ) + shared_with_organizations: Optional[List[Organization]] = Field( + default=None, alias="sharedWithOrganizations" + ) visibility: ModelVisibility task: ModelTask torch_config: Optional[Dict[str, Any]] = Field(default=None, alias="torchConfig") preprocessors: Optional[Annotated[List[Transformer], Field(max_length=50)]] = None featurizers: Optional[Annotated[List[Transformer], Field(max_length=50)]] = None - raw_preprocessor: Optional[Union[StrictBytes, StrictStr]] = Field(default=None, description="A base64 representation of the raw preprocessor.", alias="rawPreprocessor") - raw_model: Union[StrictBytes, StrictStr] = Field(description="A base64 representation of the raw model.", alias="rawModel") + raw_preprocessor: Optional[Union[StrictBytes, StrictStr]] = Field( + default=None, + description="A base64 representation of the raw preprocessor.", + alias="rawPreprocessor", + ) + raw_model: Union[StrictBytes, StrictStr] = Field( + description="A base64 representation of the raw model.", alias="rawModel" + ) creator: Optional[User] = None - can_edit: Optional[StrictBool] = Field(default=None, description="If the current user can edit the model", alias="canEdit") + can_edit: Optional[StrictBool] = Field( + default=None, + description="If the current user can edit the model", + alias="canEdit", + ) is_admin: Optional[StrictBool] = Field(default=None, alias="isAdmin") - selected_features: Optional[Annotated[List[StrictStr], Field(max_length=1000)]] = Field(default=None, alias="selectedFeatures") + selected_features: Optional[Annotated[List[StrictStr], Field(max_length=1000)]] = ( + Field(default=None, alias="selectedFeatures") + ) tags: Optional[Annotated[str, Field(strict=True, max_length=1000)]] = None - legacy_prediction_service: Optional[StrictStr] = Field(default=None, alias="legacyPredictionService") + legacy_prediction_service: Optional[StrictStr] = Field( + default=None, alias="legacyPredictionService" + ) scores: Optional[ModelScores] = None - extra_config: Optional[ModelExtraConfig] = Field(default=None, alias="extraConfig") - created_at: Optional[datetime] = Field(default=None, description="The date and time when the feature was created.", alias="createdAt") - updated_at: Optional[datetime] = Field(default=None, description="The date and time when the feature was last updated.", alias="updatedAt") - __properties: ClassVar[List[str]] = ["id", "name", "description", "type", "jaqpotpyVersion", "doas", "libraries", "dependentFeatures", "independentFeatures", "sharedWithOrganizations", "visibility", "task", "torchConfig", "preprocessors", "featurizers", "rawPreprocessor", "rawModel", "creator", "canEdit", "isAdmin", "selectedFeatures", "tags", "legacyPredictionService", "scores", "extraConfig", "createdAt", "updatedAt"] + created_at: Optional[datetime] = Field( + default=None, + description="The date and time when the feature was created.", + alias="createdAt", + ) + updated_at: Optional[datetime] = Field( + default=None, + description="The date and time when the feature was last updated.", + alias="updatedAt", + ) + __properties: ClassVar[List[str]] = [ + "id", + "name", + "description", + "type", + "jaqpotpyVersion", + "doas", + "libraries", + "dependentFeatures", + "independentFeatures", + "sharedWithOrganizations", + "visibility", + "task", + "torchConfig", + "preprocessors", + "featurizers", + "rawPreprocessor", + "rawModel", + "creator", + "canEdit", + "isAdmin", + "selectedFeatures", + "tags", + "legacyPredictionService", + "scores", + "createdAt", + "updatedAt", + ] model_config = ConfigDict( populate_by_name=True, @@ -75,7 +139,6 @@ class Model(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -100,8 +163,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -114,58 +176,55 @@ def to_dict(self) -> Dict[str, Any]: for _item_doas in self.doas: if _item_doas: _items.append(_item_doas.to_dict()) - _dict['doas'] = _items + _dict["doas"] = _items # override the default output from pydantic by calling `to_dict()` of each item in libraries (list) _items = [] if self.libraries: for _item_libraries in self.libraries: if _item_libraries: _items.append(_item_libraries.to_dict()) - _dict['libraries'] = _items + _dict["libraries"] = _items # override the default output from pydantic by calling `to_dict()` of each item in dependent_features (list) _items = [] if self.dependent_features: for _item_dependent_features in self.dependent_features: if _item_dependent_features: _items.append(_item_dependent_features.to_dict()) - _dict['dependentFeatures'] = _items + _dict["dependentFeatures"] = _items # override the default output from pydantic by calling `to_dict()` of each item in independent_features (list) _items = [] if self.independent_features: for _item_independent_features in self.independent_features: if _item_independent_features: _items.append(_item_independent_features.to_dict()) - _dict['independentFeatures'] = _items + _dict["independentFeatures"] = _items # override the default output from pydantic by calling `to_dict()` of each item in shared_with_organizations (list) _items = [] if self.shared_with_organizations: for _item_shared_with_organizations in self.shared_with_organizations: if _item_shared_with_organizations: _items.append(_item_shared_with_organizations.to_dict()) - _dict['sharedWithOrganizations'] = _items + _dict["sharedWithOrganizations"] = _items # override the default output from pydantic by calling `to_dict()` of each item in preprocessors (list) _items = [] if self.preprocessors: for _item_preprocessors in self.preprocessors: if _item_preprocessors: _items.append(_item_preprocessors.to_dict()) - _dict['preprocessors'] = _items + _dict["preprocessors"] = _items # override the default output from pydantic by calling `to_dict()` of each item in featurizers (list) _items = [] if self.featurizers: for _item_featurizers in self.featurizers: if _item_featurizers: _items.append(_item_featurizers.to_dict()) - _dict['featurizers'] = _items + _dict["featurizers"] = _items # override the default output from pydantic by calling `to_dict()` of creator if self.creator: - _dict['creator'] = self.creator.to_dict() + _dict["creator"] = self.creator.to_dict() # override the default output from pydantic by calling `to_dict()` of scores if self.scores: - _dict['scores'] = self.scores.to_dict() - # override the default output from pydantic by calling `to_dict()` of extra_config - if self.extra_config: - _dict['extraConfig'] = self.extra_config.to_dict() + _dict["scores"] = self.scores.to_dict() return _dict @classmethod @@ -177,35 +236,63 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "description": obj.get("description"), - "type": obj.get("type"), - "jaqpotpyVersion": obj.get("jaqpotpyVersion"), - "doas": [Doa.from_dict(_item) for _item in obj["doas"]] if obj.get("doas") is not None else None, - "libraries": [Library.from_dict(_item) for _item in obj["libraries"]] if obj.get("libraries") is not None else None, - "dependentFeatures": [Feature.from_dict(_item) for _item in obj["dependentFeatures"]] if obj.get("dependentFeatures") is not None else None, - "independentFeatures": [Feature.from_dict(_item) for _item in obj["independentFeatures"]] if obj.get("independentFeatures") is not None else None, - "sharedWithOrganizations": [Organization.from_dict(_item) for _item in obj["sharedWithOrganizations"]] if obj.get("sharedWithOrganizations") is not None else None, - "visibility": obj.get("visibility"), - "task": obj.get("task"), - "torchConfig": obj.get("torchConfig"), - "preprocessors": [Transformer.from_dict(_item) for _item in obj["preprocessors"]] if obj.get("preprocessors") is not None else None, - "featurizers": [Transformer.from_dict(_item) for _item in obj["featurizers"]] if obj.get("featurizers") is not None else None, - "rawPreprocessor": obj.get("rawPreprocessor"), - "rawModel": obj.get("rawModel"), - "creator": User.from_dict(obj["creator"]) if obj.get("creator") is not None else None, - "canEdit": obj.get("canEdit"), - "isAdmin": obj.get("isAdmin"), - "selectedFeatures": obj.get("selectedFeatures"), - "tags": obj.get("tags"), - "legacyPredictionService": obj.get("legacyPredictionService"), - "scores": ModelScores.from_dict(obj["scores"]) if obj.get("scores") is not None else None, - "extraConfig": ModelExtraConfig.from_dict(obj["extraConfig"]) if obj.get("extraConfig") is not None else None, - "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "description": obj.get("description"), + "type": obj.get("type"), + "jaqpotpyVersion": obj.get("jaqpotpyVersion"), + "doas": [Doa.from_dict(_item) for _item in obj["doas"]] + if obj.get("doas") is not None + else None, + "libraries": [Library.from_dict(_item) for _item in obj["libraries"]] + if obj.get("libraries") is not None + else None, + "dependentFeatures": [ + Feature.from_dict(_item) for _item in obj["dependentFeatures"] + ] + if obj.get("dependentFeatures") is not None + else None, + "independentFeatures": [ + Feature.from_dict(_item) for _item in obj["independentFeatures"] + ] + if obj.get("independentFeatures") is not None + else None, + "sharedWithOrganizations": [ + Organization.from_dict(_item) + for _item in obj["sharedWithOrganizations"] + ] + if obj.get("sharedWithOrganizations") is not None + else None, + "visibility": obj.get("visibility"), + "task": obj.get("task"), + "torchConfig": obj.get("torchConfig"), + "preprocessors": [ + Transformer.from_dict(_item) for _item in obj["preprocessors"] + ] + if obj.get("preprocessors") is not None + else None, + "featurizers": [ + Transformer.from_dict(_item) for _item in obj["featurizers"] + ] + if obj.get("featurizers") is not None + else None, + "rawPreprocessor": obj.get("rawPreprocessor"), + "rawModel": obj.get("rawModel"), + "creator": User.from_dict(obj["creator"]) + if obj.get("creator") is not None + else None, + "canEdit": obj.get("canEdit"), + "isAdmin": obj.get("isAdmin"), + "selectedFeatures": obj.get("selectedFeatures"), + "tags": obj.get("tags"), + "legacyPredictionService": obj.get("legacyPredictionService"), + "scores": ModelScores.from_dict(obj["scores"]) + if obj.get("scores") is not None + else None, + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt"), + } + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/model_extra_config.py b/jaqpotpy/api/openapi/models/model_extra_config.py deleted file mode 100644 index 09b52a57..00000000 --- a/jaqpotpy/api/openapi/models/model_extra_config.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - Jaqpot API - - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from jaqpotpy.api.openapi.models.transformer import Transformer -from typing import Optional, Set -from typing_extensions import Self - -class ModelExtraConfig(BaseModel): - """ - A JSON object containing extra configuration for the model - """ # noqa: E501 - torch_config: Optional[Dict[str, Any]] = Field(default=None, alias="torchConfig") - preprocessors: Optional[Annotated[List[Transformer], Field(max_length=20)]] = None - featurizers: Optional[Annotated[List[Transformer], Field(max_length=20)]] = None - __properties: ClassVar[List[str]] = ["torchConfig", "preprocessors", "featurizers"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ModelExtraConfig from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in preprocessors (list) - _items = [] - if self.preprocessors: - for _item_preprocessors in self.preprocessors: - if _item_preprocessors: - _items.append(_item_preprocessors.to_dict()) - _dict['preprocessors'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in featurizers (list) - _items = [] - if self.featurizers: - for _item_featurizers in self.featurizers: - if _item_featurizers: - _items.append(_item_featurizers.to_dict()) - _dict['featurizers'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ModelExtraConfig from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "torchConfig": obj.get("torchConfig"), - "preprocessors": [Transformer.from_dict(_item) for _item in obj["preprocessors"]] if obj.get("preprocessors") is not None else None, - "featurizers": [Transformer.from_dict(_item) for _item in obj["featurizers"]] if obj.get("featurizers") is not None else None - }) - return _obj - - diff --git a/jaqpotpy/api/openapi/models/model_scores.py b/jaqpotpy/api/openapi/models/model_scores.py index f288469c..7dc1d67a 100644 --- a/jaqpotpy/api/openapi/models/model_scores.py +++ b/jaqpotpy/api/openapi/models/model_scores.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -24,13 +23,17 @@ from typing import Optional, Set from typing_extensions import Self + class ModelScores(BaseModel): """ ModelScores - """ # noqa: E501 + """ # noqa: E501 + train: Optional[List[Scores]] = None test: Optional[List[Scores]] = None - cross_validation: Optional[List[Scores]] = Field(default=None, alias="crossValidation") + cross_validation: Optional[List[Scores]] = Field( + default=None, alias="crossValidation" + ) __properties: ClassVar[List[str]] = ["train", "test", "crossValidation"] model_config = ConfigDict( @@ -39,7 +42,6 @@ class ModelScores(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,8 +66,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -78,21 +79,21 @@ def to_dict(self) -> Dict[str, Any]: for _item_train in self.train: if _item_train: _items.append(_item_train.to_dict()) - _dict['train'] = _items + _dict["train"] = _items # override the default output from pydantic by calling `to_dict()` of each item in test (list) _items = [] if self.test: for _item_test in self.test: if _item_test: _items.append(_item_test.to_dict()) - _dict['test'] = _items + _dict["test"] = _items # override the default output from pydantic by calling `to_dict()` of each item in cross_validation (list) _items = [] if self.cross_validation: for _item_cross_validation in self.cross_validation: if _item_cross_validation: _items.append(_item_cross_validation.to_dict()) - _dict['crossValidation'] = _items + _dict["crossValidation"] = _items return _dict @classmethod @@ -104,11 +105,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "train": [Scores.from_dict(_item) for _item in obj["train"]] if obj.get("train") is not None else None, - "test": [Scores.from_dict(_item) for _item in obj["test"]] if obj.get("test") is not None else None, - "crossValidation": [Scores.from_dict(_item) for _item in obj["crossValidation"]] if obj.get("crossValidation") is not None else None - }) + _obj = cls.model_validate( + { + "train": [Scores.from_dict(_item) for _item in obj["train"]] + if obj.get("train") is not None + else None, + "test": [Scores.from_dict(_item) for _item in obj["test"]] + if obj.get("test") is not None + else None, + "crossValidation": [ + Scores.from_dict(_item) for _item in obj["crossValidation"] + ] + if obj.get("crossValidation") is not None + else None, + } + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/model_summary.py b/jaqpotpy/api/openapi/models/model_summary.py index b67f73dc..a74be884 100644 --- a/jaqpotpy/api/openapi/models/model_summary.py +++ b/jaqpotpy/api/openapi/models/model_summary.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -29,22 +28,50 @@ from typing import Optional, Set from typing_extensions import Self + class ModelSummary(BaseModel): """ ModelSummary - """ # noqa: E501 + """ # noqa: E501 + id: StrictInt name: Annotated[str, Field(min_length=3, strict=True, max_length=255)] visibility: ModelVisibility - description: Optional[Annotated[str, Field(min_length=3, strict=True, max_length=50000)]] = None + description: Optional[ + Annotated[str, Field(min_length=3, strict=True, max_length=50000)] + ] = None creator: Optional[User] = None type: ModelType - dependent_features_length: Optional[StrictInt] = Field(default=None, alias="dependentFeaturesLength") - independent_features_length: Optional[StrictInt] = Field(default=None, alias="independentFeaturesLength") - shared_with_organizations: List[OrganizationSummary] = Field(alias="sharedWithOrganizations") - created_at: datetime = Field(description="The date and time when the feature was created.", alias="createdAt") - updated_at: Optional[datetime] = Field(default=None, description="The date and time when the feature was last updated.", alias="updatedAt") - __properties: ClassVar[List[str]] = ["id", "name", "visibility", "description", "creator", "type", "dependentFeaturesLength", "independentFeaturesLength", "sharedWithOrganizations", "createdAt", "updatedAt"] + dependent_features_length: Optional[StrictInt] = Field( + default=None, alias="dependentFeaturesLength" + ) + independent_features_length: Optional[StrictInt] = Field( + default=None, alias="independentFeaturesLength" + ) + shared_with_organizations: List[OrganizationSummary] = Field( + alias="sharedWithOrganizations" + ) + created_at: datetime = Field( + description="The date and time when the feature was created.", alias="createdAt" + ) + updated_at: Optional[datetime] = Field( + default=None, + description="The date and time when the feature was last updated.", + alias="updatedAt", + ) + __properties: ClassVar[List[str]] = [ + "id", + "name", + "visibility", + "description", + "creator", + "type", + "dependentFeaturesLength", + "independentFeaturesLength", + "sharedWithOrganizations", + "createdAt", + "updatedAt", + ] model_config = ConfigDict( populate_by_name=True, @@ -52,7 +79,6 @@ class ModelSummary(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -77,8 +103,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -87,14 +112,14 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of creator if self.creator: - _dict['creator'] = self.creator.to_dict() + _dict["creator"] = self.creator.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in shared_with_organizations (list) _items = [] if self.shared_with_organizations: for _item_shared_with_organizations in self.shared_with_organizations: if _item_shared_with_organizations: _items.append(_item_shared_with_organizations.to_dict()) - _dict['sharedWithOrganizations'] = _items + _dict["sharedWithOrganizations"] = _items return _dict @classmethod @@ -106,19 +131,26 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "visibility": obj.get("visibility"), - "description": obj.get("description"), - "creator": User.from_dict(obj["creator"]) if obj.get("creator") is not None else None, - "type": obj.get("type"), - "dependentFeaturesLength": obj.get("dependentFeaturesLength"), - "independentFeaturesLength": obj.get("independentFeaturesLength"), - "sharedWithOrganizations": [OrganizationSummary.from_dict(_item) for _item in obj["sharedWithOrganizations"]] if obj.get("sharedWithOrganizations") is not None else None, - "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "visibility": obj.get("visibility"), + "description": obj.get("description"), + "creator": User.from_dict(obj["creator"]) + if obj.get("creator") is not None + else None, + "type": obj.get("type"), + "dependentFeaturesLength": obj.get("dependentFeaturesLength"), + "independentFeaturesLength": obj.get("independentFeaturesLength"), + "sharedWithOrganizations": [ + OrganizationSummary.from_dict(_item) + for _item in obj["sharedWithOrganizations"] + ] + if obj.get("sharedWithOrganizations") is not None + else None, + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt"), + } + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/model_task.py b/jaqpotpy/api/openapi/models/model_task.py index 52b80146..6eaded82 100644 --- a/jaqpotpy/api/openapi/models/model_task.py +++ b/jaqpotpy/api/openapi/models/model_task.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import json from enum import Enum @@ -27,13 +26,11 @@ class ModelTask(str, Enum): """ allowed enum values """ - REGRESSION = 'REGRESSION' - BINARY_CLASSIFICATION = 'BINARY_CLASSIFICATION' - MULTICLASS_CLASSIFICATION = 'MULTICLASS_CLASSIFICATION' + REGRESSION = "REGRESSION" + BINARY_CLASSIFICATION = "BINARY_CLASSIFICATION" + MULTICLASS_CLASSIFICATION = "MULTICLASS_CLASSIFICATION" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ModelTask from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/jaqpotpy/api/openapi/models/model_type.py b/jaqpotpy/api/openapi/models/model_type.py index aff24b80..f005af98 100644 --- a/jaqpotpy/api/openapi/models/model_type.py +++ b/jaqpotpy/api/openapi/models/model_type.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import json from enum import Enum @@ -27,26 +26,24 @@ class ModelType(str, Enum): """ allowed enum values """ - SKLEARN = 'SKLEARN' - TORCH_ONNX = 'TORCH_ONNX' - TORCHSCRIPT = 'TORCHSCRIPT' - R_BNLEARN_DISCRETE = 'R_BNLEARN_DISCRETE' - R_CARET = 'R_CARET' - R_GBM = 'R_GBM' - R_NAIVE_BAYES = 'R_NAIVE_BAYES' - R_PBPK = 'R_PBPK' - R_RF = 'R_RF' - R_RPART = 'R_RPART' - R_SVM = 'R_SVM' - R_TREE_CLASS = 'R_TREE_CLASS' - R_TREE_REGR = 'R_TREE_REGR' - QSAR_TOOLBOX_CALCULATOR = 'QSAR_TOOLBOX_CALCULATOR' - QSAR_TOOLBOX_QSAR_MODEL = 'QSAR_TOOLBOX_QSAR_MODEL' - QSAR_TOOLBOX_PROFILER = 'QSAR_TOOLBOX_PROFILER' + SKLEARN = "SKLEARN" + TORCH_ONNX = "TORCH_ONNX" + TORCHSCRIPT = "TORCHSCRIPT" + R_BNLEARN_DISCRETE = "R_BNLEARN_DISCRETE" + R_CARET = "R_CARET" + R_GBM = "R_GBM" + R_NAIVE_BAYES = "R_NAIVE_BAYES" + R_PBPK = "R_PBPK" + R_RF = "R_RF" + R_RPART = "R_RPART" + R_SVM = "R_SVM" + R_TREE_CLASS = "R_TREE_CLASS" + R_TREE_REGR = "R_TREE_REGR" + QSAR_TOOLBOX_CALCULATOR = "QSAR_TOOLBOX_CALCULATOR" + QSAR_TOOLBOX_QSAR_MODEL = "QSAR_TOOLBOX_QSAR_MODEL" + QSAR_TOOLBOX_PROFILER = "QSAR_TOOLBOX_PROFILER" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ModelType from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/jaqpotpy/api/openapi/models/model_visibility.py b/jaqpotpy/api/openapi/models/model_visibility.py index 7421b9ae..cdfef4f8 100644 --- a/jaqpotpy/api/openapi/models/model_visibility.py +++ b/jaqpotpy/api/openapi/models/model_visibility.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import json from enum import Enum @@ -27,13 +26,11 @@ class ModelVisibility(str, Enum): """ allowed enum values """ - PUBLIC = 'PUBLIC' - ORG_SHARED = 'ORG_SHARED' - PRIVATE = 'PRIVATE' + PUBLIC = "PUBLIC" + ORG_SHARED = "ORG_SHARED" + PRIVATE = "PRIVATE" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ModelVisibility from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/jaqpotpy/api/openapi/models/multiclass_classification_scores.py b/jaqpotpy/api/openapi/models/multiclass_classification_scores.py index adcc33bd..f14ec030 100644 --- a/jaqpotpy/api/openapi/models/multiclass_classification_scores.py +++ b/jaqpotpy/api/openapi/models/multiclass_classification_scores.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -24,21 +23,60 @@ from typing import Optional, Set from typing_extensions import Self + class MulticlassClassificationScores(BaseModel): """ MulticlassClassificationScores - """ # noqa: E501 + """ # noqa: E501 + labels: Optional[List[StrictStr]] = None y_name: StrictStr = Field(alias="yName") accuracy: Optional[Union[StrictFloat, StrictInt]] = None - balanced_accuracy: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="balancedAccuracy") - precision: Optional[Annotated[List[Union[StrictFloat, StrictInt]], Field(max_length=1000)]] = None - recall: Optional[Annotated[List[Union[StrictFloat, StrictInt]], Field(max_length=1000)]] = None - f1_score: Optional[Annotated[List[Union[StrictFloat, StrictInt]], Field(max_length=1000)]] = Field(default=None, alias="f1Score") - jaccard: Optional[Annotated[List[Union[StrictFloat, StrictInt]], Field(max_length=1000)]] = None - matthews_corr_coef: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="matthewsCorrCoef") - confusion_matrix: Optional[Annotated[List[Annotated[List[Annotated[List[Union[StrictFloat, StrictInt]], Field(max_length=2)]], Field(max_length=2)]], Field(max_length=100)]] = Field(default=None, alias="confusionMatrix") - __properties: ClassVar[List[str]] = ["labels", "yName", "accuracy", "balancedAccuracy", "precision", "recall", "f1Score", "jaccard", "matthewsCorrCoef", "confusionMatrix"] + balanced_accuracy: Optional[Union[StrictFloat, StrictInt]] = Field( + default=None, alias="balancedAccuracy" + ) + precision: Optional[ + Annotated[List[Union[StrictFloat, StrictInt]], Field(max_length=1000)] + ] = None + recall: Optional[ + Annotated[List[Union[StrictFloat, StrictInt]], Field(max_length=1000)] + ] = None + f1_score: Optional[ + Annotated[List[Union[StrictFloat, StrictInt]], Field(max_length=1000)] + ] = Field(default=None, alias="f1Score") + jaccard: Optional[ + Annotated[List[Union[StrictFloat, StrictInt]], Field(max_length=1000)] + ] = None + matthews_corr_coef: Optional[Union[StrictFloat, StrictInt]] = Field( + default=None, alias="matthewsCorrCoef" + ) + confusion_matrix: Optional[ + Annotated[ + List[ + Annotated[ + List[ + Annotated[ + List[Union[StrictFloat, StrictInt]], Field(max_length=2) + ] + ], + Field(max_length=2), + ] + ], + Field(max_length=100), + ] + ] = Field(default=None, alias="confusionMatrix") + __properties: ClassVar[List[str]] = [ + "labels", + "yName", + "accuracy", + "balancedAccuracy", + "precision", + "recall", + "f1Score", + "jaccard", + "matthewsCorrCoef", + "confusionMatrix", + ] model_config = ConfigDict( populate_by_name=True, @@ -46,7 +84,6 @@ class MulticlassClassificationScores(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -71,8 +108,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -90,18 +126,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "labels": obj.get("labels"), - "yName": obj.get("yName"), - "accuracy": obj.get("accuracy"), - "balancedAccuracy": obj.get("balancedAccuracy"), - "precision": obj.get("precision"), - "recall": obj.get("recall"), - "f1Score": obj.get("f1Score"), - "jaccard": obj.get("jaccard"), - "matthewsCorrCoef": obj.get("matthewsCorrCoef"), - "confusionMatrix": obj.get("confusionMatrix") - }) + _obj = cls.model_validate( + { + "labels": obj.get("labels"), + "yName": obj.get("yName"), + "accuracy": obj.get("accuracy"), + "balancedAccuracy": obj.get("balancedAccuracy"), + "precision": obj.get("precision"), + "recall": obj.get("recall"), + "f1Score": obj.get("f1Score"), + "jaccard": obj.get("jaccard"), + "matthewsCorrCoef": obj.get("matthewsCorrCoef"), + "confusionMatrix": obj.get("confusionMatrix"), + } + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/organization.py b/jaqpotpy/api/openapi/models/organization.py index f7b4492e..9ede4656 100644 --- a/jaqpotpy/api/openapi/models/organization.py +++ b/jaqpotpy/api/openapi/models/organization.py @@ -1,25 +1,32 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictInt, + StrictStr, + field_validator, +) from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from jaqpotpy.api.openapi.models.organization_user import OrganizationUser @@ -28,27 +35,56 @@ from typing import Optional, Set from typing_extensions import Self + class Organization(BaseModel): """ Organization - """ # noqa: E501 + """ # noqa: E501 + id: Optional[StrictInt] = None name: Annotated[str, Field(min_length=3, strict=True, max_length=200)] creator: Optional[User] = None visibility: OrganizationVisibility - description: Optional[Annotated[str, Field(min_length=3, strict=True, max_length=2000)]] = None - organization_members: Optional[List[OrganizationUser]] = Field(default=None, alias="organizationMembers") + description: Optional[ + Annotated[str, Field(min_length=3, strict=True, max_length=2000)] + ] = None + organization_members: Optional[List[OrganizationUser]] = Field( + default=None, alias="organizationMembers" + ) contact_email: StrictStr = Field(alias="contactEmail") contact_phone: Optional[StrictStr] = Field(default=None, alias="contactPhone") website: Optional[StrictStr] = None address: Optional[StrictStr] = None - can_edit: Optional[StrictBool] = Field(default=None, description="If the current user can edit the organization", alias="canEdit") - is_member: Optional[StrictBool] = Field(default=None, description="If the current user is a member of the organization", alias="isMember") + can_edit: Optional[StrictBool] = Field( + default=None, + description="If the current user can edit the organization", + alias="canEdit", + ) + is_member: Optional[StrictBool] = Field( + default=None, + description="If the current user is a member of the organization", + alias="isMember", + ) created_at: Optional[datetime] = None updated_at: Optional[datetime] = None - __properties: ClassVar[List[str]] = ["id", "name", "creator", "visibility", "description", "organizationMembers", "contactEmail", "contactPhone", "website", "address", "canEdit", "isMember", "created_at", "updated_at"] - - @field_validator('name') + __properties: ClassVar[List[str]] = [ + "id", + "name", + "creator", + "visibility", + "description", + "organizationMembers", + "contactEmail", + "contactPhone", + "website", + "address", + "canEdit", + "isMember", + "created_at", + "updated_at", + ] + + @field_validator("name") def name_validate_regular_expression(cls, value): """Validates the regular expression""" if not re.match(r"[\w\-_]+", value): @@ -61,7 +97,6 @@ def name_validate_regular_expression(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -86,8 +121,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -96,14 +130,14 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of creator if self.creator: - _dict['creator'] = self.creator.to_dict() + _dict["creator"] = self.creator.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in organization_members (list) _items = [] if self.organization_members: for _item_organization_members in self.organization_members: if _item_organization_members: _items.append(_item_organization_members.to_dict()) - _dict['organizationMembers'] = _items + _dict["organizationMembers"] = _items return _dict @classmethod @@ -115,22 +149,29 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "creator": User.from_dict(obj["creator"]) if obj.get("creator") is not None else None, - "visibility": obj.get("visibility"), - "description": obj.get("description"), - "organizationMembers": [OrganizationUser.from_dict(_item) for _item in obj["organizationMembers"]] if obj.get("organizationMembers") is not None else None, - "contactEmail": obj.get("contactEmail"), - "contactPhone": obj.get("contactPhone"), - "website": obj.get("website"), - "address": obj.get("address"), - "canEdit": obj.get("canEdit"), - "isMember": obj.get("isMember"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "creator": User.from_dict(obj["creator"]) + if obj.get("creator") is not None + else None, + "visibility": obj.get("visibility"), + "description": obj.get("description"), + "organizationMembers": [ + OrganizationUser.from_dict(_item) + for _item in obj["organizationMembers"] + ] + if obj.get("organizationMembers") is not None + else None, + "contactEmail": obj.get("contactEmail"), + "contactPhone": obj.get("contactPhone"), + "website": obj.get("website"), + "address": obj.get("address"), + "canEdit": obj.get("canEdit"), + "isMember": obj.get("isMember"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + } + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/organization_invitation.py b/jaqpotpy/api/openapi/models/organization_invitation.py index 8d3182ab..f1204953 100644 --- a/jaqpotpy/api/openapi/models/organization_invitation.py +++ b/jaqpotpy/api/openapi/models/organization_invitation.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -24,22 +23,40 @@ from typing import Optional, Set from typing_extensions import Self + class OrganizationInvitation(BaseModel): """ OrganizationInvitation - """ # noqa: E501 + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="ID of the invitation") - user_id: Optional[StrictStr] = Field(default=None, description="The user id associated with that invitation", alias="userId") - user_email: StrictStr = Field(description="Email address of the invited user", alias="userEmail") + user_id: Optional[StrictStr] = Field( + default=None, + description="The user id associated with that invitation", + alias="userId", + ) + user_email: StrictStr = Field( + description="Email address of the invited user", alias="userEmail" + ) status: StrictStr = Field(description="Status of the invitation") - expiration_date: datetime = Field(description="Expiration date of the invitation", alias="expirationDate") - __properties: ClassVar[List[str]] = ["id", "userId", "userEmail", "status", "expirationDate"] - - @field_validator('status') + expiration_date: datetime = Field( + description="Expiration date of the invitation", alias="expirationDate" + ) + __properties: ClassVar[List[str]] = [ + "id", + "userId", + "userEmail", + "status", + "expirationDate", + ] + + @field_validator("status") def status_validate_enum(cls, value): """Validates the enum""" - if value not in set(['PENDING', 'REJECTED', 'ACCEPTED']): - raise ValueError("must be one of enum values ('PENDING', 'REJECTED', 'ACCEPTED')") + if value not in set(["PENDING", "REJECTED", "ACCEPTED"]): + raise ValueError( + "must be one of enum values ('PENDING', 'REJECTED', 'ACCEPTED')" + ) return value model_config = ConfigDict( @@ -48,7 +65,6 @@ def status_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,8 +89,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -92,13 +107,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "userId": obj.get("userId"), - "userEmail": obj.get("userEmail"), - "status": obj.get("status"), - "expirationDate": obj.get("expirationDate") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "userId": obj.get("userId"), + "userEmail": obj.get("userEmail"), + "status": obj.get("status"), + "expirationDate": obj.get("expirationDate"), + } + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/organization_summary.py b/jaqpotpy/api/openapi/models/organization_summary.py index 6fcfe212..f596e1b8 100644 --- a/jaqpotpy/api/openapi/models/organization_summary.py +++ b/jaqpotpy/api/openapi/models/organization_summary.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -23,10 +22,12 @@ from typing import Optional, Set from typing_extensions import Self + class OrganizationSummary(BaseModel): """ OrganizationSummary - """ # noqa: E501 + """ # noqa: E501 + id: StrictInt name: StrictStr __properties: ClassVar[List[str]] = ["id", "name"] @@ -37,7 +38,6 @@ class OrganizationSummary(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,8 +62,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -81,10 +80,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name") - }) + _obj = cls.model_validate({"id": obj.get("id"), "name": obj.get("name")}) return _obj - - diff --git a/jaqpotpy/api/openapi/models/organization_user.py b/jaqpotpy/api/openapi/models/organization_user.py index 9b756b4a..6f0c4906 100644 --- a/jaqpotpy/api/openapi/models/organization_user.py +++ b/jaqpotpy/api/openapi/models/organization_user.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -20,20 +19,30 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from jaqpotpy.api.openapi.models.organization_user_association_type import OrganizationUserAssociationType +from jaqpotpy.api.openapi.models.organization_user_association_type import ( + OrganizationUserAssociationType, +) from typing import Optional, Set from typing_extensions import Self + class OrganizationUser(BaseModel): """ OrganizationUser - """ # noqa: E501 + """ # noqa: E501 + id: Optional[StrictInt] = None user_id: StrictStr = Field(alias="userId") username: StrictStr email: StrictStr association_type: OrganizationUserAssociationType = Field(alias="associationType") - __properties: ClassVar[List[str]] = ["id", "userId", "username", "email", "associationType"] + __properties: ClassVar[List[str]] = [ + "id", + "userId", + "username", + "email", + "associationType", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +50,6 @@ class OrganizationUser(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,8 +74,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -85,13 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "userId": obj.get("userId"), - "username": obj.get("username"), - "email": obj.get("email"), - "associationType": obj.get("associationType") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "userId": obj.get("userId"), + "username": obj.get("username"), + "email": obj.get("email"), + "associationType": obj.get("associationType"), + } + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/organization_user_association_type.py b/jaqpotpy/api/openapi/models/organization_user_association_type.py index f3cb1dd2..4013e983 100644 --- a/jaqpotpy/api/openapi/models/organization_user_association_type.py +++ b/jaqpotpy/api/openapi/models/organization_user_association_type.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import json from enum import Enum @@ -27,12 +26,10 @@ class OrganizationUserAssociationType(str, Enum): """ allowed enum values """ - ADMIN = 'ADMIN' - MEMBER = 'MEMBER' + ADMIN = "ADMIN" + MEMBER = "MEMBER" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of OrganizationUserAssociationType from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/jaqpotpy/api/openapi/models/organization_visibility.py b/jaqpotpy/api/openapi/models/organization_visibility.py index 93664fc2..81280c43 100644 --- a/jaqpotpy/api/openapi/models/organization_visibility.py +++ b/jaqpotpy/api/openapi/models/organization_visibility.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import json from enum import Enum @@ -27,12 +26,10 @@ class OrganizationVisibility(str, Enum): """ allowed enum values """ - PUBLIC = 'PUBLIC' - PRIVATE = 'PRIVATE' + PUBLIC = "PUBLIC" + PRIVATE = "PRIVATE" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of OrganizationVisibility from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/jaqpotpy/api/openapi/models/partial_update_organization_request.py b/jaqpotpy/api/openapi/models/partial_update_organization_request.py index d9973c02..9de54280 100644 --- a/jaqpotpy/api/openapi/models/partial_update_organization_request.py +++ b/jaqpotpy/api/openapi/models/partial_update_organization_request.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -24,15 +23,22 @@ from typing import Optional, Set from typing_extensions import Self + class PartialUpdateOrganizationRequest(BaseModel): """ PartialUpdateOrganizationRequest - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr description: Optional[StrictStr] = None contact_email: StrictStr = Field(alias="contactEmail") visibility: OrganizationVisibility - __properties: ClassVar[List[str]] = ["name", "description", "contactEmail", "visibility"] + __properties: ClassVar[List[str]] = [ + "name", + "description", + "contactEmail", + "visibility", + ] model_config = ConfigDict( populate_by_name=True, @@ -40,7 +46,6 @@ class PartialUpdateOrganizationRequest(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,8 +70,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -84,12 +88,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "description": obj.get("description"), - "contactEmail": obj.get("contactEmail"), - "visibility": obj.get("visibility") - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "description": obj.get("description"), + "contactEmail": obj.get("contactEmail"), + "visibility": obj.get("visibility"), + } + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/partially_update_model_feature_request.py b/jaqpotpy/api/openapi/models/partially_update_model_feature_request.py index 89b52b44..c459594d 100644 --- a/jaqpotpy/api/openapi/models/partially_update_model_feature_request.py +++ b/jaqpotpy/api/openapi/models/partially_update_model_feature_request.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -26,17 +25,34 @@ from typing import Optional, Set from typing_extensions import Self + class PartiallyUpdateModelFeatureRequest(BaseModel): """ PartiallyUpdateModelFeatureRequest - """ # noqa: E501 - name: Annotated[str, Field(strict=True, max_length=255)] = Field(description="A name for the feature that will appear on top of the form field") - units: Optional[StrictStr] = Field(default=None, description="The units that this feature is using") - range: Optional[StrictStr] = Field(default=None, description="The range that this feature is using") + """ # noqa: E501 + + name: Annotated[str, Field(strict=True, max_length=255)] = Field( + description="A name for the feature that will appear on top of the form field" + ) + units: Optional[StrictStr] = Field( + default=None, description="The units that this feature is using" + ) + range: Optional[StrictStr] = Field( + default=None, description="The range that this feature is using" + ) description: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = None feature_type: FeatureType = Field(alias="featureType") - possible_values: Optional[Annotated[List[FeaturePossibleValue], Field(max_length=1000)]] = Field(default=None, alias="possibleValues") - __properties: ClassVar[List[str]] = ["name", "units", "range", "description", "featureType", "possibleValues"] + possible_values: Optional[ + Annotated[List[FeaturePossibleValue], Field(max_length=1000)] + ] = Field(default=None, alias="possibleValues") + __properties: ClassVar[List[str]] = [ + "name", + "units", + "range", + "description", + "featureType", + "possibleValues", + ] model_config = ConfigDict( populate_by_name=True, @@ -44,7 +60,6 @@ class PartiallyUpdateModelFeatureRequest(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -69,8 +84,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -83,7 +97,7 @@ def to_dict(self) -> Dict[str, Any]: for _item_possible_values in self.possible_values: if _item_possible_values: _items.append(_item_possible_values.to_dict()) - _dict['possibleValues'] = _items + _dict["possibleValues"] = _items return _dict @classmethod @@ -95,14 +109,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "units": obj.get("units"), - "range": obj.get("range"), - "description": obj.get("description"), - "featureType": obj.get("featureType"), - "possibleValues": [FeaturePossibleValue.from_dict(_item) for _item in obj["possibleValues"]] if obj.get("possibleValues") is not None else None - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "units": obj.get("units"), + "range": obj.get("range"), + "description": obj.get("description"), + "featureType": obj.get("featureType"), + "possibleValues": [ + FeaturePossibleValue.from_dict(_item) + for _item in obj["possibleValues"] + ] + if obj.get("possibleValues") is not None + else None, + } + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/partially_update_model_request.py b/jaqpotpy/api/openapi/models/partially_update_model_request.py index e8e59d1f..c8b74e04 100644 --- a/jaqpotpy/api/openapi/models/partially_update_model_request.py +++ b/jaqpotpy/api/openapi/models/partially_update_model_request.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -26,17 +25,30 @@ from typing import Optional, Set from typing_extensions import Self + class PartiallyUpdateModelRequest(BaseModel): """ PartiallyUpdateModelRequest - """ # noqa: E501 + """ # noqa: E501 + name: Annotated[str, Field(min_length=3, strict=True, max_length=255)] - description: Optional[Annotated[str, Field(min_length=3, strict=True, max_length=50000)]] = None + description: Optional[ + Annotated[str, Field(min_length=3, strict=True, max_length=50000)] + ] = None visibility: ModelVisibility task: ModelTask tags: Optional[Annotated[str, Field(strict=True, max_length=1000)]] = None - shared_with_organization_ids: Optional[List[StrictInt]] = Field(default=None, alias="sharedWithOrganizationIds") - __properties: ClassVar[List[str]] = ["name", "description", "visibility", "task", "tags", "sharedWithOrganizationIds"] + shared_with_organization_ids: Optional[List[StrictInt]] = Field( + default=None, alias="sharedWithOrganizationIds" + ) + __properties: ClassVar[List[str]] = [ + "name", + "description", + "visibility", + "task", + "tags", + "sharedWithOrganizationIds", + ] model_config = ConfigDict( populate_by_name=True, @@ -44,7 +56,6 @@ class PartiallyUpdateModelRequest(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -69,8 +80,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -88,14 +98,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "description": obj.get("description"), - "visibility": obj.get("visibility"), - "task": obj.get("task"), - "tags": obj.get("tags"), - "sharedWithOrganizationIds": obj.get("sharedWithOrganizationIds") - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "description": obj.get("description"), + "visibility": obj.get("visibility"), + "task": obj.get("task"), + "tags": obj.get("tags"), + "sharedWithOrganizationIds": obj.get("sharedWithOrganizationIds"), + } + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/prediction_doa.py b/jaqpotpy/api/openapi/models/prediction_doa.py index 0b3fb6a6..f35ca44d 100644 --- a/jaqpotpy/api/openapi/models/prediction_doa.py +++ b/jaqpotpy/api/openapi/models/prediction_doa.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -25,16 +24,32 @@ from typing import Optional, Set from typing_extensions import Self + class PredictionDoa(BaseModel): """ PredictionDoa - """ # noqa: E501 + """ # noqa: E501 + id: Optional[StrictInt] = None method: DoaMethod data: Dict[str, Any] = Field(description="The doa calculated data") - created_at: Optional[datetime] = Field(default=None, description="The date and time when the feature was created.", alias="createdAt") - updated_at: Optional[datetime] = Field(default=None, description="The date and time when the feature was last updated.", alias="updatedAt") - __properties: ClassVar[List[str]] = ["id", "method", "data", "createdAt", "updatedAt"] + created_at: Optional[datetime] = Field( + default=None, + description="The date and time when the feature was created.", + alias="createdAt", + ) + updated_at: Optional[datetime] = Field( + default=None, + description="The date and time when the feature was last updated.", + alias="updatedAt", + ) + __properties: ClassVar[List[str]] = [ + "id", + "method", + "data", + "createdAt", + "updatedAt", + ] model_config = ConfigDict( populate_by_name=True, @@ -42,7 +57,6 @@ class PredictionDoa(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,8 +81,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -86,13 +99,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "method": obj.get("method"), - "data": obj.get("data"), - "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "method": obj.get("method"), + "data": obj.get("data"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt"), + } + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/prediction_model.py b/jaqpotpy/api/openapi/models/prediction_model.py index 9bb8cb9c..c5414e2f 100644 --- a/jaqpotpy/api/openapi/models/prediction_model.py +++ b/jaqpotpy/api/openapi/models/prediction_model.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -28,26 +27,80 @@ from typing import Optional, Set from typing_extensions import Self + class PredictionModel(BaseModel): """ PredictionModel - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="Unique identifier for the prediction model") - dependent_features: List[Feature] = Field(description="List of dependent features for the model", alias="dependentFeatures") - independent_features: List[Feature] = Field(description="List of independent features for the model", alias="independentFeatures") + """ # noqa: E501 + + id: Optional[StrictInt] = Field( + default=None, description="Unique identifier for the prediction model" + ) + dependent_features: List[Feature] = Field( + description="List of dependent features for the model", + alias="dependentFeatures", + ) + independent_features: List[Feature] = Field( + description="List of independent features for the model", + alias="independentFeatures", + ) type: ModelType - raw_model: StrictStr = Field(description="Raw model data in serialized format", alias="rawModel") - raw_preprocessor: Optional[StrictStr] = Field(default=None, description="Raw preprocessor data in serialized format", alias="rawPreprocessor") - doas: Optional[List[PredictionDoa]] = Field(default=None, description="List of Domain of Applicability (DoA) configurations") - selected_features: Optional[List[StrictStr]] = Field(default=None, description="List of feature names selected for the model", alias="selectedFeatures") + raw_model: StrictStr = Field( + description="Raw model data in serialized format", alias="rawModel" + ) + raw_preprocessor: Optional[StrictStr] = Field( + default=None, + description="Raw preprocessor data in serialized format", + alias="rawPreprocessor", + ) + doas: Optional[List[PredictionDoa]] = Field( + default=None, description="List of Domain of Applicability (DoA) configurations" + ) + selected_features: Optional[List[StrictStr]] = Field( + default=None, + description="List of feature names selected for the model", + alias="selectedFeatures", + ) task: ModelTask - featurizers: Optional[List[Transformer]] = Field(default=None, description="List of featurizer configurations applied to the model") - preprocessors: Optional[List[Transformer]] = Field(default=None, description="List of preprocessor configurations applied to the model") - torch_config: Optional[Dict[str, Any]] = Field(default=None, description="Torch configuration settings, optional", alias="torchConfig") - extra_config: Optional[Dict[str, Any]] = Field(default=None, description="Additional configuration settings, optional", alias="extraConfig") - legacy_additional_info: Optional[Dict[str, Any]] = Field(default=None, description="Legacy additional information settings, optional", alias="legacyAdditionalInfo") - legacy_prediction_service: Optional[StrictStr] = Field(default=None, description="Legacy prediction service information, if available", alias="legacyPredictionService") - __properties: ClassVar[List[str]] = ["id", "dependentFeatures", "independentFeatures", "type", "rawModel", "rawPreprocessor", "doas", "selectedFeatures", "task", "featurizers", "preprocessors", "torchConfig", "extraConfig", "legacyAdditionalInfo", "legacyPredictionService"] + featurizers: Optional[List[Transformer]] = Field( + default=None, + description="List of featurizer configurations applied to the model", + ) + preprocessors: Optional[List[Transformer]] = Field( + default=None, + description="List of preprocessor configurations applied to the model", + ) + torch_config: Optional[Dict[str, Any]] = Field( + default=None, + description="Torch configuration settings, optional", + alias="torchConfig", + ) + legacy_additional_info: Optional[Dict[str, Any]] = Field( + default=None, + description="Legacy additional information settings, optional", + alias="legacyAdditionalInfo", + ) + legacy_prediction_service: Optional[StrictStr] = Field( + default=None, + description="Legacy prediction service information, if available", + alias="legacyPredictionService", + ) + __properties: ClassVar[List[str]] = [ + "id", + "dependentFeatures", + "independentFeatures", + "type", + "rawModel", + "rawPreprocessor", + "doas", + "selectedFeatures", + "task", + "featurizers", + "preprocessors", + "torchConfig", + "legacyAdditionalInfo", + "legacyPredictionService", + ] model_config = ConfigDict( populate_by_name=True, @@ -55,7 +108,6 @@ class PredictionModel(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -80,8 +132,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -94,59 +145,60 @@ def to_dict(self) -> Dict[str, Any]: for _item_dependent_features in self.dependent_features: if _item_dependent_features: _items.append(_item_dependent_features.to_dict()) - _dict['dependentFeatures'] = _items + _dict["dependentFeatures"] = _items # override the default output from pydantic by calling `to_dict()` of each item in independent_features (list) _items = [] if self.independent_features: for _item_independent_features in self.independent_features: if _item_independent_features: _items.append(_item_independent_features.to_dict()) - _dict['independentFeatures'] = _items + _dict["independentFeatures"] = _items # override the default output from pydantic by calling `to_dict()` of each item in doas (list) _items = [] if self.doas: for _item_doas in self.doas: if _item_doas: _items.append(_item_doas.to_dict()) - _dict['doas'] = _items + _dict["doas"] = _items # override the default output from pydantic by calling `to_dict()` of each item in featurizers (list) _items = [] if self.featurizers: for _item_featurizers in self.featurizers: if _item_featurizers: _items.append(_item_featurizers.to_dict()) - _dict['featurizers'] = _items + _dict["featurizers"] = _items # override the default output from pydantic by calling `to_dict()` of each item in preprocessors (list) _items = [] if self.preprocessors: for _item_preprocessors in self.preprocessors: if _item_preprocessors: _items.append(_item_preprocessors.to_dict()) - _dict['preprocessors'] = _items + _dict["preprocessors"] = _items # set to None if id (nullable) is None # and model_fields_set contains the field if self.id is None and "id" in self.model_fields_set: - _dict['id'] = None + _dict["id"] = None # set to None if torch_config (nullable) is None # and model_fields_set contains the field if self.torch_config is None and "torch_config" in self.model_fields_set: - _dict['torchConfig'] = None - - # set to None if extra_config (nullable) is None - # and model_fields_set contains the field - if self.extra_config is None and "extra_config" in self.model_fields_set: - _dict['extraConfig'] = None + _dict["torchConfig"] = None # set to None if legacy_additional_info (nullable) is None # and model_fields_set contains the field - if self.legacy_additional_info is None and "legacy_additional_info" in self.model_fields_set: - _dict['legacyAdditionalInfo'] = None + if ( + self.legacy_additional_info is None + and "legacy_additional_info" in self.model_fields_set + ): + _dict["legacyAdditionalInfo"] = None # set to None if legacy_prediction_service (nullable) is None # and model_fields_set contains the field - if self.legacy_prediction_service is None and "legacy_prediction_service" in self.model_fields_set: - _dict['legacyPredictionService'] = None + if ( + self.legacy_prediction_service is None + and "legacy_prediction_service" in self.model_fields_set + ): + _dict["legacyPredictionService"] = None return _dict @@ -159,23 +211,40 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "dependentFeatures": [Feature.from_dict(_item) for _item in obj["dependentFeatures"]] if obj.get("dependentFeatures") is not None else None, - "independentFeatures": [Feature.from_dict(_item) for _item in obj["independentFeatures"]] if obj.get("independentFeatures") is not None else None, - "type": obj.get("type"), - "rawModel": obj.get("rawModel"), - "rawPreprocessor": obj.get("rawPreprocessor"), - "doas": [PredictionDoa.from_dict(_item) for _item in obj["doas"]] if obj.get("doas") is not None else None, - "selectedFeatures": obj.get("selectedFeatures"), - "task": obj.get("task"), - "featurizers": [Transformer.from_dict(_item) for _item in obj["featurizers"]] if obj.get("featurizers") is not None else None, - "preprocessors": [Transformer.from_dict(_item) for _item in obj["preprocessors"]] if obj.get("preprocessors") is not None else None, - "torchConfig": obj.get("torchConfig"), - "extraConfig": obj.get("extraConfig"), - "legacyAdditionalInfo": obj.get("legacyAdditionalInfo"), - "legacyPredictionService": obj.get("legacyPredictionService") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "dependentFeatures": [ + Feature.from_dict(_item) for _item in obj["dependentFeatures"] + ] + if obj.get("dependentFeatures") is not None + else None, + "independentFeatures": [ + Feature.from_dict(_item) for _item in obj["independentFeatures"] + ] + if obj.get("independentFeatures") is not None + else None, + "type": obj.get("type"), + "rawModel": obj.get("rawModel"), + "rawPreprocessor": obj.get("rawPreprocessor"), + "doas": [PredictionDoa.from_dict(_item) for _item in obj["doas"]] + if obj.get("doas") is not None + else None, + "selectedFeatures": obj.get("selectedFeatures"), + "task": obj.get("task"), + "featurizers": [ + Transformer.from_dict(_item) for _item in obj["featurizers"] + ] + if obj.get("featurizers") is not None + else None, + "preprocessors": [ + Transformer.from_dict(_item) for _item in obj["preprocessors"] + ] + if obj.get("preprocessors") is not None + else None, + "torchConfig": obj.get("torchConfig"), + "legacyAdditionalInfo": obj.get("legacyAdditionalInfo"), + "legacyPredictionService": obj.get("legacyPredictionService"), + } + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/prediction_request.py b/jaqpotpy/api/openapi/models/prediction_request.py index 8a557d48..f6d66e91 100644 --- a/jaqpotpy/api/openapi/models/prediction_request.py +++ b/jaqpotpy/api/openapi/models/prediction_request.py @@ -1,38 +1,38 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List from jaqpotpy.api.openapi.models.dataset import Dataset from jaqpotpy.api.openapi.models.prediction_model import PredictionModel from typing import Optional, Set from typing_extensions import Self + class PredictionRequest(BaseModel): """ PredictionRequest - """ # noqa: E501 + """ # noqa: E501 + model: PredictionModel dataset: Dataset - extra_config: Optional[Dict[str, Any]] = Field(default=None, description="Optional configuration for additional settings.", alias="extraConfig") - __properties: ClassVar[List[str]] = ["model", "dataset", "extraConfig"] + __properties: ClassVar[List[str]] = ["model", "dataset"] model_config = ConfigDict( populate_by_name=True, @@ -40,7 +40,6 @@ class PredictionRequest(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,8 +64,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,10 +73,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of model if self.model: - _dict['model'] = self.model.to_dict() + _dict["model"] = self.model.to_dict() # override the default output from pydantic by calling `to_dict()` of dataset if self.dataset: - _dict['dataset'] = self.dataset.to_dict() + _dict["dataset"] = self.dataset.to_dict() return _dict @classmethod @@ -90,11 +88,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "model": PredictionModel.from_dict(obj["model"]) if obj.get("model") is not None else None, - "dataset": Dataset.from_dict(obj["dataset"]) if obj.get("dataset") is not None else None, - "extraConfig": obj.get("extraConfig") - }) + _obj = cls.model_validate( + { + "model": PredictionModel.from_dict(obj["model"]) + if obj.get("model") is not None + else None, + "dataset": Dataset.from_dict(obj["dataset"]) + if obj.get("dataset") is not None + else None, + } + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/prediction_response.py b/jaqpotpy/api/openapi/models/prediction_response.py index e1bc4d76..5b162adc 100644 --- a/jaqpotpy/api/openapi/models/prediction_response.py +++ b/jaqpotpy/api/openapi/models/prediction_response.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -23,10 +22,12 @@ from typing import Optional, Set from typing_extensions import Self + class PredictionResponse(BaseModel): """ PredictionResponse - """ # noqa: E501 + """ # noqa: E501 + predictions: List[Any] __properties: ClassVar[List[str]] = ["predictions"] @@ -36,7 +37,6 @@ class PredictionResponse(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,8 +61,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -80,9 +79,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "predictions": obj.get("predictions") - }) + _obj = cls.model_validate({"predictions": obj.get("predictions")}) return _obj - - diff --git a/jaqpotpy/api/openapi/models/regression_scores.py b/jaqpotpy/api/openapi/models/regression_scores.py index be3e79d1..f32ddb70 100644 --- a/jaqpotpy/api/openapi/models/regression_scores.py +++ b/jaqpotpy/api/openapi/models/regression_scores.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -23,20 +22,38 @@ from typing import Optional, Set from typing_extensions import Self + class RegressionScores(BaseModel): """ RegressionScores - """ # noqa: E501 + """ # noqa: E501 + y_name: StrictStr = Field(alias="yName") r2: Optional[Union[StrictFloat, StrictInt]] = None mae: Optional[Union[StrictFloat, StrictInt]] = None rmse: Optional[Union[StrictFloat, StrictInt]] = None - r_squared_diff_r_zero: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="rSquaredDiffRZero") - r_squared_diff_r_zero_hat: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="rSquaredDiffRZeroHat") - abs_diff_r_zero_hat: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="absDiffRZeroHat") + r_squared_diff_r_zero: Optional[Union[StrictFloat, StrictInt]] = Field( + default=None, alias="rSquaredDiffRZero" + ) + r_squared_diff_r_zero_hat: Optional[Union[StrictFloat, StrictInt]] = Field( + default=None, alias="rSquaredDiffRZeroHat" + ) + abs_diff_r_zero_hat: Optional[Union[StrictFloat, StrictInt]] = Field( + default=None, alias="absDiffRZeroHat" + ) k: Optional[Union[StrictFloat, StrictInt]] = None k_hat: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="kHat") - __properties: ClassVar[List[str]] = ["yName", "r2", "mae", "rmse", "rSquaredDiffRZero", "rSquaredDiffRZeroHat", "absDiffRZeroHat", "k", "kHat"] + __properties: ClassVar[List[str]] = [ + "yName", + "r2", + "mae", + "rmse", + "rSquaredDiffRZero", + "rSquaredDiffRZeroHat", + "absDiffRZeroHat", + "k", + "kHat", + ] model_config = ConfigDict( populate_by_name=True, @@ -44,7 +61,6 @@ class RegressionScores(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -69,8 +85,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -88,17 +103,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "yName": obj.get("yName"), - "r2": obj.get("r2"), - "mae": obj.get("mae"), - "rmse": obj.get("rmse"), - "rSquaredDiffRZero": obj.get("rSquaredDiffRZero"), - "rSquaredDiffRZeroHat": obj.get("rSquaredDiffRZeroHat"), - "absDiffRZeroHat": obj.get("absDiffRZeroHat"), - "k": obj.get("k"), - "kHat": obj.get("kHat") - }) + _obj = cls.model_validate( + { + "yName": obj.get("yName"), + "r2": obj.get("r2"), + "mae": obj.get("mae"), + "rmse": obj.get("rmse"), + "rSquaredDiffRZero": obj.get("rSquaredDiffRZero"), + "rSquaredDiffRZeroHat": obj.get("rSquaredDiffRZeroHat"), + "absDiffRZeroHat": obj.get("absDiffRZeroHat"), + "k": obj.get("k"), + "kHat": obj.get("kHat"), + } + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/scores.py b/jaqpotpy/api/openapi/models/scores.py index e35d3980..76d13b9e 100644 --- a/jaqpotpy/api/openapi/models/scores.py +++ b/jaqpotpy/api/openapi/models/scores.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -20,20 +19,34 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from jaqpotpy.api.openapi.models.binary_classification_scores import BinaryClassificationScores -from jaqpotpy.api.openapi.models.multiclass_classification_scores import MulticlassClassificationScores +from jaqpotpy.api.openapi.models.binary_classification_scores import ( + BinaryClassificationScores, +) +from jaqpotpy.api.openapi.models.multiclass_classification_scores import ( + MulticlassClassificationScores, +) from jaqpotpy.api.openapi.models.regression_scores import RegressionScores from typing import Optional, Set from typing_extensions import Self + class Scores(BaseModel): """ Scores - """ # noqa: E501 + """ # noqa: E501 + regression: Optional[RegressionScores] = None - binary_classification: Optional[BinaryClassificationScores] = Field(default=None, alias="binaryClassification") - multiclass_classification: Optional[MulticlassClassificationScores] = Field(default=None, alias="multiclassClassification") - __properties: ClassVar[List[str]] = ["regression", "binaryClassification", "multiclassClassification"] + binary_classification: Optional[BinaryClassificationScores] = Field( + default=None, alias="binaryClassification" + ) + multiclass_classification: Optional[MulticlassClassificationScores] = Field( + default=None, alias="multiclassClassification" + ) + __properties: ClassVar[List[str]] = [ + "regression", + "binaryClassification", + "multiclassClassification", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +54,6 @@ class Scores(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,8 +78,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -76,13 +87,13 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of regression if self.regression: - _dict['regression'] = self.regression.to_dict() + _dict["regression"] = self.regression.to_dict() # override the default output from pydantic by calling `to_dict()` of binary_classification if self.binary_classification: - _dict['binaryClassification'] = self.binary_classification.to_dict() + _dict["binaryClassification"] = self.binary_classification.to_dict() # override the default output from pydantic by calling `to_dict()` of multiclass_classification if self.multiclass_classification: - _dict['multiclassClassification'] = self.multiclass_classification.to_dict() + _dict["multiclassClassification"] = self.multiclass_classification.to_dict() return _dict @classmethod @@ -94,11 +105,21 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "regression": RegressionScores.from_dict(obj["regression"]) if obj.get("regression") is not None else None, - "binaryClassification": BinaryClassificationScores.from_dict(obj["binaryClassification"]) if obj.get("binaryClassification") is not None else None, - "multiclassClassification": MulticlassClassificationScores.from_dict(obj["multiclassClassification"]) if obj.get("multiclassClassification") is not None else None - }) + _obj = cls.model_validate( + { + "regression": RegressionScores.from_dict(obj["regression"]) + if obj.get("regression") is not None + else None, + "binaryClassification": BinaryClassificationScores.from_dict( + obj["binaryClassification"] + ) + if obj.get("binaryClassification") is not None + else None, + "multiclassClassification": MulticlassClassificationScores.from_dict( + obj["multiclassClassification"] + ) + if obj.get("multiclassClassification") is not None + else None, + } + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/transformer.py b/jaqpotpy/api/openapi/models/transformer.py index 84e78c6e..84522ba3 100644 --- a/jaqpotpy/api/openapi/models/transformer.py +++ b/jaqpotpy/api/openapi/models/transformer.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -23,10 +22,12 @@ from typing import Optional, Set from typing_extensions import Self + class Transformer(BaseModel): """ A preprocessor for the model - """ # noqa: E501 + """ # noqa: E501 + id: Optional[StrictInt] = None name: StrictStr config: Dict[str, Any] @@ -38,7 +39,6 @@ class Transformer(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,8 +63,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -82,11 +81,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "config": obj.get("config") - }) + _obj = cls.model_validate( + {"id": obj.get("id"), "name": obj.get("name"), "config": obj.get("config")} + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/update_api_key200_response.py b/jaqpotpy/api/openapi/models/update_api_key200_response.py index 48b6c6b6..f50d9fe3 100644 --- a/jaqpotpy/api/openapi/models/update_api_key200_response.py +++ b/jaqpotpy/api/openapi/models/update_api_key200_response.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -23,13 +22,19 @@ from typing import Optional, Set from typing_extensions import Self + class UpdateApiKey200Response(BaseModel): """ UpdateApiKey200Response - """ # noqa: E501 + """ # noqa: E501 + key: Optional[StrictStr] = Field(default=None, description="The updated API key") - note: Optional[StrictStr] = Field(default=None, description="The updated description of the API key") - enabled: Optional[StrictBool] = Field(default=None, description="Whether the API key is active or disabled") + note: Optional[StrictStr] = Field( + default=None, description="The updated description of the API key" + ) + enabled: Optional[StrictBool] = Field( + default=None, description="Whether the API key is active or disabled" + ) __properties: ClassVar[List[str]] = ["key", "note", "enabled"] model_config = ConfigDict( @@ -38,7 +43,6 @@ class UpdateApiKey200Response(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,8 +67,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -82,11 +85,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "key": obj.get("key"), - "note": obj.get("note"), - "enabled": obj.get("enabled") - }) + _obj = cls.model_validate( + { + "key": obj.get("key"), + "note": obj.get("note"), + "enabled": obj.get("enabled"), + } + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/update_api_key_request.py b/jaqpotpy/api/openapi/models/update_api_key_request.py index 31eed66c..3ba61b97 100644 --- a/jaqpotpy/api/openapi/models/update_api_key_request.py +++ b/jaqpotpy/api/openapi/models/update_api_key_request.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -23,12 +22,18 @@ from typing import Optional, Set from typing_extensions import Self + class UpdateApiKeyRequest(BaseModel): """ UpdateApiKeyRequest - """ # noqa: E501 - note: Optional[StrictStr] = Field(default=None, description="Updated description for the API key") - enabled: Optional[StrictBool] = Field(default=None, description="Set to `false` to disable the API key") + """ # noqa: E501 + + note: Optional[StrictStr] = Field( + default=None, description="Updated description for the API key" + ) + enabled: Optional[StrictBool] = Field( + default=None, description="Set to `false` to disable the API key" + ) __properties: ClassVar[List[str]] = ["note", "enabled"] model_config = ConfigDict( @@ -37,7 +42,6 @@ class UpdateApiKeyRequest(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,8 +66,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -81,10 +84,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "note": obj.get("note"), - "enabled": obj.get("enabled") - }) + _obj = cls.model_validate( + {"note": obj.get("note"), "enabled": obj.get("enabled")} + ) return _obj - - diff --git a/jaqpotpy/api/openapi/models/user.py b/jaqpotpy/api/openapi/models/user.py index 6f0655fe..b7531620 100644 --- a/jaqpotpy/api/openapi/models/user.py +++ b/jaqpotpy/api/openapi/models/user.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations import pprint import re # noqa: F401 @@ -23,17 +22,26 @@ from typing import Optional, Set from typing_extensions import Self + class User(BaseModel): """ User - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr username: Optional[StrictStr] = None first_name: Optional[StrictStr] = Field(default=None, alias="firstName") last_name: Optional[StrictStr] = Field(default=None, alias="lastName") email: Optional[StrictStr] = None email_verified: Optional[StrictBool] = Field(default=None, alias="emailVerified") - __properties: ClassVar[List[str]] = ["id", "username", "firstName", "lastName", "email", "emailVerified"] + __properties: ClassVar[List[str]] = [ + "id", + "username", + "firstName", + "lastName", + "email", + "emailVerified", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +49,6 @@ class User(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -85,14 +91,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "username": obj.get("username"), - "firstName": obj.get("firstName"), - "lastName": obj.get("lastName"), - "email": obj.get("email"), - "emailVerified": obj.get("emailVerified") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "username": obj.get("username"), + "firstName": obj.get("firstName"), + "lastName": obj.get("lastName"), + "email": obj.get("email"), + "emailVerified": obj.get("emailVerified"), + } + ) return _obj - - diff --git a/jaqpotpy/api/openapi/pyproject.toml b/jaqpotpy/api/openapi/pyproject.toml deleted file mode 100644 index 963e33f4..00000000 --- a/jaqpotpy/api/openapi/pyproject.toml +++ /dev/null @@ -1,71 +0,0 @@ -[tool.poetry] -name = "jaqpotpy.api.openapi" -version = "1.0.0" -description = "Jaqpot API" -authors = ["Jaqpot "] -license = "Apache 2.0" -readme = "README.md" -repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" -keywords = ["OpenAPI", "OpenAPI-Generator", "Jaqpot API"] -include = ["jaqpotpy.api.openapi/py.typed"] - -[tool.poetry.dependencies] -python = "^3.7" - -urllib3 = ">= 1.25.3" -python-dateutil = ">=2.8.2" -pydantic = ">=2" -typing-extensions = ">=4.7.1" - -[tool.poetry.dev-dependencies] -pytest = ">=7.2.1" -tox = ">=3.9.0" -flake8 = ">=4.0.0" -types-python-dateutil = ">=2.8.19.14" -mypy = "1.4.1" - - -[build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" - -[tool.pylint.'MESSAGES CONTROL'] -extension-pkg-whitelist = "pydantic" - -[tool.mypy] -files = [ - "jaqpotpy.api.openapi", - #"test", # auto-generated tests - "tests", # hand-written tests -] -# TODO: enable "strict" once all these individual checks are passing -# strict = true - -# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options -warn_unused_configs = true -warn_redundant_casts = true -warn_unused_ignores = true - -## Getting these passing should be easy -strict_equality = true -strict_concatenate = true - -## Strongly recommend enabling this one as soon as you can -check_untyped_defs = true - -## These shouldn't be too much additional work, but may be tricky to -## get passing if you use a lot of untyped libraries -disallow_subclassing_any = true -disallow_untyped_decorators = true -disallow_any_generics = true - -### These next few are various gradations of forcing use of type annotations -#disallow_untyped_calls = true -#disallow_incomplete_defs = true -#disallow_untyped_defs = true -# -### This one isn't too hard to get passing, but return on investment is lower -#no_implicit_reexport = true -# -### This one can be tricky to get passing if you use a lot of untyped libraries -#warn_return_any = true diff --git a/jaqpotpy/api/openapi/requirements.txt b/jaqpotpy/api/openapi/requirements.txt deleted file mode 100644 index cc85509e..00000000 --- a/jaqpotpy/api/openapi/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -python_dateutil >= 2.5.3 -setuptools >= 21.0.0 -urllib3 >= 1.25.3, < 2.1.0 -pydantic >= 2 -typing-extensions >= 4.7.1 diff --git a/jaqpotpy/api/openapi/rest.py b/jaqpotpy/api/openapi/rest.py index d4709a6c..aa992fc4 100644 --- a/jaqpotpy/api/openapi/rest.py +++ b/jaqpotpy/api/openapi/rest.py @@ -1,18 +1,17 @@ # coding: utf-8 """ - Jaqpot API +Jaqpot API - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. +A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - The version of the OpenAPI document: 1.0.0 - Contact: upci.ntua@gmail.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0.0 +Contact: upci.ntua@gmail.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - import io import json import re @@ -37,7 +36,6 @@ def is_socks_proxy_url(url): class RESTResponse(io.IOBase): - def __init__(self, resp) -> None: self.response = resp self.status = resp.status @@ -59,7 +57,6 @@ def getheader(self, name, default=None): class RESTClientObject: - def __init__(self, configuration) -> None: # urllib3.PoolManager will pass all kw parameters to connectionpool # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 @@ -79,22 +76,19 @@ def __init__(self, configuration) -> None: "key_file": configuration.key_file, } if configuration.assert_hostname is not None: - pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) + pool_args["assert_hostname"] = configuration.assert_hostname if configuration.retries is not None: - pool_args['retries'] = configuration.retries + pool_args["retries"] = configuration.retries if configuration.tls_server_name: - pool_args['server_hostname'] = configuration.tls_server_name - + pool_args["server_hostname"] = configuration.tls_server_name if configuration.socket_options is not None: - pool_args['socket_options'] = configuration.socket_options + pool_args["socket_options"] = configuration.socket_options if configuration.connection_pool_maxsize is not None: - pool_args['maxsize'] = configuration.connection_pool_maxsize + pool_args["maxsize"] = configuration.connection_pool_maxsize # https pool manager self.pool_manager: urllib3.PoolManager @@ -102,6 +96,7 @@ def __init__(self, configuration) -> None: if configuration.proxy: if is_socks_proxy_url(configuration.proxy): from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy pool_args["headers"] = configuration.proxy_headers self.pool_manager = SOCKSProxyManager(**pool_args) @@ -119,7 +114,7 @@ def request( headers=None, body=None, post_params=None, - _request_timeout=None + _request_timeout=None, ): """Perform requests. @@ -136,15 +131,7 @@ def request( (connection, read) timeouts. """ method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] + assert method in ["GET", "HEAD", "DELETE", "POST", "PUT", "PATCH", "OPTIONS"] if post_params and body: raise ApiValueError( @@ -158,25 +145,17 @@ def request( if _request_timeout: if isinstance(_request_timeout, (int, float)): timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): + elif isinstance(_request_timeout, tuple) and len(_request_timeout) == 2: timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] + connect=_request_timeout[0], read=_request_timeout[1] ) try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - + if method in ["POST", "PUT", "PATCH", "OPTIONS", "DELETE"]: # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): + content_type = headers.get("Content-Type") + if not content_type or re.search("json", content_type, re.IGNORECASE): request_body = None if body is not None: request_body = json.dumps(body) @@ -186,9 +165,9 @@ def request( body=request_body, timeout=timeout, headers=headers, - preload_content=False + preload_content=False, ) - elif content_type == 'application/x-www-form-urlencoded': + elif content_type == "application/x-www-form-urlencoded": r = self.pool_manager.request( method, url, @@ -196,15 +175,18 @@ def request( encode_multipart=False, timeout=timeout, headers=headers, - preload_content=False + preload_content=False, ) - elif content_type == 'multipart/form-data': + elif content_type == "multipart/form-data": # must del headers['Content-Type'], or the correct # Content-Type which generated by urllib3 will be # overwritten. - del headers['Content-Type'] + del headers["Content-Type"] # Ensures that dict objects are serialized - post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + post_params = [ + (a, json.dumps(b)) if isinstance(b, dict) else (a, b) + for a, b in post_params + ] r = self.pool_manager.request( method, url, @@ -212,7 +194,7 @@ def request( encode_multipart=True, timeout=timeout, headers=headers, - preload_content=False + preload_content=False, ) # Pass a `string` parameter directly in the body to support # other content types than JSON when `body` argument is @@ -224,9 +206,9 @@ def request( body=body, timeout=timeout, headers=headers, - preload_content=False + preload_content=False, ) - elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + elif headers["Content-Type"] == "text/plain" and isinstance(body, bool): request_body = "true" if body else "false" r = self.pool_manager.request( method, @@ -234,7 +216,8 @@ def request( body=request_body, preload_content=False, timeout=timeout, - headers=headers) + headers=headers, + ) else: # Cannot generate the request from given parameters msg = """Cannot prepare a request message for provided @@ -249,7 +232,7 @@ def request( fields={}, timeout=timeout, headers=headers, - preload_content=False + preload_content=False, ) except urllib3.exceptions.SSLError as e: msg = "\n".join([type(e).__name__, str(e)]) diff --git a/jaqpotpy/api/openapi/setup.cfg b/jaqpotpy/api/openapi/setup.cfg deleted file mode 100644 index 11433ee8..00000000 --- a/jaqpotpy/api/openapi/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -max-line-length=99 diff --git a/jaqpotpy/api/openapi/setup.py b/jaqpotpy/api/openapi/setup.py deleted file mode 100644 index 8dedade6..00000000 --- a/jaqpotpy/api/openapi/setup.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from setuptools import setup, find_packages # noqa: H301 - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools -NAME = "jaqpotpy.api.openapi" -VERSION = "1.0.0" -PYTHON_REQUIRES = ">=3.7" -REQUIRES = [ - "urllib3 >= 1.25.3, < 2.1.0", - "python-dateutil", - "pydantic >= 2", - "typing-extensions >= 4.7.1", -] - -setup( - name=NAME, - version=VERSION, - description="Jaqpot API", - author="Jaqpot", - author_email="upci.ntua@gmail.com", - url="", - keywords=["OpenAPI", "OpenAPI-Generator", "Jaqpot API"], - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - license="Apache 2.0", - long_description_content_type="text/markdown", - long_description="""\ - A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - """, # noqa: E501 - package_data={"jaqpotpy.api.openapi": ["py.typed"]}, -) diff --git a/jaqpotpy/api/openapi/test-requirements.txt b/jaqpotpy/api/openapi/test-requirements.txt deleted file mode 100644 index 8e6d8cb1..00000000 --- a/jaqpotpy/api/openapi/test-requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -pytest~=7.1.3 -pytest-cov>=2.8.1 -pytest-randomly>=3.12.0 -mypy>=1.4.1 -types-python-dateutil>=2.8.19 diff --git a/jaqpotpy/api/openapi/test/test_auth_api.py b/jaqpotpy/api/openapi/test/test_auth_api.py deleted file mode 100644 index 0646ab1d..00000000 --- a/jaqpotpy/api/openapi/test/test_auth_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.api.auth_api import AuthApi - - -class TestAuthApi(unittest.TestCase): - """AuthApi unit test stubs""" - - def setUp(self) -> None: - self.api = AuthApi() - - def tearDown(self) -> None: - pass - - def test_validate_jwt(self) -> None: - """Test case for validate_jwt - - Validate JWT - """ - pass - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_create_invitations_request.py b/jaqpotpy/api/openapi/test/test_create_invitations_request.py deleted file mode 100644 index 75701317..00000000 --- a/jaqpotpy/api/openapi/test/test_create_invitations_request.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.models.create_invitations_request import ( - CreateInvitationsRequest, -) - - -class TestCreateInvitationsRequest(unittest.TestCase): - """CreateInvitationsRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateInvitationsRequest: - """Test CreateInvitationsRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `CreateInvitationsRequest` - """ - model = CreateInvitationsRequest() - if include_optional: - return CreateInvitationsRequest( - emails = ["user1@example.com","user2@example.com"] - ) - else: - return CreateInvitationsRequest( - ) - """ - - def testCreateInvitationsRequest(self): - """Test CreateInvitationsRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_dataset.py b/jaqpotpy/api/openapi/test/test_dataset.py deleted file mode 100644 index 28eb69e3..00000000 --- a/jaqpotpy/api/openapi/test/test_dataset.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.models.dataset import Dataset - - -class TestDataset(unittest.TestCase): - """Dataset unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Dataset: - """Test Dataset - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `Dataset` - """ - model = Dataset() - if include_optional: - return Dataset( - id = 1, - type = 'PREDICTION', - entry_type = 'ARRAY', - input = [ - null - ], - result = [ - null - ], - status = 'CREATED', - failure_reason = '', - user_id = '', - model_id = 56, - model_name = '', - executed_at = '', - execution_finished_at = '', - created_at = '', - updated_at = '' - ) - else: - return Dataset( - type = 'PREDICTION', - entry_type = 'ARRAY', - input = [ - null - ], - ) - """ - - def testDataset(self): - """Test Dataset""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_dataset_api.py b/jaqpotpy/api/openapi/test/test_dataset_api.py deleted file mode 100644 index 2364a1ec..00000000 --- a/jaqpotpy/api/openapi/test/test_dataset_api.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.api.dataset_api import DatasetApi - - -class TestDatasetApi(unittest.TestCase): - """DatasetApi unit test stubs""" - - def setUp(self) -> None: - self.api = DatasetApi() - - def tearDown(self) -> None: - pass - - def test_get_dataset_by_id(self) -> None: - """Test case for get_dataset_by_id - - Get a Dataset - """ - pass - - def test_get_datasets(self) -> None: - """Test case for get_datasets - - Get Datasets by User ID - """ - pass - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_dataset_csv.py b/jaqpotpy/api/openapi/test/test_dataset_csv.py deleted file mode 100644 index 20793883..00000000 --- a/jaqpotpy/api/openapi/test/test_dataset_csv.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.models.dataset_csv import DatasetCSV - - -class TestDatasetCSV(unittest.TestCase): - """DatasetCSV unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DatasetCSV: - """Test DatasetCSV - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `DatasetCSV` - """ - model = DatasetCSV() - if include_optional: - return DatasetCSV( - id = 1, - type = 'PREDICTION', - input_file = 'YQ==', - values = [ - null - ], - status = 'CREATED', - failure_reason = '', - model_id = 56, - model_name = '', - executed_at = '', - execution_finished_at = '', - created_at = '', - updated_at = '' - ) - else: - return DatasetCSV( - type = 'PREDICTION', - input_file = 'YQ==', - ) - """ - - def testDatasetCSV(self): - """Test DatasetCSV""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_dataset_type.py b/jaqpotpy/api/openapi/test/test_dataset_type.py deleted file mode 100644 index 97689027..00000000 --- a/jaqpotpy/api/openapi/test/test_dataset_type.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.models.dataset_type import DatasetType - - -class TestDatasetType(unittest.TestCase): - """DatasetType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testDatasetType(self): - """Test DatasetType""" - # inst = DatasetType() - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_error_code.py b/jaqpotpy/api/openapi/test/test_error_code.py deleted file mode 100644 index e97e0928..00000000 --- a/jaqpotpy/api/openapi/test/test_error_code.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.models.error_code import ErrorCode - - -class TestErrorCode(unittest.TestCase): - """ErrorCode unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testErrorCode(self): - """Test ErrorCode""" - # inst = ErrorCode() - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_error_response.py b/jaqpotpy/api/openapi/test/test_error_response.py deleted file mode 100644 index b11821fa..00000000 --- a/jaqpotpy/api/openapi/test/test_error_response.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.models.error_response import ErrorResponse - - -class TestErrorResponse(unittest.TestCase): - """ErrorResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ErrorResponse: - """Test ErrorResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `ErrorResponse` - """ - model = ErrorResponse() - if include_optional: - return ErrorResponse( - message = '', - code = 56 - ) - else: - return ErrorResponse( - ) - """ - - def testErrorResponse(self): - """Test ErrorResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_feature.py b/jaqpotpy/api/openapi/test/test_feature.py deleted file mode 100644 index 012de924..00000000 --- a/jaqpotpy/api/openapi/test/test_feature.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.models.feature import Feature - - -class TestFeature(unittest.TestCase): - """Feature unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Feature: - """Test Feature - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `Feature` - """ - model = Feature() - if include_optional: - return Feature( - id = 1, - meta = { - 'key' : None - }, - key = 'feature-key', - name = 'A feature name', - units = 'A feature unit', - description = '', - feature_type = 'FLOAT', - feature_dependency = 'DEPENDENT', - visible = True, - possible_values = [ - jaqpotpy.api.openapi.models.feature_possible_value.FeaturePossibleValue( - key = 'value', - value = 'value', ) - ], - created_at = '2023-01-01T12:00Z', - updated_at = '2023-01-01T12:00:00Z' - ) - else: - return Feature( - key = 'feature-key', - name = 'A feature name', - feature_type = 'FLOAT', - ) - """ - - def testFeature(self): - """Test Feature""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_feature_api.py b/jaqpotpy/api/openapi/test/test_feature_api.py deleted file mode 100644 index ad8d3b98..00000000 --- a/jaqpotpy/api/openapi/test/test_feature_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.api.feature_api import FeatureApi - - -class TestFeatureApi(unittest.TestCase): - """FeatureApi unit test stubs""" - - def setUp(self) -> None: - self.api = FeatureApi() - - def tearDown(self) -> None: - pass - - def test_partially_update_model_feature(self) -> None: - """Test case for partially_update_model_feature - - Update a feature for a specific model - """ - pass - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_feature_possible_value.py b/jaqpotpy/api/openapi/test/test_feature_possible_value.py deleted file mode 100644 index 901201c5..00000000 --- a/jaqpotpy/api/openapi/test/test_feature_possible_value.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.models.feature_possible_value import FeaturePossibleValue - - -class TestFeaturePossibleValue(unittest.TestCase): - """FeaturePossibleValue unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> FeaturePossibleValue: - """Test FeaturePossibleValue - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `FeaturePossibleValue` - """ - model = FeaturePossibleValue() - if include_optional: - return FeaturePossibleValue( - key = 'value', - value = 'value' - ) - else: - return FeaturePossibleValue( - key = 'value', - value = 'value', - ) - """ - - def testFeaturePossibleValue(self): - """Test FeaturePossibleValue""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_feature_type.py b/jaqpotpy/api/openapi/test/test_feature_type.py deleted file mode 100644 index 6e11854c..00000000 --- a/jaqpotpy/api/openapi/test/test_feature_type.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.models.feature_type import FeatureType - - -class TestFeatureType(unittest.TestCase): - """FeatureType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testFeatureType(self): - """Test FeatureType""" - # inst = FeatureType() - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_get_datasets200_response.py b/jaqpotpy/api/openapi/test/test_get_datasets200_response.py deleted file mode 100644 index 266cf135..00000000 --- a/jaqpotpy/api/openapi/test/test_get_datasets200_response.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.models.get_datasets200_response import GetDatasets200Response - - -class TestGetDatasets200Response(unittest.TestCase): - """GetDatasets200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetDatasets200Response: - """Test GetDatasets200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `GetDatasets200Response` - """ - model = GetDatasets200Response() - if include_optional: - return GetDatasets200Response( - content = [ - jaqpotpy.api.openapi.models.dataset.Dataset( - id = 1, - type = 'PREDICTION', - entry_type = 'ARRAY', - input = [ - null - ], - result = [ - null - ], - status = 'CREATED', - failure_reason = '', - user_id = '', - model_id = 56, - model_name = '', - executed_at = '', - execution_finished_at = '', - created_at = '', - updated_at = '', ) - ], - total_elements = 56, - total_pages = 56, - page_size = 56, - page_number = 56 - ) - else: - return GetDatasets200Response( - ) - """ - - def testGetDatasets200Response(self): - """Test GetDatasets200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_get_models200_response.py b/jaqpotpy/api/openapi/test/test_get_models200_response.py deleted file mode 100644 index 46212b30..00000000 --- a/jaqpotpy/api/openapi/test/test_get_models200_response.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.models.get_models200_response import GetModels200Response - - -class TestGetModels200Response(unittest.TestCase): - """GetModels200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetModels200Response: - """Test GetModels200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `GetModels200Response` - """ - model = GetModels200Response() - if include_optional: - return GetModels200Response( - content = [ - jaqpotpy.api.openapi.models.model_summary.ModelSummary( - id = 0, - name = 'My Model', - visibility = 'PUBLIC', - description = 'A description of your model', - creator = jaqpotpy.api.openapi.models.user.User( - id = '', - username = '', - first_name = '', - last_name = '', - email = '', - email_verified = True, ), - type = 'SKLEARN', - dependent_features_length = 56, - independent_features_length = 56, - shared_with_organizations = [ - jaqpotpy.api.openapi.models.organization_summary.OrganizationSummary( - id = 0, - name = 'My Organization', ) - ], - created_at = '2023-01-01T12:00Z', - updated_at = '2023-01-01T12:00:00Z', ) - ], - total_elements = 56, - total_pages = 56, - page_size = 56, - page_number = 56 - ) - else: - return GetModels200Response( - ) - """ - - def testGetModels200Response(self): - """Test GetModels200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_lead.py b/jaqpotpy/api/openapi/test/test_lead.py deleted file mode 100644 index 174bad35..00000000 --- a/jaqpotpy/api/openapi/test/test_lead.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.models.lead import Lead - - -class TestLead(unittest.TestCase): - """Lead unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Lead: - """Test Lead - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `Lead` - """ - model = Lead() - if include_optional: - return Lead( - id = 56, - email = '', - name = '', - status = 'PENDING' - ) - else: - return Lead( - ) - """ - - def testLead(self): - """Test Lead""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_lead_api.py b/jaqpotpy/api/openapi/test/test_lead_api.py deleted file mode 100644 index 80ba0516..00000000 --- a/jaqpotpy/api/openapi/test/test_lead_api.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.api.lead_api import LeadApi - - -class TestLeadApi(unittest.TestCase): - """LeadApi unit test stubs""" - - def setUp(self) -> None: - self.api = LeadApi() - - def tearDown(self) -> None: - pass - - def test_create_lead(self) -> None: - """Test case for create_lead - - Create a Lead - """ - pass - - def test_delete_lead_by_id(self) -> None: - """Test case for delete_lead_by_id - - Delete a Lead by ID - """ - pass - - def test_get_all_leads(self) -> None: - """Test case for get_all_leads - - Get All Leads - """ - pass - - def test_get_lead_by_id(self) -> None: - """Test case for get_lead_by_id - - Get a Lead by ID - """ - pass - - def test_update_lead_by_id(self) -> None: - """Test case for update_lead_by_id - - Update a Lead by ID - """ - pass - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_library.py b/jaqpotpy/api/openapi/test/test_library.py deleted file mode 100644 index d1fa4b21..00000000 --- a/jaqpotpy/api/openapi/test/test_library.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.models.library import Library - - -class TestLibrary(unittest.TestCase): - """Library unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Library: - """Test Library - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `Library` - """ - model = Library() - if include_optional: - return Library( - id = 56, - name = 'Library Name', - version = '1.24.0', - created_at = '2023-01-01T12:00Z', - updated_at = '2023-01-01T12:00:00Z' - ) - else: - return Library( - name = 'Library Name', - version = '1.24.0', - ) - """ - - def testLibrary(self): - """Test Library""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_model.py b/jaqpotpy/api/openapi/test/test_model.py deleted file mode 100644 index 84ed003f..00000000 --- a/jaqpotpy/api/openapi/test/test_model.py +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.models.model import Model - - -class TestModel(unittest.TestCase): - """Model unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Model: - """Test Model - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `Model` - """ - model = Model() - if include_optional: - return Model( - id = 0, - meta = { - 'key' : None - }, - name = 'My Model', - description = 'A description of your model', - type = 'SKLEARN', - jaqpotpy_version = '1.0.0', - libraries = [ - jaqpotpy.api.openapi.models.library.Library( - id = 56, - name = 'Library Name', - version = '1.24.0', - created_at = '2023-01-01T12:00Z', - updated_at = '2023-01-01T12:00:00Z', ) - ], - dependent_features = [ - jaqpotpy.api.openapi.models.feature.Feature( - id = 1, - meta = { - 'key' : None - }, - key = 'feature-key', - name = 'A feature name', - units = 'A feature unit', - description = '', - feature_type = 'FLOAT', - feature_dependency = 'DEPENDENT', - visible = True, - possible_values = [ - jaqpotpy.api.openapi.models.feature_possible_value.FeaturePossibleValue( - key = 'value', - value = 'value', ) - ], - created_at = '2023-01-01T12:00Z', - updated_at = '2023-01-01T12:00:00Z', ) - ], - independent_features = [ - jaqpotpy.api.openapi.models.feature.Feature( - id = 1, - meta = { - 'key' : None - }, - key = 'feature-key', - name = 'A feature name', - units = 'A feature unit', - description = '', - feature_type = 'FLOAT', - feature_dependency = 'DEPENDENT', - visible = True, - possible_values = [ - jaqpotpy.api.openapi.models.feature_possible_value.FeaturePossibleValue( - key = 'value', - value = 'value', ) - ], - created_at = '2023-01-01T12:00Z', - updated_at = '2023-01-01T12:00:00Z', ) - ], - shared_with_organizations = [ - jaqpotpy.api.openapi.models.organization.Organization( - id = 56, - name = 'my-awesome-org', - creator = jaqpotpy.api.openapi.models.user.User( - id = '', - username = '', - first_name = '', - last_name = '', - email = '', - email_verified = True, ), - visibility = 'PUBLIC', - description = 'An awesome organization for managing models.', - organization_members = [ - jaqpotpy.api.openapi.models.organization_user.OrganizationUser( - id = 56, - user_id = '', - username = '', - email = '', - association_type = 'ADMIN', ) - ], - contact_email = 'contact@my-awesome-org.com', - contact_phone = '+1234567890', - website = 'http://www.my-awesome-org.com', - address = '123 Organization St., City, Country', - can_edit = True, - is_member = True, - created_at = '', - updated_at = '', ) - ], - visibility = 'PUBLIC', - task = 'REGRESSION', - raw_model = 'YQ==', - creator = jaqpotpy.api.openapi.models.user.User( - id = '', - username = '', - first_name = '', - last_name = '', - email = '', - email_verified = True, ), - can_edit = True, - is_admin = True, - tags = '', - legacy_prediction_service = '', - extra_config = jaqpotpy.api.openapi.models.model_extra_config.ModelExtraConfig( - torch_config = { - 'key' : None - }, - preprocessors = [ - jaqpotpy.api.openapi.models.transformer.Transformer( - name = 'StandardScaler', - config = { - 'key' : None - }, ) - ], - featurizers = [ - jaqpotpy.api.openapi.models.transformer.Transformer( - name = 'StandardScaler', - config = { - 'key' : None - }, ) - ], - doa = [ - - ], ), - created_at = '2023-01-01T12:00Z', - updated_at = '2023-01-01T12:00:00Z' - ) - else: - return Model( - name = 'My Model', - type = 'SKLEARN', - jaqpotpy_version = '1.0.0', - libraries = [ - jaqpotpy.api.openapi.models.library.Library( - id = 56, - name = 'Library Name', - version = '1.24.0', - created_at = '2023-01-01T12:00Z', - updated_at = '2023-01-01T12:00:00Z', ) - ], - dependent_features = [ - jaqpotpy.api.openapi.models.feature.Feature( - id = 1, - meta = { - 'key' : None - }, - key = 'feature-key', - name = 'A feature name', - units = 'A feature unit', - description = '', - feature_type = 'FLOAT', - feature_dependency = 'DEPENDENT', - visible = True, - possible_values = [ - jaqpotpy.api.openapi.models.feature_possible_value.FeaturePossibleValue( - key = 'value', - value = 'value', ) - ], - created_at = '2023-01-01T12:00Z', - updated_at = '2023-01-01T12:00:00Z', ) - ], - independent_features = [ - jaqpotpy.api.openapi.models.feature.Feature( - id = 1, - meta = { - 'key' : None - }, - key = 'feature-key', - name = 'A feature name', - units = 'A feature unit', - description = '', - feature_type = 'FLOAT', - feature_dependency = 'DEPENDENT', - visible = True, - possible_values = [ - jaqpotpy.api.openapi.models.feature_possible_value.FeaturePossibleValue( - key = 'value', - value = 'value', ) - ], - created_at = '2023-01-01T12:00Z', - updated_at = '2023-01-01T12:00:00Z', ) - ], - visibility = 'PUBLIC', - task = 'REGRESSION', - raw_model = 'YQ==', - ) - """ - - def testModel(self): - """Test Model""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_model_api.py b/jaqpotpy/api/openapi/test/test_model_api.py deleted file mode 100644 index d68ec977..00000000 --- a/jaqpotpy/api/openapi/test/test_model_api.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.api.model_api import ModelApi - - -class TestModelApi(unittest.TestCase): - """ModelApi unit test stubs""" - - def setUp(self) -> None: - self.api = ModelApi() - - def tearDown(self) -> None: - pass - - def test_create_model(self) -> None: - """Test case for create_model - - Create a new model - """ - pass - - def test_delete_model_by_id(self) -> None: - """Test case for delete_model_by_id - - Delete a Model - """ - pass - - def test_get_legacy_model_by_id(self) -> None: - """Test case for get_legacy_model_by_id - - Get a legacy model - """ - pass - - def test_get_model_by_id(self) -> None: - """Test case for get_model_by_id - - Get a Model - """ - pass - - def test_get_models(self) -> None: - """Test case for get_models - - Get paginated models - """ - pass - - def test_get_shared_models(self) -> None: - """Test case for get_shared_models - - Get paginated shared models - """ - pass - - def test_partially_update_model(self) -> None: - """Test case for partially_update_model - - Partially update specific fields of a model - """ - pass - - def test_predict_with_model(self) -> None: - """Test case for predict_with_model - - Predict with Model - """ - pass - - def test_predict_with_model_csv(self) -> None: - """Test case for predict_with_model_csv - - Predict using CSV with Model - """ - pass - - def test_search_models(self) -> None: - """Test case for search_models - - Search for models - """ - pass - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_model_extra_config.py b/jaqpotpy/api/openapi/test/test_model_extra_config.py deleted file mode 100644 index 888efe6f..00000000 --- a/jaqpotpy/api/openapi/test/test_model_extra_config.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.models.model_extra_config import ModelExtraConfig - - -class TestModelExtraConfig(unittest.TestCase): - """ModelExtraConfig unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ModelExtraConfig: - """Test ModelExtraConfig - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `ModelExtraConfig` - """ - model = ModelExtraConfig() - if include_optional: - return ModelExtraConfig( - torch_config = { - 'key' : None - }, - preprocessors = [ - jaqpotpy.api.openapi.models.transformer.Transformer( - name = 'StandardScaler', - config = { - 'key' : None - }, ) - ], - featurizers = [ - jaqpotpy.api.openapi.models.transformer.Transformer( - name = 'StandardScaler', - config = { - 'key' : None - }, ) - ], - doa = [ - jaqpotpy.api.openapi.models.transformer.Transformer( - name = 'StandardScaler', - config = { - 'key' : None - }, ) - ] - ) - else: - return ModelExtraConfig( - ) - """ - - def testModelExtraConfig(self): - """Test ModelExtraConfig""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_model_summary.py b/jaqpotpy/api/openapi/test/test_model_summary.py deleted file mode 100644 index 792e603e..00000000 --- a/jaqpotpy/api/openapi/test/test_model_summary.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.models.model_summary import ModelSummary - - -class TestModelSummary(unittest.TestCase): - """ModelSummary unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ModelSummary: - """Test ModelSummary - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `ModelSummary` - """ - model = ModelSummary() - if include_optional: - return ModelSummary( - id = 0, - name = 'My Model', - visibility = 'PUBLIC', - description = 'A description of your model', - creator = jaqpotpy.api.openapi.models.user.User( - id = '', - username = '', - first_name = '', - last_name = '', - email = '', - email_verified = True, ), - type = 'SKLEARN', - dependent_features_length = 56, - independent_features_length = 56, - shared_with_organizations = [ - jaqpotpy.api.openapi.models.organization_summary.OrganizationSummary( - id = 0, - name = 'My Organization', ) - ], - created_at = '2023-01-01T12:00Z', - updated_at = '2023-01-01T12:00:00Z' - ) - else: - return ModelSummary( - id = 0, - name = 'My Model', - visibility = 'PUBLIC', - type = 'SKLEARN', - shared_with_organizations = [ - jaqpotpy.api.openapi.models.organization_summary.OrganizationSummary( - id = 0, - name = 'My Organization', ) - ], - created_at = '2023-01-01T12:00Z', - ) - """ - - def testModelSummary(self): - """Test ModelSummary""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_model_task.py b/jaqpotpy/api/openapi/test/test_model_task.py deleted file mode 100644 index fd2aadba..00000000 --- a/jaqpotpy/api/openapi/test/test_model_task.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.models.model_task import ModelTask - - -class TestModelTask(unittest.TestCase): - """ModelTask unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testModelTask(self): - """Test ModelTask""" - # inst = ModelTask() - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_model_type.py b/jaqpotpy/api/openapi/test/test_model_type.py deleted file mode 100644 index 3e03b5a5..00000000 --- a/jaqpotpy/api/openapi/test/test_model_type.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.models.model_type import ModelType - - -class TestModelType(unittest.TestCase): - """ModelType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testModelType(self): - """Test ModelType""" - # inst = ModelType() - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_model_visibility.py b/jaqpotpy/api/openapi/test/test_model_visibility.py deleted file mode 100644 index 7ffbee97..00000000 --- a/jaqpotpy/api/openapi/test/test_model_visibility.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.models.model_visibility import ModelVisibility - - -class TestModelVisibility(unittest.TestCase): - """ModelVisibility unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testModelVisibility(self): - """Test ModelVisibility""" - # inst = ModelVisibility() - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_organization.py b/jaqpotpy/api/openapi/test/test_organization.py deleted file mode 100644 index 7bb7b94b..00000000 --- a/jaqpotpy/api/openapi/test/test_organization.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.models.organization import Organization - - -class TestOrganization(unittest.TestCase): - """Organization unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Organization: - """Test Organization - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `Organization` - """ - model = Organization() - if include_optional: - return Organization( - id = 56, - name = 'my-awesome-org', - creator = jaqpotpy.api.openapi.models.user.User( - id = '', - username = '', - first_name = '', - last_name = '', - email = '', - email_verified = True, ), - visibility = 'PUBLIC', - description = 'An awesome organization for managing models.', - organization_members = [ - jaqpotpy.api.openapi.models.organization_user.OrganizationUser( - id = 56, - user_id = '', - username = '', - email = '', - association_type = 'ADMIN', ) - ], - contact_email = 'contact@my-awesome-org.com', - contact_phone = '+1234567890', - website = 'http://www.my-awesome-org.com', - address = '123 Organization St., City, Country', - can_edit = True, - is_member = True, - created_at = '', - updated_at = '' - ) - else: - return Organization( - name = 'my-awesome-org', - visibility = 'PUBLIC', - contact_email = 'contact@my-awesome-org.com', - ) - """ - - def testOrganization(self): - """Test Organization""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_organization_api.py b/jaqpotpy/api/openapi/test/test_organization_api.py deleted file mode 100644 index 00ccac0e..00000000 --- a/jaqpotpy/api/openapi/test/test_organization_api.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.api.organization_api import OrganizationApi - - -class TestOrganizationApi(unittest.TestCase): - """OrganizationApi unit test stubs""" - - def setUp(self) -> None: - self.api = OrganizationApi() - - def tearDown(self) -> None: - pass - - def test_create_organization(self) -> None: - """Test case for create_organization - - Create a new organization - """ - pass - - def test_get_all_organizations_by_user(self) -> None: - """Test case for get_all_organizations_by_user - - Get all user organizations - """ - pass - - def test_get_all_organizations_for_user(self) -> None: - """Test case for get_all_organizations_for_user - - Get all organizations for a specific user - """ - pass - - def test_get_organization_by_name(self) -> None: - """Test case for get_organization_by_name - - Get organization by name - """ - pass - - def test_partial_update_organization(self) -> None: - """Test case for partial_update_organization - - Partially update an existing organization - """ - pass - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_organization_invitation.py b/jaqpotpy/api/openapi/test/test_organization_invitation.py deleted file mode 100644 index 25e0dcab..00000000 --- a/jaqpotpy/api/openapi/test/test_organization_invitation.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.models.organization_invitation import OrganizationInvitation - - -class TestOrganizationInvitation(unittest.TestCase): - """OrganizationInvitation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OrganizationInvitation: - """Test OrganizationInvitation - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `OrganizationInvitation` - """ - model = OrganizationInvitation() - if include_optional: - return OrganizationInvitation( - id = '', - user_id = '', - user_email = '', - status = 'PENDING', - expiration_date = '' - ) - else: - return OrganizationInvitation( - user_email = '', - status = 'PENDING', - expiration_date = '', - ) - """ - - def testOrganizationInvitation(self): - """Test OrganizationInvitation""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_organization_invitation_api.py b/jaqpotpy/api/openapi/test/test_organization_invitation_api.py deleted file mode 100644 index b28b59cd..00000000 --- a/jaqpotpy/api/openapi/test/test_organization_invitation_api.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.api.organization_invitation_api import ( - OrganizationInvitationApi, -) - - -class TestOrganizationInvitationApi(unittest.TestCase): - """OrganizationInvitationApi unit test stubs""" - - def setUp(self) -> None: - self.api = OrganizationInvitationApi() - - def tearDown(self) -> None: - pass - - def test_create_invitations(self) -> None: - """Test case for create_invitations - - Create new invitations for an organization - """ - pass - - def test_get_all_invitations(self) -> None: - """Test case for get_all_invitations - - Get all invitations for an organization - """ - pass - - def test_get_invitation(self) -> None: - """Test case for get_invitation - - Get the status of an invitation - """ - pass - - def test_resend_invitation(self) -> None: - """Test case for resend_invitation - - Resend an invitation email - """ - pass - - def test_update_invitation(self) -> None: - """Test case for update_invitation - - Update the status of an invitation - """ - pass - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_organization_summary.py b/jaqpotpy/api/openapi/test/test_organization_summary.py deleted file mode 100644 index f9900317..00000000 --- a/jaqpotpy/api/openapi/test/test_organization_summary.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.models.organization_summary import OrganizationSummary - - -class TestOrganizationSummary(unittest.TestCase): - """OrganizationSummary unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OrganizationSummary: - """Test OrganizationSummary - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `OrganizationSummary` - """ - model = OrganizationSummary() - if include_optional: - return OrganizationSummary( - id = 0, - name = 'My Organization' - ) - else: - return OrganizationSummary( - id = 0, - name = 'My Organization', - ) - """ - - def testOrganizationSummary(self): - """Test OrganizationSummary""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_organization_user.py b/jaqpotpy/api/openapi/test/test_organization_user.py deleted file mode 100644 index b37d6ed1..00000000 --- a/jaqpotpy/api/openapi/test/test_organization_user.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.models.organization_user import OrganizationUser - - -class TestOrganizationUser(unittest.TestCase): - """OrganizationUser unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OrganizationUser: - """Test OrganizationUser - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `OrganizationUser` - """ - model = OrganizationUser() - if include_optional: - return OrganizationUser( - id = 56, - user_id = '', - username = '', - email = '', - association_type = 'ADMIN' - ) - else: - return OrganizationUser( - user_id = '', - username = '', - email = '', - association_type = 'ADMIN', - ) - """ - - def testOrganizationUser(self): - """Test OrganizationUser""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_organization_user_association_type.py b/jaqpotpy/api/openapi/test/test_organization_user_association_type.py deleted file mode 100644 index 68854855..00000000 --- a/jaqpotpy/api/openapi/test/test_organization_user_association_type.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.models.organization_user_association_type import ( - OrganizationUserAssociationType, -) - - -class TestOrganizationUserAssociationType(unittest.TestCase): - """OrganizationUserAssociationType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOrganizationUserAssociationType(self): - """Test OrganizationUserAssociationType""" - # inst = OrganizationUserAssociationType() - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_organization_visibility.py b/jaqpotpy/api/openapi/test/test_organization_visibility.py deleted file mode 100644 index 0bb5ffbb..00000000 --- a/jaqpotpy/api/openapi/test/test_organization_visibility.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.models.organization_visibility import OrganizationVisibility - - -class TestOrganizationVisibility(unittest.TestCase): - """OrganizationVisibility unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOrganizationVisibility(self): - """Test OrganizationVisibility""" - # inst = OrganizationVisibility() - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_partial_update_organization_request.py b/jaqpotpy/api/openapi/test/test_partial_update_organization_request.py deleted file mode 100644 index ebaa1cdd..00000000 --- a/jaqpotpy/api/openapi/test/test_partial_update_organization_request.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.models.partial_update_organization_request import ( - PartialUpdateOrganizationRequest, -) - - -class TestPartialUpdateOrganizationRequest(unittest.TestCase): - """PartialUpdateOrganizationRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PartialUpdateOrganizationRequest: - """Test PartialUpdateOrganizationRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `PartialUpdateOrganizationRequest` - """ - model = PartialUpdateOrganizationRequest() - if include_optional: - return PartialUpdateOrganizationRequest( - name = '', - description = '', - contact_email = '', - visibility = 'PUBLIC' - ) - else: - return PartialUpdateOrganizationRequest( - name = '', - contact_email = '', - visibility = 'PUBLIC', - ) - """ - - def testPartialUpdateOrganizationRequest(self): - """Test PartialUpdateOrganizationRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_partially_update_model_feature_request.py b/jaqpotpy/api/openapi/test/test_partially_update_model_feature_request.py deleted file mode 100644 index 18a7b85d..00000000 --- a/jaqpotpy/api/openapi/test/test_partially_update_model_feature_request.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.models.partially_update_model_feature_request import ( - PartiallyUpdateModelFeatureRequest, -) - - -class TestPartiallyUpdateModelFeatureRequest(unittest.TestCase): - """PartiallyUpdateModelFeatureRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PartiallyUpdateModelFeatureRequest: - """Test PartiallyUpdateModelFeatureRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `PartiallyUpdateModelFeatureRequest` - """ - model = PartiallyUpdateModelFeatureRequest() - if include_optional: - return PartiallyUpdateModelFeatureRequest( - name = 'Updated Feature Name', - units = 'mg/L', - description = 'An updated description for this feature', - feature_type = 'FLOAT', - possible_values = [ - jaqpotpy.api.openapi.models.feature_possible_value.FeaturePossibleValue( - key = 'value', - value = 'value', ) - ] - ) - else: - return PartiallyUpdateModelFeatureRequest( - name = 'Updated Feature Name', - feature_type = 'FLOAT', - ) - """ - - def testPartiallyUpdateModelFeatureRequest(self): - """Test PartiallyUpdateModelFeatureRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_partially_update_model_request.py b/jaqpotpy/api/openapi/test/test_partially_update_model_request.py deleted file mode 100644 index 4986aa61..00000000 --- a/jaqpotpy/api/openapi/test/test_partially_update_model_request.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.models.partially_update_model_request import ( - PartiallyUpdateModelRequest, -) - - -class TestPartiallyUpdateModelRequest(unittest.TestCase): - """PartiallyUpdateModelRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PartiallyUpdateModelRequest: - """Test PartiallyUpdateModelRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `PartiallyUpdateModelRequest` - """ - model = PartiallyUpdateModelRequest() - if include_optional: - return PartiallyUpdateModelRequest( - name = '012', - description = '012', - visibility = 'PUBLIC', - task = 'REGRESSION', - tags = '', - shared_with_organization_ids = [ - 56 - ] - ) - else: - return PartiallyUpdateModelRequest( - name = '012', - visibility = 'PUBLIC', - task = 'REGRESSION', - ) - """ - - def testPartiallyUpdateModelRequest(self): - """Test PartiallyUpdateModelRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_transformer.py b/jaqpotpy/api/openapi/test/test_transformer.py deleted file mode 100644 index 4bd8dee4..00000000 --- a/jaqpotpy/api/openapi/test/test_transformer.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.models.transformer import Transformer - - -class TestTransformer(unittest.TestCase): - """Transformer unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Transformer: - """Test Transformer - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `Transformer` - """ - model = Transformer() - if include_optional: - return Transformer( - name = 'StandardScaler', - config = { - 'key' : None - } - ) - else: - return Transformer( - name = 'StandardScaler', - config = { - 'key' : None - }, - ) - """ - - def testTransformer(self): - """Test Transformer""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/test/test_user.py b/jaqpotpy/api/openapi/test/test_user.py deleted file mode 100644 index 01262c07..00000000 --- a/jaqpotpy/api/openapi/test/test_user.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" -Jaqpot API - -A modern RESTful API for model management and prediction services, built using Spring Boot and Kotlin. Supports seamless integration with machine learning workflows. - -The version of the OpenAPI document: 1.0.0 -Contact: upci.ntua@gmail.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -from jaqpotpy.api.openapi.models.user import User - - -class TestUser(unittest.TestCase): - """User unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> User: - """Test User - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `User` - """ - model = User() - if include_optional: - return User( - id = '', - username = '', - first_name = '', - last_name = '', - email = '', - email_verified = True - ) - else: - return User( - id = '', - ) - """ - - def testUser(self): - """Test User""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/jaqpotpy/api/openapi/tox.ini b/jaqpotpy/api/openapi/tox.ini deleted file mode 100644 index 64c3ad3d..00000000 --- a/jaqpotpy/api/openapi/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=jaqpotpy.api.openapi diff --git a/jaqpotpy/doa/doa.py b/jaqpotpy/doa/doa.py index bb44dd07..97bf8dff 100644 --- a/jaqpotpy/doa/doa.py +++ b/jaqpotpy/doa/doa.py @@ -141,7 +141,7 @@ def predict(self, new_data: Union[np.array, pd.DataFrame]) -> Iterable[Any]: def get_attributes(self): Leverage_data = LeverageDoa(h_star=self.h_star, doa_matrix=self.doa_matrix) - return Leverage_data + return Leverage_data.to_dict() class MeanVar(DOA): @@ -197,7 +197,7 @@ def predict(self, new_data: np.array) -> Iterable[Any]: return doaAll def get_attributes(self): - return MeanVarDoa(bounds=self.bounds) + return MeanVarDoa(bounds=self.bounds).to_dict() class BoundingBox(DOA): @@ -242,4 +242,4 @@ def predict(self, new_data: np.array) -> Iterable[Any]: return doaAll def get_attributes(self): - return BoundingBoxDoa(bounding_box=self.bounding_box) + return BoundingBoxDoa(bounding_box=self.bounding_box).to_dict() diff --git a/jaqpotpy/jaqpot.py b/jaqpotpy/jaqpot.py index 0d1a003e..8606f5a3 100644 --- a/jaqpotpy/jaqpot.py +++ b/jaqpotpy/jaqpot.py @@ -11,7 +11,6 @@ from jaqpotpy.api.openapi.models.feature import Feature from jaqpotpy.api.openapi.models.feature_type import FeatureType from jaqpotpy.api.openapi.models.model import Model -from jaqpotpy.api.openapi.models.model_extra_config import ModelExtraConfig from jaqpotpy.api.openapi.models.model_task import ModelTask from jaqpotpy.api.openapi.models.model_type import ModelType from jaqpotpy.api.openapi.models.model_visibility import ModelVisibility @@ -114,7 +113,7 @@ def deploy_sklearn_model(self, model, name, description, visibility): name=name, type=model.type, jaqpotpy_version=model.jaqpotpy_version, - doas=model.doa, + doas=model.doa_data, libraries=model.libraries, dependent_features=[ Feature( @@ -141,7 +140,8 @@ def deploy_sklearn_model(self, model, name, description, visibility): raw_model=raw_model, selected_features=model.selected_features, description=description, - extra_config=model.extra_config, + featurizers=model.featurizers, + preprocessors=model.preprocessors, scores=model.scores, ) response = model_api.create_model_with_http_info(model=body_model) @@ -198,7 +198,7 @@ def deploy_torch_model( independent_features=[ Feature(key="SMILES", name="SMILES", feature_type=FeatureType.SMILES) ], - extra_config=ModelExtraConfig(torch_config=torch_config), + torch_config=torch_config, task=model_task, visibility=ModelVisibility(visibility), raw_model=onnx_model, diff --git a/jaqpotpy/models/sklearn.py b/jaqpotpy/models/sklearn.py index 3424f342..fd56bf7e 100644 --- a/jaqpotpy/models/sklearn.py +++ b/jaqpotpy/models/sklearn.py @@ -18,7 +18,6 @@ StringTensorType, ) import jaqpotpy -from jaqpotpy.api.openapi.models.doa_data import DoaData from jaqpotpy.api.openapi.models import ( ModelScores, Scores, @@ -33,7 +32,6 @@ FeatureType, FeaturePossibleValue, ModelType, - ModelExtraConfig, Transformer, Doa, ) @@ -81,8 +79,10 @@ class SklearnModel(Model): List of independent features. dependentFeatures : list List of dependent features. - extra_config : ModelExtraConfig - Extra configuration for the model. + featurizers :list + List of featurizers for the model. + preprocessors :list + List of preprocessors for the model. test_scores : dict Dictionary to store test scores. train_scores : dict @@ -100,8 +100,8 @@ class SklearnModel(Model): Converts data types to Jaqpot feature types. _extract_attributes(trained_class, trained_class_type): Extracts attributes from a trained class. - _add_class_to_extraconfig(added_class, added_class_type): - Adds a class to the extra configuration. + _add_transformer(added_class, added_class_type): + Adds a class to the transformers list. _map_onnx_dtype(dtype, shape=1): Maps data types to ONNX tensor types. _create_onnx(onnx_options=None): @@ -174,7 +174,8 @@ def __init__( self.type = ModelType("SKLEARN") self.independentFeatures = None self.dependentFeatures = None - self.extra_config = ModelExtraConfig() + self.featurizers = [] + self.preprocessors = [] self.test_scores = {} self.train_scores = {} self.average_cross_val_scores = {} @@ -224,7 +225,7 @@ def _extract_attributes(self, trained_class, trained_class_type): for k, v in attributes.items() } - def _add_class_to_extraconfig(self, added_class, added_class_type): + def _add_transformer(self, added_class, added_class_type): configurations = {} for attr_name, attr_value in self._extract_attributes( @@ -233,11 +234,11 @@ def _add_class_to_extraconfig(self, added_class, added_class_type): configurations[attr_name] = attr_value if added_class_type == "preprocessor": - self.extra_config.preprocessors.append( + self.preprocessors.append( Transformer(name=added_class.__class__.__name__, config=configurations) ) elif added_class_type == "featurizer": - self.extra_config.featurizers.append( + self.featurizers.append( Transformer(name=added_class.__class__.__name__, config=configurations) ) @@ -339,9 +340,9 @@ def fit(self, onnx_options: Optional[Dict] = None): if isinstance(self.featurizer, (MolecularFeaturizer, list)): if not isinstance(self.featurizer, list): self.featurizer = [self.featurizer] - self.extra_config.featurizers = [] + self.featurizers = [] for featurizer_i in self.featurizer: - self._add_class_to_extraconfig(featurizer_i, "featurizer") + self._add_transformer(featurizer_i, "featurizer") if self.dataset.y is None: raise TypeError( @@ -372,7 +373,7 @@ def fit(self, onnx_options: Optional[Dict] = None): self.doa[i] = doa_method doa_instance = Doa( method=doa_method.__name__, - data=DoaData(doa_method.doa_attributes), + data=doa_method.doa_attributes, ) self.doa_data.append(doa_instance) @@ -390,12 +391,12 @@ def fit(self, onnx_options: Optional[Dict] = None): "Target labels cannot be preprocessed for classification tasks. Remove any assigned preprocessing for y." ) else: - self.extra_config.preprocessors = [] + self.preprocessors = [] if len(self.dataset.y_cols) == 1 and self._labels_are_strings(y): y = y.ravel() # this transformation is exclusively for LabelEncoder which is the only allowed preprocessor for y in classification tasks for preprocessor in self.preprocess_y: y = preprocessor.fit_transform(y) - self._add_class_to_extraconfig(preprocessor, "preprocessor") + self._add_transformer(preprocessor, "preprocessor") if len(self.dataset.y_cols) == 1 and y.ndim == 2: y = y.ravel() if self.preprocess_x: diff --git a/jaqpotpy/models/xgboost.py b/jaqpotpy/models/xgboost.py index 871d6689..f27e0994 100644 --- a/jaqpotpy/models/xgboost.py +++ b/jaqpotpy/models/xgboost.py @@ -6,7 +6,6 @@ from jaqpotpy.datasets.jaqpotpy_dataset import JaqpotpyDataset from jaqpotpy.api.openapi.models import ( ModelType, - ModelExtraConfig, ) from jaqpotpy.doa import DOA from skl2onnx.common.shape_calculator import ( @@ -53,7 +52,6 @@ def __init__( self.type = ModelType("SKLEARN") self.independentFeatures = None self.dependentFeatures = None - self.extra_config = ModelExtraConfig() def _create_onnx(self, onnx_options: Optional[Dict] = None): name = self.model.__class__.__name__ + "_ONNX" diff --git a/ruff.toml b/ruff.toml index 4dec57b5..55cdbcb3 100644 --- a/ruff.toml +++ b/ruff.toml @@ -1,3 +1,5 @@ [lint] ignore = ["D100", "E722", "F401", "F403"] exclude = ["jaqpotpy/api/openapi/**"] +[format] +exclude = ["jaqpotpy/api/openapi/**"] diff --git a/jaqpotpy/api/openapi/test/__init__.py b/test.py similarity index 100% rename from jaqpotpy/api/openapi/test/__init__.py rename to test.py