Skip to content

Commit

Permalink
Auto-Updated OpenAPI Clients
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Sep 28, 2024
1 parent 2c9116d commit c931cd0
Show file tree
Hide file tree
Showing 73 changed files with 1,047 additions and 841 deletions.
2 changes: 1 addition & 1 deletion .updater/api/api-docs.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client-api_python/generated/PySirius/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
""" # noqa: E501


__version__ = "6.0.5"
__version__ = "6.0.6"

# import apis into sdk package
from PySirius.api.actuator_api import ActuatorApi
Expand Down
351 changes: 184 additions & 167 deletions client-api_python/generated/PySirius/api/compounds_api.py

Large diffs are not rendered by default.

111 changes: 67 additions & 44 deletions client-api_python/generated/PySirius/api/features_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated

from pydantic import Field, StrictInt, StrictStr, field_validator
from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator
from typing import List, Optional
from typing_extensions import Annotated
from PySirius.models.aligned_feature import AlignedFeature
Expand Down Expand Up @@ -6643,9 +6643,9 @@ def _get_ms_data_serialize(
@validate_call
def get_quantification(
self,
project_id: StrictStr,
aligned_feature_id: StrictStr,
type: Optional[StrictStr] = None,
project_id: Annotated[StrictStr, Field(description="project-space to read from.")],
aligned_feature_id: Annotated[StrictStr, Field(description="feature which intensities should be read out")],
type: Annotated[Optional[StrictStr], Field(description="quantification type. Currently, only APEX_HEIGHT is supported, which is the intensity of the feature at its apex.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand All @@ -6659,14 +6659,15 @@ def get_quantification(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> QuantificationTable:
"""get_quantification
"""Returns a single quantification table row for the given feature.
Returns a single quantification table row for the given feature. The quantification table contains the intensity of the feature within all samples it is contained in.
:param project_id: (required)
:param project_id: project-space to read from. (required)
:type project_id: str
:param aligned_feature_id: (required)
:param aligned_feature_id: feature which intensities should be read out (required)
:type aligned_feature_id: str
:param type:
:param type: quantification type. Currently, only APEX_HEIGHT is supported, which is the intensity of the feature at its apex.
:type type: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
Expand Down Expand Up @@ -6717,9 +6718,9 @@ def get_quantification(
@validate_call
def get_quantification_with_http_info(
self,
project_id: StrictStr,
aligned_feature_id: StrictStr,
type: Optional[StrictStr] = None,
project_id: Annotated[StrictStr, Field(description="project-space to read from.")],
aligned_feature_id: Annotated[StrictStr, Field(description="feature which intensities should be read out")],
type: Annotated[Optional[StrictStr], Field(description="quantification type. Currently, only APEX_HEIGHT is supported, which is the intensity of the feature at its apex.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand All @@ -6733,14 +6734,15 @@ def get_quantification_with_http_info(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[QuantificationTable]:
"""get_quantification
"""Returns a single quantification table row for the given feature.
Returns a single quantification table row for the given feature. The quantification table contains the intensity of the feature within all samples it is contained in.
:param project_id: (required)
:param project_id: project-space to read from. (required)
:type project_id: str
:param aligned_feature_id: (required)
:param aligned_feature_id: feature which intensities should be read out (required)
:type aligned_feature_id: str
:param type:
:param type: quantification type. Currently, only APEX_HEIGHT is supported, which is the intensity of the feature at its apex.
:type type: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
Expand Down Expand Up @@ -6791,9 +6793,9 @@ def get_quantification_with_http_info(
@validate_call
def get_quantification_without_preload_content(
self,
project_id: StrictStr,
aligned_feature_id: StrictStr,
type: Optional[StrictStr] = None,
project_id: Annotated[StrictStr, Field(description="project-space to read from.")],
aligned_feature_id: Annotated[StrictStr, Field(description="feature which intensities should be read out")],
type: Annotated[Optional[StrictStr], Field(description="quantification type. Currently, only APEX_HEIGHT is supported, which is the intensity of the feature at its apex.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand All @@ -6807,14 +6809,15 @@ def get_quantification_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""get_quantification
"""Returns a single quantification table row for the given feature.
Returns a single quantification table row for the given feature. The quantification table contains the intensity of the feature within all samples it is contained in.
:param project_id: (required)
:param project_id: project-space to read from. (required)
:type project_id: str
:param aligned_feature_id: (required)
:param aligned_feature_id: feature which intensities should be read out (required)
:type aligned_feature_id: str
:param type:
:param type: quantification type. Currently, only APEX_HEIGHT is supported, which is the intensity of the feature at its apex.
:type type: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
Expand Down Expand Up @@ -10204,10 +10207,11 @@ def _get_structure_candidates_paged_serialize(


@validate_call
def get_traces1(
def get_traces(
self,
project_id: StrictStr,
aligned_feature_id: StrictStr,
project_id: Annotated[StrictStr, Field(description="project-space to read from.")],
aligned_feature_id: Annotated[StrictStr, Field(description="feature which intensities should be read out")],
include_all: Annotated[Optional[StrictBool], Field(description="when true, return all samples that belong to the same merged trace. when false, only return samples which contain the aligned feature.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand All @@ -10221,13 +10225,16 @@ def get_traces1(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> TraceSet:
"""get_traces1
"""Returns the traces of the given feature.
Returns the traces of the given feature. A trace consists of m/z and intensity values over the retention time axis. All the returned traces are 'projected', which means they refer not to the original retention time axis, but to a recalibrated axis. This means the data points in the trace are not exactly the same as in the raw data. However, this also means that all traces can be directly compared against each other, as they all lie in the same retention time axis. By default, this method only returns traces of samples the aligned feature appears in. When includeAll is set, it also includes samples in which the same trace appears in.
:param project_id: (required)
:param project_id: project-space to read from. (required)
:type project_id: str
:param aligned_feature_id: (required)
:param aligned_feature_id: feature which intensities should be read out (required)
:type aligned_feature_id: str
:param include_all: when true, return all samples that belong to the same merged trace. when false, only return samples which contain the aligned feature.
:type include_all: bool
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
Expand All @@ -10250,9 +10257,10 @@ def get_traces1(
:return: Returns the result object.
""" # noqa: E501

_param = self._get_traces1_serialize(
_param = self._get_traces_serialize(
project_id=project_id,
aligned_feature_id=aligned_feature_id,
include_all=include_all,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
Expand All @@ -10274,10 +10282,11 @@ def get_traces1(


@validate_call
def get_traces1_with_http_info(
def get_traces_with_http_info(
self,
project_id: StrictStr,
aligned_feature_id: StrictStr,
project_id: Annotated[StrictStr, Field(description="project-space to read from.")],
aligned_feature_id: Annotated[StrictStr, Field(description="feature which intensities should be read out")],
include_all: Annotated[Optional[StrictBool], Field(description="when true, return all samples that belong to the same merged trace. when false, only return samples which contain the aligned feature.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand All @@ -10291,13 +10300,16 @@ def get_traces1_with_http_info(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[TraceSet]:
"""get_traces1
"""Returns the traces of the given feature.
Returns the traces of the given feature. A trace consists of m/z and intensity values over the retention time axis. All the returned traces are 'projected', which means they refer not to the original retention time axis, but to a recalibrated axis. This means the data points in the trace are not exactly the same as in the raw data. However, this also means that all traces can be directly compared against each other, as they all lie in the same retention time axis. By default, this method only returns traces of samples the aligned feature appears in. When includeAll is set, it also includes samples in which the same trace appears in.
:param project_id: (required)
:param project_id: project-space to read from. (required)
:type project_id: str
:param aligned_feature_id: (required)
:param aligned_feature_id: feature which intensities should be read out (required)
:type aligned_feature_id: str
:param include_all: when true, return all samples that belong to the same merged trace. when false, only return samples which contain the aligned feature.
:type include_all: bool
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
Expand All @@ -10320,9 +10332,10 @@ def get_traces1_with_http_info(
:return: Returns the result object.
""" # noqa: E501

_param = self._get_traces1_serialize(
_param = self._get_traces_serialize(
project_id=project_id,
aligned_feature_id=aligned_feature_id,
include_all=include_all,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
Expand All @@ -10344,10 +10357,11 @@ def get_traces1_with_http_info(


@validate_call
def get_traces1_without_preload_content(
def get_traces_without_preload_content(
self,
project_id: StrictStr,
aligned_feature_id: StrictStr,
project_id: Annotated[StrictStr, Field(description="project-space to read from.")],
aligned_feature_id: Annotated[StrictStr, Field(description="feature which intensities should be read out")],
include_all: Annotated[Optional[StrictBool], Field(description="when true, return all samples that belong to the same merged trace. when false, only return samples which contain the aligned feature.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand All @@ -10361,13 +10375,16 @@ def get_traces1_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""get_traces1
"""Returns the traces of the given feature.
Returns the traces of the given feature. A trace consists of m/z and intensity values over the retention time axis. All the returned traces are 'projected', which means they refer not to the original retention time axis, but to a recalibrated axis. This means the data points in the trace are not exactly the same as in the raw data. However, this also means that all traces can be directly compared against each other, as they all lie in the same retention time axis. By default, this method only returns traces of samples the aligned feature appears in. When includeAll is set, it also includes samples in which the same trace appears in.
:param project_id: (required)
:param project_id: project-space to read from. (required)
:type project_id: str
:param aligned_feature_id: (required)
:param aligned_feature_id: feature which intensities should be read out (required)
:type aligned_feature_id: str
:param include_all: when true, return all samples that belong to the same merged trace. when false, only return samples which contain the aligned feature.
:type include_all: bool
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
Expand All @@ -10390,9 +10407,10 @@ def get_traces1_without_preload_content(
:return: Returns the result object.
""" # noqa: E501

_param = self._get_traces1_serialize(
_param = self._get_traces_serialize(
project_id=project_id,
aligned_feature_id=aligned_feature_id,
include_all=include_all,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
Expand All @@ -10409,10 +10427,11 @@ def get_traces1_without_preload_content(
return response_data.response


def _get_traces1_serialize(
def _get_traces_serialize(
self,
project_id,
aligned_feature_id,
include_all,
_request_auth,
_content_type,
_headers,
Expand All @@ -10437,6 +10456,10 @@ def _get_traces1_serialize(
if aligned_feature_id is not None:
_path_params['alignedFeatureId'] = aligned_feature_id
# process the query parameters
if include_all is not None:

_query_params.append(('includeAll', include_all))

# process the header parameters
# process the form parameters
# process the body parameter
Expand Down
2 changes: 1 addition & 1 deletion client-api_python/generated/PySirius/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def __init__(
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'OpenAPI-Generator/6.0.5/python'
self.user_agent = 'OpenAPI-Generator/6.0.6/python'
self.client_side_validation = configuration.client_side_validation

def __enter__(self):
Expand Down
2 changes: 1 addition & 1 deletion client-api_python/generated/PySirius/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def to_debug_report(self):
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: 2.1\n"\
"SDK Package Version: 6.0.5".\
"SDK Package Version: 6.0.6".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self):
Expand Down
17 changes: 16 additions & 1 deletion client-api_python/generated/PySirius/models/feature_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from PySirius.models.basic_spectrum import BasicSpectrum
from PySirius.models.data_quality import DataQuality
from typing import Optional, Set
from typing_extensions import Self

Expand All @@ -34,10 +35,12 @@ class FeatureImport(BaseModel):
detected_adducts: Optional[List[Optional[StrictStr]]] = Field(default=None, description="Detected adducts of this feature. Can be NULL or empty if no adducts are known.", alias="detectedAdducts")
rt_start_seconds: Optional[float] = Field(default=None, alias="rtStartSeconds")
rt_end_seconds: Optional[float] = Field(default=None, alias="rtEndSeconds")
rt_apex_seconds: Optional[float] = Field(default=None, alias="rtApexSeconds")
data_quality: Optional[DataQuality] = Field(default=None, alias="dataQuality")
merged_ms1: Optional[BasicSpectrum] = Field(default=None, alias="mergedMs1")
ms1_spectra: Optional[List[Optional[BasicSpectrum]]] = Field(default=None, description="List of MS1Spectra belonging to this feature. These spectra will be merged an only a representative mergedMs1 spectrum will be stored in SIRIUS. At least one of these spectra should contain the isotope pattern of the precursor ion. Note: Will be ignored if 'mergedMs1' is given.", alias="ms1Spectra")
ms2_spectra: Optional[List[Optional[BasicSpectrum]]] = Field(default=None, description="List of MS/MS spectra that belong to this feature.", alias="ms2Spectra")
__properties: ClassVar[List[str]] = ["name", "externalFeatureId", "ionMass", "charge", "detectedAdducts", "rtStartSeconds", "rtEndSeconds", "mergedMs1", "ms1Spectra", "ms2Spectra"]
__properties: ClassVar[List[str]] = ["name", "externalFeatureId", "ionMass", "charge", "detectedAdducts", "rtStartSeconds", "rtEndSeconds", "rtApexSeconds", "dataQuality", "mergedMs1", "ms1Spectra", "ms2Spectra"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -120,6 +123,16 @@ def to_dict(self) -> Dict[str, Any]:
if self.rt_end_seconds is None and "rt_end_seconds" in self.model_fields_set:
_dict['rtEndSeconds'] = None

# set to None if rt_apex_seconds (nullable) is None
# and model_fields_set contains the field
if self.rt_apex_seconds is None and "rt_apex_seconds" in self.model_fields_set:
_dict['rtApexSeconds'] = None

# set to None if data_quality (nullable) is None
# and model_fields_set contains the field
if self.data_quality is None and "data_quality" in self.model_fields_set:
_dict['dataQuality'] = None

# set to None if merged_ms1 (nullable) is None
# and model_fields_set contains the field
if self.merged_ms1 is None and "merged_ms1" in self.model_fields_set:
Expand Down Expand Up @@ -154,6 +167,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"detectedAdducts": obj.get("detectedAdducts"),
"rtStartSeconds": obj.get("rtStartSeconds"),
"rtEndSeconds": obj.get("rtEndSeconds"),
"rtApexSeconds": obj.get("rtApexSeconds"),
"dataQuality": obj.get("dataQuality"),
"mergedMs1": BasicSpectrum.from_dict(obj["mergedMs1"]) if obj.get("mergedMs1") is not None else None,
"ms1Spectra": [BasicSpectrum.from_dict(_item) for _item in obj["ms1Spectra"]] if obj.get("ms1Spectra") is not None else None,
"ms2Spectra": [BasicSpectrum.from_dict(_item) for _item in obj["ms2Spectra"]] if obj.get("ms2Spectra") is not None else None
Expand Down
Loading

0 comments on commit c931cd0

Please sign in to comment.