Skip to content

Commit 48ad843

Browse files
maintain Label and Source class (#359)
Backwards compatibility for Label and Source, fix issue with validation on result_type
1 parent a4f9e72 commit 48ad843

22 files changed

+780
-32
lines changed

generated/.openapi-generator/FILES

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ docs/InlineResponse2001EvaluationResults.md
3636
docs/InlineResponse2002.md
3737
docs/InlineResponse200Summary.md
3838
docs/InlineResponse200SummaryClassCounts.md
39+
docs/Label.md
3940
docs/LabelValue.md
4041
docs/LabelValueRequest.md
4142
docs/LabelsApi.md
@@ -57,6 +58,7 @@ docs/ResultTypeEnum.md
5758
docs/Rule.md
5859
docs/RuleRequest.md
5960
docs/SnoozeTimeUnitEnum.md
61+
docs/Source.md
6062
docs/SourceEnum.md
6163
docs/StatusEnum.md
6264
docs/TextModeConfiguration.md
@@ -112,6 +114,7 @@ groundlight_openapi_client/model/inline_response2001_evaluation_results.py
112114
groundlight_openapi_client/model/inline_response2002.py
113115
groundlight_openapi_client/model/inline_response200_summary.py
114116
groundlight_openapi_client/model/inline_response200_summary_class_counts.py
117+
groundlight_openapi_client/model/label.py
115118
groundlight_openapi_client/model/label_value.py
116119
groundlight_openapi_client/model/label_value_request.py
117120
groundlight_openapi_client/model/mode_enum.py
@@ -131,6 +134,7 @@ groundlight_openapi_client/model/roi_request.py
131134
groundlight_openapi_client/model/rule.py
132135
groundlight_openapi_client/model/rule_request.py
133136
groundlight_openapi_client/model/snooze_time_unit_enum.py
137+
groundlight_openapi_client/model/source.py
134138
groundlight_openapi_client/model/source_enum.py
135139
groundlight_openapi_client/model/status_enum.py
136140
groundlight_openapi_client/model/text_mode_configuration.py
@@ -146,4 +150,6 @@ setup.cfg
146150
setup.py
147151
test-requirements.txt
148152
test/__init__.py
153+
test/test_label.py
154+
test/test_source.py
149155
tox.ini

generated/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ Class | Method | HTTP request | Description
174174
- [InlineResponse2002](docs/InlineResponse2002.md)
175175
- [InlineResponse200Summary](docs/InlineResponse200Summary.md)
176176
- [InlineResponse200SummaryClassCounts](docs/InlineResponse200SummaryClassCounts.md)
177+
- [Label](docs/Label.md)
177178
- [LabelValue](docs/LabelValue.md)
178179
- [LabelValueRequest](docs/LabelValueRequest.md)
179180
- [ModeEnum](docs/ModeEnum.md)
@@ -193,6 +194,7 @@ Class | Method | HTTP request | Description
193194
- [Rule](docs/Rule.md)
194195
- [RuleRequest](docs/RuleRequest.md)
195196
- [SnoozeTimeUnitEnum](docs/SnoozeTimeUnitEnum.md)
197+
- [Source](docs/Source.md)
196198
- [SourceEnum](docs/SourceEnum.md)
197199
- [StatusEnum](docs/StatusEnum.md)
198200
- [TextModeConfiguration](docs/TextModeConfiguration.md)

generated/docs/BinaryClassificationResult.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
77
**label** | **str** | |
88
**confidence** | **float, none_type** | | [optional]
99
**source** | **str** | | [optional]
10-
**result_type** | **str** | | [optional]
10+
**result_type** | **str** | | [optional] if omitted the server will use the default value of "binary_classification"
1111
**from_edge** | **bool** | | [optional]
1212
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
1313

generated/docs/BoundingBoxResult.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
77
**label** | **str** | |
88
**confidence** | **float, none_type** | | [optional]
99
**source** | **str** | | [optional]
10-
**result_type** | **str** | | [optional]
10+
**result_type** | **str** | | [optional] if omitted the server will use the default value of "bounding_box"
1111
**from_edge** | **bool** | | [optional]
1212
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
1313

generated/docs/CountingResult.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
77
**count** | **int, none_type** | |
88
**confidence** | **float, none_type** | | [optional]
99
**source** | **str** | | [optional]
10-
**result_type** | **str** | | [optional]
10+
**result_type** | **str** | | [optional] if omitted the server will use the default value of "counting"
1111
**from_edge** | **bool** | | [optional]
1212
**greater_than_max** | **bool** | | [optional]
1313
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]

generated/docs/Label.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Label
2+
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**value** | **str** | | must be one of ["YES", "NO", "UNCLEAR", ]
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+

generated/docs/MultiClassificationResult.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
77
**label** | **str** | |
88
**confidence** | **float, none_type** | | [optional]
99
**source** | **str** | | [optional]
10-
**result_type** | **str** | | [optional]
10+
**result_type** | **str** | | [optional] if omitted the server will use the default value of "multi_classification"
1111
**from_edge** | **bool** | | [optional]
1212
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
1313

