Skip to content

Commit bb0b6b1

Browse files
author
Maciek Pytel
committed
Update neptune retrieval API
Re-generate retrieval api using swagger taken from neptune staging environment (which I think at this point should match last release)
1 parent ee71941 commit bb0b6b1

File tree

10 files changed

+211
-18
lines changed

10 files changed

+211
-18
lines changed

src/neptune_retrieval_api/api/default/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15+

src/neptune_retrieval_api/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@
246246
from .signal_body import SignalBody
247247
from .single_custom_time_series_view import SingleCustomTimeSeriesView
248248
from .single_time_series_view import SingleTimeSeriesView
249+
from .single_time_series_view_bucket import SingleTimeSeriesViewBucket
249250
from .steps import Steps
250251
from .string_attribute_dto import StringAttributeDTO
251252
from .string_point_value_dto import StringPointValueDTO
@@ -498,6 +499,7 @@
498499
"SignalBody",
499500
"SingleCustomTimeSeriesView",
500501
"SingleTimeSeriesView",
502+
"SingleTimeSeriesViewBucket",
501503
"Steps",
502504
"StringAttributeDTO",
503505
"StringPointValueDTO",

src/neptune_retrieval_api/models/attribute_name_filter_dto.py

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,30 @@
3838
class AttributeNameFilterDTO:
3939
"""
4040
Attributes:
41+
must_match_any (Union[Unset, List['AttributeNameFilterDTO']]): A list of filters representing disjunctions of
42+
conjunctive simple filters. The implementation is currently limited to 1 level of nesting. E.g. `(a AND b AND
43+
NOT c) OR (d AND e) OR (f AND g)` is supported, but `(a OR (b OR c))` is not supported. The latter should be
44+
expressed as `(a OR b OR c)`. `(a AND (b OR c))` is also not supported. Mutually exclusive with
45+
`mustMatchRegexes` and `mustNotMatchRegexes`.
4146
must_match_regexes (Union[Unset, List[str]]): An attribute must match all of the regexes from the list to be
42-
returned
47+
returned. Mutually exclusive with `mustMatchAny`
4348
must_not_match_regexes (Union[Unset, List[str]]): An attribute must match none of the regexes from the list to
44-
be returned
49+
be returned. Mutually exclusive with `mustMatchAny`
4550
"""
4651

52+
must_match_any: Union[Unset, List["AttributeNameFilterDTO"]] = UNSET
4753
must_match_regexes: Union[Unset, List[str]] = UNSET
4854
must_not_match_regexes: Union[Unset, List[str]] = UNSET
4955
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
5056

5157
def to_dict(self) -> Dict[str, Any]:
58+
must_match_any: Union[Unset, List[Dict[str, Any]]] = UNSET
59+
if not isinstance(self.must_match_any, Unset):
60+
must_match_any = []
61+
for must_match_any_item_data in self.must_match_any:
62+
must_match_any_item = must_match_any_item_data.to_dict()
63+
must_match_any.append(must_match_any_item)
64+
5265
must_match_regexes: Union[Unset, List[str]] = UNSET
5366
if not isinstance(self.must_match_regexes, Unset):
5467
must_match_regexes = self.must_match_regexes
@@ -60,6 +73,8 @@ def to_dict(self) -> Dict[str, Any]:
6073
field_dict: Dict[str, Any] = {}
6174
field_dict.update(self.additional_properties)
6275
field_dict.update({})
76+
if must_match_any is not UNSET:
77+
field_dict["mustMatchAny"] = must_match_any
6378
if must_match_regexes is not UNSET:
6479
field_dict["mustMatchRegexes"] = must_match_regexes
6580
if must_not_match_regexes is not UNSET:
@@ -70,11 +85,19 @@ def to_dict(self) -> Dict[str, Any]:
7085
@classmethod
7186
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
7287
d = src_dict.copy()
88+
must_match_any = []
89+
_must_match_any = d.pop("mustMatchAny", UNSET)
90+
for must_match_any_item_data in _must_match_any or []:
91+
must_match_any_item = AttributeNameFilterDTO.from_dict(must_match_any_item_data)
92+
93+
must_match_any.append(must_match_any_item)
94+
7395
must_match_regexes = cast(List[str], d.pop("mustMatchRegexes", UNSET))
7496

7597
must_not_match_regexes = cast(List[str], d.pop("mustNotMatchRegexes", UNSET))
7698

7799
attribute_name_filter_dto = cls(
100+
must_match_any=must_match_any,
78101
must_match_regexes=must_match_regexes,
79102
must_not_match_regexes=must_not_match_regexes,
80103
)

src/neptune_retrieval_api/models/dashboard_config_dto.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class DashboardConfigDTO:
4747
smoothing (Union[Unset, int]):
4848
xaxis_metric (Union[Unset, AttributeDefinitionDTO]):
4949
xaxis_mode (Union[Unset, str]):
50+
xaxis_range (Union[Unset, OpenRangeDTO]):
5051
xaxis_scale (Union[Unset, str]):
5152
yaxis_scale (Union[Unset, str]):
5253
"""
@@ -55,6 +56,7 @@ class DashboardConfigDTO:
5556
smoothing: Union[Unset, int] = UNSET
5657
xaxis_metric: Union[Unset, "AttributeDefinitionDTO"] = UNSET
5758
xaxis_mode: Union[Unset, str] = UNSET
59+
xaxis_range: Union[Unset, "OpenRangeDTO"] = UNSET
5860
xaxis_scale: Union[Unset, str] = UNSET
5961
yaxis_scale: Union[Unset, str] = UNSET
6062
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
@@ -72,6 +74,10 @@ def to_dict(self) -> Dict[str, Any]:
7274

7375
xaxis_mode = self.xaxis_mode
7476

77+
xaxis_range: Union[Unset, Dict[str, Any]] = UNSET
78+
if not isinstance(self.xaxis_range, Unset):
79+
xaxis_range = self.xaxis_range.to_dict()
80+
7581
xaxis_scale = self.xaxis_scale
7682

7783
yaxis_scale = self.yaxis_scale
@@ -87,6 +93,8 @@ def to_dict(self) -> Dict[str, Any]:
8793
field_dict["xaxisMetric"] = xaxis_metric
8894
if xaxis_mode is not UNSET:
8995
field_dict["xaxisMode"] = xaxis_mode
96+
if xaxis_range is not UNSET:
97+
field_dict["xaxisRange"] = xaxis_range
9098
if xaxis_scale is not UNSET:
9199
field_dict["xaxisScale"] = xaxis_scale
92100
if yaxis_scale is not UNSET:
@@ -118,6 +126,13 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
118126

119127
xaxis_mode = d.pop("xaxisMode", UNSET)
120128

129+
_xaxis_range = d.pop("xaxisRange", UNSET)
130+
xaxis_range: Union[Unset, OpenRangeDTO]
131+
if isinstance(_xaxis_range, Unset):
132+
xaxis_range = UNSET
133+
else:
134+
xaxis_range = OpenRangeDTO.from_dict(_xaxis_range)
135+
121136
xaxis_scale = d.pop("xaxisScale", UNSET)
122137

123138
yaxis_scale = d.pop("yaxisScale", UNSET)
@@ -127,6 +142,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
127142
smoothing=smoothing,
128143
xaxis_metric=xaxis_metric,
129144
xaxis_mode=xaxis_mode,
145+
xaxis_range=xaxis_range,
130146
xaxis_scale=xaxis_scale,
131147
yaxis_scale=yaxis_scale,
132148
)

src/neptune_retrieval_api/models/dependency_on_inaccessible_projects_error_dto_error_type.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class DependencyOnInaccessibleProjectsErrorDTOErrorType(str, Enum):
4646
INVALID_GROUPING_PARAMS = "INVALID_GROUPING_PARAMS"
4747
INVALID_OFFSET = "INVALID_OFFSET"
4848
INVALID_SORT_PARAMS = "INVALID_SORT_PARAMS"
49+
JWT_VALIDATION_ERROR = "JWT_VALIDATION_ERROR"
4950
LEADERBOARD_ENTRY_NOT_FOUND = "LEADERBOARD_ENTRY_NOT_FOUND"
5051
MALFORMED_JSON_REQUEST = "MALFORMED_JSON_REQUEST"
5152
NOTEBOOK_NOT_FOUND = "NOTEBOOK_NOT_FOUND"

src/neptune_retrieval_api/models/point.py

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# limitations under the License.
1515

1616
from typing import (
17+
TYPE_CHECKING,
1718
Any,
1819
Dict,
1920
List,
@@ -30,6 +31,10 @@
3031
Unset,
3132
)
3233

34+
if TYPE_CHECKING:
35+
from ..models.single_time_series_view_bucket import SingleTimeSeriesViewBucket
36+
37+
3338
T = TypeVar("T", bound="Point")
3439

3540

@@ -39,15 +44,13 @@ class Point:
3944
Attributes:
4045
interpolation (bool):
4146
x (float):
42-
max_y (Union[Unset, float]):
43-
min_y (Union[Unset, float]):
47+
bucket (Union[Unset, SingleTimeSeriesViewBucket]):
4448
y (Union[Unset, float]):
4549
"""
4650