generated/docs/Source.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Source
2+
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**value** | **str** | | must be one of ["STILL_PROCESSING", "CLOUD", "USER", "CLOUD_ENSEMBLE", "ALGORITHM", "EDGE", ]
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+

generated/docs/TextRecognitionResult.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
88
**truncated** | **bool** | |
99
**confidence** | **float, none_type** | | [optional]
1010
**source** | **str** | | [optional]
11-
**result_type** | **str** | | [optional]
11+
**result_type** | **str** | | [optional] if omitted the server will use the default value of "text_recognition"
1212
**from_edge** | **bool** | | [optional]
1313
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
1414

generated/groundlight_openapi_client/model/binary_classification_result.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ class BinaryClassificationResult(ModelNormal):
5353
as additional properties values.
5454
"""
5555

56-
allowed_values = {}
56+
allowed_values = {
57+
("result_type",): {
58+
"BINARY_CLASSIFICATION": "binary_classification",
59+
},
60+
}
5761

5862
validations = {
5963
("confidence",): {
@@ -160,7 +164,7 @@ def _from_openapi_data(cls, label, *args, **kwargs): # noqa: E501
160164
_visited_composed_classes = (Animal,)
161165
confidence (float, none_type): [optional] # noqa: E501
162166
source (str): [optional] # noqa: E501
163-
result_type (str): [optional] # noqa: E501
167+
result_type (str): [optional] if omitted the server will use the default value of "binary_classification" # noqa: E501
164168
from_edge (bool): [optional] # noqa: E501
165169
"""
166170

@@ -252,7 +256,7 @@ def __init__(self, label, *args, **kwargs): # noqa: E501
252256
_visited_composed_classes = (Animal,)
253257
confidence (float, none_type): [optional] # noqa: E501
254258
source (str): [optional] # noqa: E501
255-
result_type (str): [optional] # noqa: E501
259+
result_type (str): [optional] if omitted the server will use the default value of "binary_classification" # noqa: E501
256260
from_edge (bool): [optional] # noqa: E501
257261
"""
258262

generated/groundlight_openapi_client/model/bounding_box_result.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ class BoundingBoxResult(ModelNormal):
5353
as additional properties values.
5454
"""
5555

56-
allowed_values = {}
56+
allowed_values = {
57+
("result_type",): {
58+
"BOUNDING_BOX": "bounding_box",
59+
},
60+
}
5761

5862
validations = {
5963
("confidence",): {
@@ -160,7 +164,7 @@ def _from_openapi_data(cls, label, *args, **kwargs): # noqa: E501
160164
_visited_composed_classes = (Animal,)
161165
confidence (float, none_type): [optional] # noqa: E501
162166
source (str): [optional] # noqa: E501
163-
result_type (str): [optional] # noqa: E501
167+
result_type (str): [optional] if omitted the server will use the default value of "bounding_box" # noqa: E501
164168
from_edge (bool): [optional] # noqa: E501
165169
"""
166170

@@ -252,7 +256,7 @@ def __init__(self, label, *args, **kwargs): # noqa: E501
252256
_visited_composed_classes = (Animal,)
253257
confidence (float, none_type): [optional] # noqa: E501
254258
source (str): [optional] # noqa: E501
255-
result_type (str): [optional] # noqa: E501
259+
result_type (str): [optional] if omitted the server will use the default value of "bounding_box" # noqa: E501
256260
from_edge (bool): [optional] # noqa: E501
257261
"""
258262

generated/groundlight_openapi_client/model/counting_result.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ class CountingResult(ModelNormal):
5353
as additional properties values.
5454
"""
5555

56-
allowed_values = {}
56+
allowed_values = {
57+
("result_type",): {
58+
"COUNTING": "counting",
59+
},
60+
}
5761

5862
validations = {
5963
("count",): {
@@ -168,7 +172,7 @@ def _from_openapi_data(cls, count, *args, **kwargs): # noqa: E501
168172
_visited_composed_classes = (Animal,)
169173
confidence (float, none_type): [optional] # noqa: E501
170174
source (str): [optional] # noqa: E501
171-
result_type (str): [optional] # noqa: E501
175+
result_type (str): [optional] if omitted the server will use the default value of "counting" # noqa: E501
172176
from_edge (bool): [optional] # noqa: E501
173177
greater_than_max (bool): [optional] # noqa: E501
174178
"""
@@ -261,7 +265,7 @@ def __init__(self, count, *args, **kwargs): # noqa: E501
261265
_visited_composed_classes = (Animal,)
262266
confidence (float, none_type): [optional] # noqa: E501
263267
source (str): [optional] # noqa: E501
264-
result_type (str): [optional] # noqa: E501
268+
result_type (str): [optional] if omitted the server will use the default value of "counting" # noqa: E501
265269
from_edge (bool): [optional] # noqa: E501
266270
greater_than_max (bool): [optional] # noqa: E501
267271
"""

0 commit comments

Comments
 (0)