4751
interpolation: bool
4852
x: float
49-
max_y: Union[Unset, float] = UNSET
50-
min_y: Union[Unset, float] = UNSET
53+
bucket: Union[Unset, "SingleTimeSeriesViewBucket"] = UNSET
5154
y: Union[Unset, float] = UNSET
5255
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
5356

@@ -56,9 +59,9 @@ def to_dict(self) -> Dict[str, Any]:
5659

5760
x = self.x
5861

59-
max_y = self.max_y
60-
61-
min_y = self.min_y
62+
bucket: Union[Unset, Dict[str, Any]] = UNSET
63+
if not isinstance(self.bucket, Unset):
64+
bucket = self.bucket.to_dict()
6265

6366
y = self.y
6467

@@ -70,33 +73,35 @@ def to_dict(self) -> Dict[str, Any]:
7073
"x": x,
7174
}
7275
)
73-
if max_y is not UNSET:
74-
field_dict["maxY"] = max_y
75-
if min_y is not UNSET:
76-
field_dict["minY"] = min_y
76+
if bucket is not UNSET:
77+
field_dict["bucket"] = bucket
7778
if y is not UNSET:
7879
field_dict["y"] = y
7980

8081
return field_dict
8182

8283
@classmethod
8384
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
85+
from ..models.single_time_series_view_bucket import SingleTimeSeriesViewBucket
86+
8487
d = src_dict.copy()
8588
interpolation = d.pop("interpolation")
8689

8790
x = d.pop("x")
8891

89-
max_y = d.pop("maxY", UNSET)
90-
91-
min_y = d.pop("minY", UNSET)
92+
_bucket = d.pop("bucket", UNSET)
93+
bucket: Union[Unset, SingleTimeSeriesViewBucket]
94+
if isinstance(_bucket, Unset):
95+
bucket = UNSET
96+
else:
97+
bucket = SingleTimeSeriesViewBucket.from_dict(_bucket)
9298

9399
y = d.pop("y", UNSET)
94100

95101
point = cls(
96102
interpolation=interpolation,
97103
x=x,
98-
max_y=max_y,
99-
min_y=min_y,
104+
bucket=bucket,
100105
y=y,
101106
)
102107

src/neptune_retrieval_api/models/report_node_grid_dto.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,18 @@
2020
List,
2121
Type,
2222
TypeVar,
23+
Union,
2324
cast,
2425
)
2526

2627
from attrs import define as _attrs_define
2728
from attrs import field as _attrs_field
2829

30+
from ..types import (
31+
UNSET,
32+
Unset,
33+
)
34+
2935
if TYPE_CHECKING:
3036
from ..models.colors_config_dto import ColorsConfigDTO
3137
from ..models.dashboard_config_dto import DashboardConfigDTO
@@ -51,6 +57,7 @@ class ReportNodeGridDTO:
5157
selected_run_groups (List[str]):
5258
widget_layouts (List['WidgetLayoutDTO']):
5359
widgets (List['WidgetDTO']):
60+
preset_colors (Union[Unset, List[str]]):
5461
"""
5562

5663
aggregate_by_group: bool
@@ -63,6 +70,7 @@ class ReportNodeGridDTO:
6370
selected_run_groups: List[str]
6471
widget_layouts: List["WidgetLayoutDTO"]
6572
widgets: List["WidgetDTO"]
73+
preset_colors: Union[Unset, List[str]] = UNSET
6674
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
6775

6876
def to_dict(self) -> Dict[str, Any]:
@@ -95,6 +103,10 @@ def to_dict(self) -> Dict[str, Any]:
95103
widgets_item = widgets_item_data.to_dict()
96104
widgets.append(widgets_item)
97105

106+
preset_colors: Union[Unset, List[str]] = UNSET
107+
if not isinstance(self.preset_colors, Unset):
108+
preset_colors = self.preset_colors
109+
98110
field_dict: Dict[str, Any] = {}
99111
field_dict.update(self.additional_properties)
100112
field_dict.update(
@@ -111,6 +123,8 @@ def to_dict(self) -> Dict[str, Any]:
111123
"widgets": widgets,
112124
}
113125
)
126+
if preset_colors is not UNSET:
127+
field_dict["presetColors"] = preset_colors
114128

115129
return field_dict
116130

@@ -158,6 +172,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
158172

159173
widgets.append(widgets_item)
160174

175+
preset_colors = cast(List[str], d.pop("presetColors", UNSET))
176+
161177
report_node_grid_dto = cls(
162178
aggregate_by_group=aggregate_by_group,
163179
charts_config=charts_config,
@@ -169,6 +185,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
169185
selected_run_groups=selected_run_groups,
170186
widget_layouts=widget_layouts,
171187
widgets=widgets,
188+
preset_colors=preset_colors,
172189
)
173190

174191
report_node_grid_dto.additional_properties = d

0 commit comments

Comments
 (0)