arthur-client 1.4.1232__py3-none-any.whl → 1.4.1234__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- arthur_client/api_bindings/__init__.py +13 -1
- arthur_client/api_bindings/api/__init__.py +1 -0
- arthur_client/api_bindings/api/custom_aggregations_v1_api.py +1477 -0
- arthur_client/api_bindings/docs/AggregationSpecSchemaInitArgsInner.md +2 -2
- arthur_client/api_bindings/docs/BaseColumnParameterSchema.md +36 -0
- arthur_client/api_bindings/docs/BaseColumnParameterSchemaAllowedColumnTypesInner.md +31 -0
- arthur_client/api_bindings/docs/BaseDatasetParameterSchema.md +33 -0
- arthur_client/api_bindings/docs/BaseLiteralParameterSchema.md +33 -0
- arthur_client/api_bindings/docs/CustomAggregationSpecSchema.md +38 -0
- arthur_client/api_bindings/docs/CustomAggregationSpecSchemaAggregateArgsInner.md +38 -0
- arthur_client/api_bindings/docs/CustomAggregationsV1Api.md +410 -0
- arthur_client/api_bindings/docs/Items1.md +1 -1
- arthur_client/api_bindings/docs/MetricsColumnListParameterSchema.md +2 -2
- arthur_client/api_bindings/docs/MetricsColumnParameterSchema.md +2 -2
- arthur_client/api_bindings/docs/MetricsDatasetParameterSchema.md +1 -1
- arthur_client/api_bindings/docs/MetricsLiteralParameterSchema.md +1 -1
- arthur_client/api_bindings/docs/ObjectType.md +1 -1
- arthur_client/api_bindings/docs/PermissionName.md +10 -0
- arthur_client/api_bindings/docs/PostCustomAggregationSpecSchema.md +33 -0
- arthur_client/api_bindings/docs/PutCustomAggregationSpecSchema.md +33 -0
- arthur_client/api_bindings/docs/ReportedCustomAggregation.md +34 -0
- arthur_client/api_bindings/docs/ResourceKind.md +2 -0
- arthur_client/api_bindings/docs/RuleType.md +0 -4
- arthur_client/api_bindings/docs/ValidationOutcome.md +13 -0
- arthur_client/api_bindings/docs/ValidationResult.md +31 -0
- arthur_client/api_bindings/docs/ValidationResults.md +30 -0
- arthur_client/api_bindings/models/__init__.py +12 -1
- arthur_client/api_bindings/models/base_column_parameter_schema.py +125 -0
- arthur_client/api_bindings/models/{metrics_column_list_parameter_schema_allowed_column_types_inner.py → base_column_parameter_schema_allowed_column_types_inner.py} +7 -7
- arthur_client/api_bindings/models/base_dataset_parameter_schema.py +111 -0
- arthur_client/api_bindings/models/base_literal_parameter_schema.py +106 -0
- arthur_client/api_bindings/models/custom_aggregation_spec_schema.py +126 -0
- arthur_client/api_bindings/models/custom_aggregation_spec_schema_aggregate_args_inner.py +149 -0
- arthur_client/api_bindings/models/metrics_column_list_parameter_schema.py +7 -7
- arthur_client/api_bindings/models/metrics_column_parameter_schema.py +7 -7
- arthur_client/api_bindings/models/metrics_dataset_parameter_schema.py +4 -4
- arthur_client/api_bindings/models/metrics_literal_parameter_schema.py +4 -4
- arthur_client/api_bindings/models/object_type.py +3 -3
- arthur_client/api_bindings/models/permission_name.py +5 -0
- arthur_client/api_bindings/models/post_custom_aggregation_spec_schema.py +111 -0
- arthur_client/api_bindings/models/put_custom_aggregation_spec_schema.py +111 -0
- arthur_client/api_bindings/models/reported_custom_aggregation.py +98 -0
- arthur_client/api_bindings/models/resource_kind.py +1 -0
- arthur_client/api_bindings/models/rule_type.py +0 -2
- arthur_client/api_bindings/models/validation_outcome.py +37 -0
- arthur_client/api_bindings/models/validation_result.py +90 -0
- arthur_client/api_bindings/models/validation_results.py +95 -0
- arthur_client/api_bindings/test/test_aggregation_spec_schema_init_args_inner.py +1 -1
- arthur_client/api_bindings/test/test_base_column_parameter_schema.py +66 -0
- arthur_client/api_bindings/test/{test_metrics_column_list_parameter_schema_allowed_column_types_inner.py → test_base_column_parameter_schema_allowed_column_types_inner.py} +11 -11
- arthur_client/api_bindings/test/test_base_dataset_parameter_schema.py +58 -0
- arthur_client/api_bindings/test/test_base_literal_parameter_schema.py +59 -0
- arthur_client/api_bindings/test/test_custom_aggregation_spec_schema.py +118 -0
- arthur_client/api_bindings/test/test_custom_aggregation_spec_schema_aggregate_args_inner.py +69 -0
- arthur_client/api_bindings/test/test_custom_aggregations_v1_api.py +66 -0
- arthur_client/api_bindings/test/test_metrics_column_list_parameter_schema.py +2 -2
- arthur_client/api_bindings/test/test_metrics_column_parameter_schema.py +2 -2
- arthur_client/api_bindings/test/test_metrics_dataset_parameter_schema.py +2 -2
- arthur_client/api_bindings/test/test_metrics_literal_parameter_schema.py +2 -2
- arthur_client/api_bindings/test/test_post_custom_aggregation_spec_schema.py +84 -0
- arthur_client/api_bindings/test/test_put_custom_aggregation_spec_schema.py +84 -0
- arthur_client/api_bindings/test/test_reported_custom_aggregation.py +66 -0
- arthur_client/api_bindings/test/test_validation_outcome.py +33 -0
- arthur_client/api_bindings/test/test_validation_result.py +54 -0
- arthur_client/api_bindings/test/test_validation_results.py +60 -0
- arthur_client/api_bindings_README.md +17 -1
- {arthur_client-1.4.1232.dist-info → arthur_client-1.4.1234.dist-info}/METADATA +1 -1
- {arthur_client-1.4.1232.dist-info → arthur_client-1.4.1234.dist-info}/RECORD +69 -33
- arthur_client/api_bindings/docs/MetricsColumnListParameterSchemaAllowedColumnTypesInner.md +0 -31
- {arthur_client-1.4.1232.dist-info → arthur_client-1.4.1234.dist-info}/WHEEL +0 -0
@@ -6,14 +6,14 @@
|
|
6
6
|
Name | Type | Description | Notes
|
7
7
|
------------ | ------------- | ------------- | -------------
|
8
8
|
**parameter_key** | **str** | Name of the parameter. |
|
9
|
-
**optional** | **bool** | Boolean denoting if the parameter is optional. | [optional] [default to False]
|
10
9
|
**friendly_name** | **str** | User facing name of the parameter. |
|
11
10
|
**description** | **str** | Description of the parameter. |
|
12
11
|
**tag_hints** | [**List[ScopeSchemaTag]**](ScopeSchemaTag.md) | List of tags that are applicable to this parameter. Datasets with columns that have matching tags can be inferred this way. | [optional] [default to []]
|
13
12
|
**source_dataset_parameter_key** | **str** | Name of the parameter that provides the dataset to be used for this column. |
|
14
|
-
**allowed_column_types** | [**List[
|
13
|
+
**allowed_column_types** | [**List[BaseColumnParameterSchemaAllowedColumnTypesInner]**](BaseColumnParameterSchemaAllowedColumnTypesInner.md) | | [optional]
|
15
14
|
**allow_any_column_type** | **bool** | Indicates if this metric parameter can accept any column type. | [optional] [default to False]
|
16
15
|
**parameter_type** | **str** | | [optional] [default to 'column']
|
16
|
+
**optional** | **bool** | Boolean denoting if the parameter is optional. | [optional] [default to False]
|
17
17
|
|
18
18
|
## Example
|
19
19
|
|
@@ -6,11 +6,11 @@
|
|
6
6
|
Name | Type | Description | Notes
|
7
7
|
------------ | ------------- | ------------- | -------------
|
8
8
|
**parameter_key** | **str** | Name of the parameter. |
|
9
|
-
**optional** | **bool** | Boolean denoting if the parameter is optional. | [optional] [default to False]
|
10
9
|
**friendly_name** | **str** | User facing name of the parameter. |
|
11
10
|
**description** | **str** | Description of the parameter. |
|
12
11
|
**parameter_type** | **str** | | [optional] [default to 'dataset']
|
13
12
|
**model_problem_type** | [**ModelProblemType**](ModelProblemType.md) | | [optional]
|
13
|
+
**optional** | **bool** | Boolean denoting if the parameter is optional. | [optional] [default to False]
|
14
14
|
|
15
15
|
## Example
|
16
16
|
|
@@ -6,11 +6,11 @@
|
|
6
6
|
Name | Type | Description | Notes
|
7
7
|
------------ | ------------- | ------------- | -------------
|
8
8
|
**parameter_key** | **str** | Name of the parameter. |
|
9
|
-
**optional** | **bool** | Boolean denoting if the parameter is optional. | [optional] [default to False]
|
10
9
|
**friendly_name** | **str** | User facing name of the parameter. |
|
11
10
|
**description** | **str** | Description of the parameter. |
|
12
11
|
**parameter_type** | **str** | | [optional] [default to 'literal']
|
13
12
|
**parameter_dtype** | [**DType**](DType.md) | Data type of the parameter. |
|
13
|
+
**optional** | **bool** | Boolean denoting if the parameter is optional. | [optional] [default to False]
|
14
14
|
|
15
15
|
## Example
|
16
16
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Name | Type | Description | Notes
|
7
7
|
------------ | ------------- | ------------- | -------------
|
8
|
-
**object** | [**Dict[str,
|
8
|
+
**object** | [**Dict[str, BaseColumnParameterSchemaAllowedColumnTypesInner]**](BaseColumnParameterSchemaAllowedColumnTypesInner.md) | |
|
9
9
|
|
10
10
|
## Example
|
11
11
|
|
@@ -87,6 +87,10 @@
|
|
87
87
|
|
88
88
|
* `WORKSPACE_TEST_WEBHOOK` (value: `'workspace_test_webhook'`)
|
89
89
|
|
90
|
+
* `WORKSPACE_CREATE_CUSTOM_AGGREGATION` (value: `'workspace_create_custom_aggregation'`)
|
91
|
+
|
92
|
+
* `WORKSPACE_VALIDATE_CUSTOM_AGGREGATION` (value: `'workspace_validate_custom_aggregation'`)
|
93
|
+
|
90
94
|
* `PROJECT_READ` (value: `'project_read'`)
|
91
95
|
|
92
96
|
* `PROJECT_UPDATE` (value: `'project_update'`)
|
@@ -267,6 +271,12 @@
|
|
267
271
|
|
268
272
|
* `ROLE_READ` (value: `'role_read'`)
|
269
273
|
|
274
|
+
* `CUSTOM_AGGREGATION_READ` (value: `'custom_aggregation_read'`)
|
275
|
+
|
276
|
+
* `CUSTOM_AGGREGATION_PUT` (value: `'custom_aggregation_put'`)
|
277
|
+
|
278
|
+
* `CUSTOM_AGGREGATION_DELETE` (value: `'custom_aggregation_delete'`)
|
279
|
+
|
270
280
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
271
281
|
|
272
282
|
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# PostCustomAggregationSpecSchema
|
2
|
+
|
3
|
+
|
4
|
+
## Properties
|
5
|
+
|
6
|
+
Name | Type | Description | Notes
|
7
|
+
------------ | ------------- | ------------- | -------------
|
8
|
+
**name** | **str** | Name of the custom aggregation function. |
|
9
|
+
**description** | **str** | Description of the custom aggregation function and what it aggregates. |
|
10
|
+
**reported_aggregations** | [**List[ReportedCustomAggregation]**](ReportedCustomAggregation.md) | Metadata for every aggregation the custom aggregation reports. |
|
11
|
+
**aggregate_args** | [**List[CustomAggregationSpecSchemaAggregateArgsInner]**](CustomAggregationSpecSchemaAggregateArgsInner.md) | List of parameters to the custom aggregation's query function. |
|
12
|
+
**sql** | **str** | DuckDBSQL query for the custom aggregation. |
|
13
|
+
|
14
|
+
## Example
|
15
|
+
|
16
|
+
```python
|
17
|
+
from arthur_client.api_bindings.models.post_custom_aggregation_spec_schema import PostCustomAggregationSpecSchema
|
18
|
+
|
19
|
+
# TODO update the JSON string below
|
20
|
+
json = "{}"
|
21
|
+
# create an instance of PostCustomAggregationSpecSchema from a JSON string
|
22
|
+
post_custom_aggregation_spec_schema_instance = PostCustomAggregationSpecSchema.from_json(json)
|
23
|
+
# print the JSON string representation of the object
|
24
|
+
print(PostCustomAggregationSpecSchema.to_json())
|
25
|
+
|
26
|
+
# convert the object into a dict
|
27
|
+
post_custom_aggregation_spec_schema_dict = post_custom_aggregation_spec_schema_instance.to_dict()
|
28
|
+
# create an instance of PostCustomAggregationSpecSchema from a dict
|
29
|
+
post_custom_aggregation_spec_schema_from_dict = PostCustomAggregationSpecSchema.from_dict(post_custom_aggregation_spec_schema_dict)
|
30
|
+
```
|
31
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
32
|
+
|
33
|
+
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# PutCustomAggregationSpecSchema
|
2
|
+
|
3
|
+
|
4
|
+
## Properties
|
5
|
+
|
6
|
+
Name | Type | Description | Notes
|
7
|
+
------------ | ------------- | ------------- | -------------
|
8
|
+
**name** | **str** | Name of the custom aggregation function. |
|
9
|
+
**description** | **str** | Description of the custom aggregation function and what it aggregates. |
|
10
|
+
**reported_aggregations** | [**List[ReportedCustomAggregation]**](ReportedCustomAggregation.md) | Metadata for every aggregation the custom aggregation reports. |
|
11
|
+
**aggregate_args** | [**List[CustomAggregationSpecSchemaAggregateArgsInner]**](CustomAggregationSpecSchemaAggregateArgsInner.md) | List of parameters to the custom aggregation's query function. |
|
12
|
+
**sql** | **str** | DuckDBSQL query for the custom aggregation. |
|
13
|
+
|
14
|
+
## Example
|
15
|
+
|
16
|
+
```python
|
17
|
+
from arthur_client.api_bindings.models.put_custom_aggregation_spec_schema import PutCustomAggregationSpecSchema
|
18
|
+
|
19
|
+
# TODO update the JSON string below
|
20
|
+
json = "{}"
|
21
|
+
# create an instance of PutCustomAggregationSpecSchema from a JSON string
|
22
|
+
put_custom_aggregation_spec_schema_instance = PutCustomAggregationSpecSchema.from_json(json)
|
23
|
+
# print the JSON string representation of the object
|
24
|
+
print(PutCustomAggregationSpecSchema.to_json())
|
25
|
+
|
26
|
+
# convert the object into a dict
|
27
|
+
put_custom_aggregation_spec_schema_dict = put_custom_aggregation_spec_schema_instance.to_dict()
|
28
|
+
# create an instance of PutCustomAggregationSpecSchema from a dict
|
29
|
+
put_custom_aggregation_spec_schema_from_dict = PutCustomAggregationSpecSchema.from_dict(put_custom_aggregation_spec_schema_dict)
|
30
|
+
```
|
31
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
32
|
+
|
33
|
+
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# ReportedCustomAggregation
|
2
|
+
|
3
|
+
|
4
|
+
## Properties
|
5
|
+
|
6
|
+
Name | Type | Description | Notes
|
7
|
+
------------ | ------------- | ------------- | -------------
|
8
|
+
**metric_name** | **str** | Name of the reported aggregation metric. |
|
9
|
+
**description** | **str** | Description of the reported aggregation metric and what it aggregates. |
|
10
|
+
**value_column** | **str** | Name of the column returned from the SQL query holding the metric value. |
|
11
|
+
**timestamp_column** | **str** | Name of the column returned from the SQL query holding the timestamp buckets. |
|
12
|
+
**metric_kind** | [**AggregationMetricType**](AggregationMetricType.md) | Return type of the reported aggregation metric value. |
|
13
|
+
**dimension_columns** | **List[str]** | Name of any dimension columns returned from the SQL query. Max length is 1. |
|
14
|
+
|
15
|
+
## Example
|
16
|
+
|
17
|
+
```python
|
18
|
+
from arthur_client.api_bindings.models.reported_custom_aggregation import ReportedCustomAggregation
|
19
|
+
|
20
|
+
# TODO update the JSON string below
|
21
|
+
json = "{}"
|
22
|
+
# create an instance of ReportedCustomAggregation from a JSON string
|
23
|
+
reported_custom_aggregation_instance = ReportedCustomAggregation.from_json(json)
|
24
|
+
# print the JSON string representation of the object
|
25
|
+
print(ReportedCustomAggregation.to_json())
|
26
|
+
|
27
|
+
# convert the object into a dict
|
28
|
+
reported_custom_aggregation_dict = reported_custom_aggregation_instance.to_dict()
|
29
|
+
# create an instance of ReportedCustomAggregation from a dict
|
30
|
+
reported_custom_aggregation_from_dict = ReportedCustomAggregation.from_dict(reported_custom_aggregation_dict)
|
31
|
+
```
|
32
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
33
|
+
|
34
|
+
|
@@ -35,6 +35,8 @@
|
|
35
35
|
|
36
36
|
* `WEBHOOK` (value: `'webhook'`)
|
37
37
|
|
38
|
+
* `CUSTOM_AGGREGATION` (value: `'custom_aggregation'`)
|
39
|
+
|
38
40
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
39
41
|
|
40
42
|
|
@@ -5,12 +5,8 @@
|
|
5
5
|
|
6
6
|
* `KEYWORDRULE` (value: `'KeywordRule'`)
|
7
7
|
|
8
|
-
* `MODELHALLUCINATIONRULE` (value: `'ModelHallucinationRule'`)
|
9
|
-
|
10
8
|
* `MODELHALLUCINATIONRULEV2` (value: `'ModelHallucinationRuleV2'`)
|
11
9
|
|
12
|
-
* `MODELHALLUCINATIONRULEV3` (value: `'ModelHallucinationRuleV3'`)
|
13
|
-
|
14
10
|
* `MODELSENSITIVEDATARULE` (value: `'ModelSensitiveDataRule'`)
|
15
11
|
|
16
12
|
* `PIIDATARULE` (value: `'PIIDataRule'`)
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# ValidationOutcome
|
2
|
+
|
3
|
+
Generic class to indicate if a validation passed or failed.
|
4
|
+
|
5
|
+
## Enum
|
6
|
+
|
7
|
+
* `PASS` (value: `'pass'`)
|
8
|
+
|
9
|
+
* `FAIL` (value: `'fail'`)
|
10
|
+
|
11
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
12
|
+
|
13
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# ValidationResult
|
2
|
+
|
3
|
+
Generic class to indicate a single validation and its outcome.
|
4
|
+
|
5
|
+
## Properties
|
6
|
+
|
7
|
+
Name | Type | Description | Notes
|
8
|
+
------------ | ------------- | ------------- | -------------
|
9
|
+
**validation_description** | **str** | Description of validation requirement. |
|
10
|
+
**validation_outcome** | [**ValidationOutcome**](ValidationOutcome.md) | Outcome of the validation requirement. |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```python
|
15
|
+
from arthur_client.api_bindings.models.validation_result import ValidationResult
|
16
|
+
|
17
|
+
# TODO update the JSON string below
|
18
|
+
json = "{}"
|
19
|
+
# create an instance of ValidationResult from a JSON string
|
20
|
+
validation_result_instance = ValidationResult.from_json(json)
|
21
|
+
# print the JSON string representation of the object
|
22
|
+
print(ValidationResult.to_json())
|
23
|
+
|
24
|
+
# convert the object into a dict
|
25
|
+
validation_result_dict = validation_result_instance.to_dict()
|
26
|
+
# create an instance of ValidationResult from a dict
|
27
|
+
validation_result_from_dict = ValidationResult.from_dict(validation_result_dict)
|
28
|
+
```
|
29
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
30
|
+
|
31
|
+
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# ValidationResults
|
2
|
+
|
3
|
+
This class is a generic class for any endpoints returning multiple validation errors.
|
4
|
+
|
5
|
+
## Properties
|
6
|
+
|
7
|
+
Name | Type | Description | Notes
|
8
|
+
------------ | ------------- | ------------- | -------------
|
9
|
+
**validation_results** | [**List[ValidationResult]**](ValidationResult.md) | |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```python
|
14
|
+
from arthur_client.api_bindings.models.validation_results import ValidationResults
|
15
|
+
|
16
|
+
# TODO update the JSON string below
|
17
|
+
json = "{}"
|
18
|
+
# create an instance of ValidationResults from a JSON string
|
19
|
+
validation_results_instance = ValidationResults.from_json(json)
|
20
|
+
# print the JSON string representation of the object
|
21
|
+
print(ValidationResults.to_json())
|
22
|
+
|
23
|
+
# convert the object into a dict
|
24
|
+
validation_results_dict = validation_results_instance.to_dict()
|
25
|
+
# create an instance of ValidationResults from a dict
|
26
|
+
validation_results_from_dict = ValidationResults.from_dict(validation_results_dict)
|
27
|
+
```
|
28
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
29
|
+
|
30
|
+
|
@@ -31,6 +31,10 @@ from arthur_client.api_bindings.models.alert_webhook_called import AlertWebhookC
|
|
31
31
|
from arthur_client.api_bindings.models.available_dataset import AvailableDataset
|
32
32
|
from arthur_client.api_bindings.models.available_datasets_sort import AvailableDatasetsSort
|
33
33
|
from arthur_client.api_bindings.models.bad_request_error import BadRequestError
|
34
|
+
from arthur_client.api_bindings.models.base_column_parameter_schema import BaseColumnParameterSchema
|
35
|
+
from arthur_client.api_bindings.models.base_column_parameter_schema_allowed_column_types_inner import BaseColumnParameterSchemaAllowedColumnTypesInner
|
36
|
+
from arthur_client.api_bindings.models.base_dataset_parameter_schema import BaseDatasetParameterSchema
|
37
|
+
from arthur_client.api_bindings.models.base_literal_parameter_schema import BaseLiteralParameterSchema
|
34
38
|
from arthur_client.api_bindings.models.base_role import BaseRole
|
35
39
|
from arthur_client.api_bindings.models.bound_member import BoundMember
|
36
40
|
from arthur_client.api_bindings.models.bound_member_kind import BoundMemberKind
|
@@ -55,6 +59,8 @@ from arthur_client.api_bindings.models.create_model_link_task_job_spec import Cr
|
|
55
59
|
from arthur_client.api_bindings.models.create_model_task_job_spec import CreateModelTaskJobSpec
|
56
60
|
from arthur_client.api_bindings.models.created_alerts import CreatedAlerts
|
57
61
|
from arthur_client.api_bindings.models.credentials import Credentials
|
62
|
+
from arthur_client.api_bindings.models.custom_aggregation_spec_schema import CustomAggregationSpecSchema
|
63
|
+
from arthur_client.api_bindings.models.custom_aggregation_spec_schema_aggregate_args_inner import CustomAggregationSpecSchemaAggregateArgsInner
|
58
64
|
from arthur_client.api_bindings.models.d_type import DType
|
59
65
|
from arthur_client.api_bindings.models.data_plane import DataPlane
|
60
66
|
from arthur_client.api_bindings.models.data_plane_association import DataPlaneAssociation
|
@@ -127,7 +133,6 @@ from arthur_client.api_bindings.models.list_type import ListType
|
|
127
133
|
from arthur_client.api_bindings.models.metrics_arg_spec import MetricsArgSpec
|
128
134
|
from arthur_client.api_bindings.models.metrics_calculation_job_spec import MetricsCalculationJobSpec
|
129
135
|
from arthur_client.api_bindings.models.metrics_column_list_parameter_schema import MetricsColumnListParameterSchema
|
130
|
-
from arthur_client.api_bindings.models.metrics_column_list_parameter_schema_allowed_column_types_inner import MetricsColumnListParameterSchemaAllowedColumnTypesInner
|
131
136
|
from arthur_client.api_bindings.models.metrics_column_parameter_schema import MetricsColumnParameterSchema
|
132
137
|
from arthur_client.api_bindings.models.metrics_dataset_parameter_schema import MetricsDatasetParameterSchema
|
133
138
|
from arthur_client.api_bindings.models.metrics_literal_parameter_schema import MetricsLiteralParameterSchema
|
@@ -179,6 +184,7 @@ from arthur_client.api_bindings.models.post_alert import PostAlert
|
|
179
184
|
from arthur_client.api_bindings.models.post_alert_rule import PostAlertRule
|
180
185
|
from arthur_client.api_bindings.models.post_alerts import PostAlerts
|
181
186
|
from arthur_client.api_bindings.models.post_connector_spec import PostConnectorSpec
|
187
|
+
from arthur_client.api_bindings.models.post_custom_aggregation_spec_schema import PostCustomAggregationSpecSchema
|
182
188
|
from arthur_client.api_bindings.models.post_data_plane import PostDataPlane
|
183
189
|
from arthur_client.api_bindings.models.post_data_plane_association import PostDataPlaneAssociation
|
184
190
|
from arthur_client.api_bindings.models.post_data_retrieval_operation import PostDataRetrievalOperation
|
@@ -215,6 +221,7 @@ from arthur_client.api_bindings.models.project_bound_resource_metadata import Pr
|
|
215
221
|
from arthur_client.api_bindings.models.project_sort import ProjectSort
|
216
222
|
from arthur_client.api_bindings.models.put_available_dataset import PutAvailableDataset
|
217
223
|
from arthur_client.api_bindings.models.put_available_datasets import PutAvailableDatasets
|
224
|
+
from arthur_client.api_bindings.models.put_custom_aggregation_spec_schema import PutCustomAggregationSpecSchema
|
218
225
|
from arthur_client.api_bindings.models.put_dataset_schema import PutDatasetSchema
|
219
226
|
from arthur_client.api_bindings.models.put_job_state import PutJobState
|
220
227
|
from arthur_client.api_bindings.models.put_model_metric_spec import PutModelMetricSpec
|
@@ -225,6 +232,7 @@ from arthur_client.api_bindings.models.put_task_state_cache_request import PutTa
|
|
225
232
|
from arthur_client.api_bindings.models.regenerate_task_validation_key_job_spec import RegenerateTaskValidationKeyJobSpec
|
226
233
|
from arthur_client.api_bindings.models.regex_config import RegexConfig
|
227
234
|
from arthur_client.api_bindings.models.register_user import RegisterUser
|
235
|
+
from arthur_client.api_bindings.models.reported_custom_aggregation import ReportedCustomAggregation
|
228
236
|
from arthur_client.api_bindings.models.resource_kind import ResourceKind
|
229
237
|
from arthur_client.api_bindings.models.resource_list_aggregation_spec_schema import ResourceListAggregationSpecSchema
|
230
238
|
from arthur_client.api_bindings.models.resource_list_alert_rule import ResourceListAlertRule
|
@@ -284,6 +292,9 @@ from arthur_client.api_bindings.models.user_type import UserType
|
|
284
292
|
from arthur_client.api_bindings.models.validate_alert_rule_query_req import ValidateAlertRuleQueryReq
|
285
293
|
from arthur_client.api_bindings.models.validation_error import ValidationError
|
286
294
|
from arthur_client.api_bindings.models.validation_error_loc_inner import ValidationErrorLocInner
|
295
|
+
from arthur_client.api_bindings.models.validation_outcome import ValidationOutcome
|
296
|
+
from arthur_client.api_bindings.models.validation_result import ValidationResult
|
297
|
+
from arthur_client.api_bindings.models.validation_results import ValidationResults
|
287
298
|
from arthur_client.api_bindings.models.webhook import Webhook
|
288
299
|
from arthur_client.api_bindings.models.webhook_response import WebhookResponse
|
289
300
|
from arthur_client.api_bindings.models.webhook_result import WebhookResult
|
@@ -0,0 +1,125 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Arthur Scope
|
5
|
+
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
+
from arthur_client.api_bindings.models.base_column_parameter_schema_allowed_column_types_inner import BaseColumnParameterSchemaAllowedColumnTypesInner
|
23
|
+
from arthur_client.api_bindings.models.scope_schema_tag import ScopeSchemaTag
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class BaseColumnParameterSchema(BaseModel):
|
28
|
+
"""
|
29
|
+
BaseColumnParameterSchema
|
30
|
+
""" # noqa: E501
|
31
|
+
parameter_key: StrictStr = Field(description="Name of the parameter.")
|
32
|
+
friendly_name: StrictStr = Field(description="User facing name of the parameter.")
|
33
|
+
description: StrictStr = Field(description="Description of the parameter.")
|
34
|
+
tag_hints: Optional[List[ScopeSchemaTag]] = Field(default=None, description="List of tags that are applicable to this parameter. Datasets with columns that have matching tags can be inferred this way.")
|
35
|
+
source_dataset_parameter_key: StrictStr = Field(description="Name of the parameter that provides the dataset to be used for this column.")
|
36
|
+
allowed_column_types: Optional[List[BaseColumnParameterSchemaAllowedColumnTypesInner]] = None
|
37
|
+
allow_any_column_type: Optional[StrictBool] = Field(default=False, description="Indicates if this metric parameter can accept any column type.")
|
38
|
+
parameter_type: Optional[StrictStr] = 'column'
|
39
|
+
__properties: ClassVar[List[str]] = ["parameter_key", "friendly_name", "description", "tag_hints", "source_dataset_parameter_key", "allowed_column_types", "allow_any_column_type", "parameter_type"]
|
40
|
+
|
41
|
+
@field_validator('parameter_type')
|
42
|
+
def parameter_type_validate_enum(cls, value):
|
43
|
+
"""Validates the enum"""
|
44
|
+
if value is None:
|
45
|
+
return value
|
46
|
+
|
47
|
+
if value not in set(['column']):
|
48
|
+
raise ValueError("must be one of enum values ('column')")
|
49
|
+
return value
|
50
|
+
|
51
|
+
model_config = ConfigDict(
|
52
|
+
populate_by_name=True,
|
53
|
+
validate_assignment=True,
|
54
|
+
protected_namespaces=(),
|
55
|
+
)
|
56
|
+
|
57
|
+
|
58
|
+
def to_str(self) -> str:
|
59
|
+
"""Returns the string representation of the model using alias"""
|
60
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
61
|
+
|
62
|
+
def to_json(self) -> str:
|
63
|
+
"""Returns the JSON representation of the model using alias"""
|
64
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
65
|
+
return json.dumps(self.to_dict())
|
66
|
+
|
67
|
+
@classmethod
|
68
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
69
|
+
"""Create an instance of BaseColumnParameterSchema from a JSON string"""
|
70
|
+
return cls.from_dict(json.loads(json_str))
|
71
|
+
|
72
|
+
def to_dict(self) -> Dict[str, Any]:
|
73
|
+
"""Return the dictionary representation of the model using alias.
|
74
|
+
|
75
|
+
This has the following differences from calling pydantic's
|
76
|
+
`self.model_dump(by_alias=True)`:
|
77
|
+
|
78
|
+
* `None` is only added to the output dict for nullable fields that
|
79
|
+
were set at model initialization. Other fields with value `None`
|
80
|
+
are ignored.
|
81
|
+
"""
|
82
|
+
excluded_fields: Set[str] = set([
|
83
|
+
])
|
84
|
+
|
85
|
+
_dict = self.model_dump(
|
86
|
+
by_alias=True,
|
87
|
+
exclude=excluded_fields,
|
88
|
+
exclude_none=True,
|
89
|
+
)
|
90
|
+
# override the default output from pydantic by calling `to_dict()` of each item in allowed_column_types (list)
|
91
|
+
_items = []
|
92
|
+
if self.allowed_column_types:
|
93
|
+
for _item_allowed_column_types in self.allowed_column_types:
|
94
|
+
if _item_allowed_column_types:
|
95
|
+
_items.append(_item_allowed_column_types.to_dict())
|
96
|
+
_dict['allowed_column_types'] = _items
|
97
|
+
# set to None if allowed_column_types (nullable) is None
|
98
|
+
# and model_fields_set contains the field
|
99
|
+
if self.allowed_column_types is None and "allowed_column_types" in self.model_fields_set:
|
100
|
+
_dict['allowed_column_types'] = None
|
101
|
+
|
102
|
+
return _dict
|
103
|
+
|
104
|
+
@classmethod
|
105
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
106
|
+
"""Create an instance of BaseColumnParameterSchema from a dict"""
|
107
|
+
if obj is None:
|
108
|
+
return None
|
109
|
+
|
110
|
+
if not isinstance(obj, dict):
|
111
|
+
return cls.model_validate(obj)
|
112
|
+
|
113
|
+
_obj = cls.model_validate({
|
114
|
+
"parameter_key": obj.get("parameter_key"),
|
115
|
+
"friendly_name": obj.get("friendly_name"),
|
116
|
+
"description": obj.get("description"),
|
117
|
+
"tag_hints": obj.get("tag_hints"),
|
118
|
+
"source_dataset_parameter_key": obj.get("source_dataset_parameter_key"),
|
119
|
+
"allowed_column_types": [BaseColumnParameterSchemaAllowedColumnTypesInner.from_dict(_item) for _item in obj["allowed_column_types"]] if obj.get("allowed_column_types") is not None else None,
|
120
|
+
"allow_any_column_type": obj.get("allow_any_column_type") if obj.get("allow_any_column_type") is not None else False,
|
121
|
+
"parameter_type": obj.get("parameter_type") if obj.get("parameter_type") is not None else 'column'
|
122
|
+
})
|
123
|
+
return _obj
|
124
|
+
|
125
|
+
|
@@ -24,11 +24,11 @@ from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict
|
|
24
24
|
from typing_extensions import Literal, Self
|
25
25
|
from pydantic import Field
|
26
26
|
|
27
|
-
|
27
|
+
BASECOLUMNPARAMETERSCHEMAALLOWEDCOLUMNTYPESINNER_ANY_OF_SCHEMAS = ["ListType", "ObjectType", "ScalarType"]
|
28
28
|
|
29
|
-
class
|
29
|
+
class BaseColumnParameterSchemaAllowedColumnTypesInner(BaseModel):
|
30
30
|
"""
|
31
|
-
|
31
|
+
BaseColumnParameterSchemaAllowedColumnTypesInner
|
32
32
|
"""
|
33
33
|
|
34
34
|
# data type: ScalarType
|
@@ -60,7 +60,7 @@ class MetricsColumnListParameterSchemaAllowedColumnTypesInner(BaseModel):
|
|
60
60
|
|
61
61
|
@field_validator('actual_instance')
|
62
62
|
def actual_instance_must_validate_anyof(cls, v):
|
63
|
-
instance =
|
63
|
+
instance = BaseColumnParameterSchemaAllowedColumnTypesInner.model_construct()
|
64
64
|
error_messages = []
|
65
65
|
# validate data type: ScalarType
|
66
66
|
if not isinstance(v, ScalarType):
|
@@ -82,7 +82,7 @@ class MetricsColumnListParameterSchemaAllowedColumnTypesInner(BaseModel):
|
|
82
82
|
|
83
83
|
if error_messages:
|
84
84
|
# no match
|
85
|
-
raise ValueError("No match found when setting the actual_instance in
|
85
|
+
raise ValueError("No match found when setting the actual_instance in BaseColumnParameterSchemaAllowedColumnTypesInner with anyOf schemas: ListType, ObjectType, ScalarType. Details: " + ", ".join(error_messages))
|
86
86
|
else:
|
87
87
|
return v
|
88
88
|
|
@@ -116,7 +116,7 @@ class MetricsColumnListParameterSchemaAllowedColumnTypesInner(BaseModel):
|
|
116
116
|
|
117
117
|
if error_messages:
|
118
118
|
# no match
|
119
|
-
raise ValueError("No match found when deserializing the JSON string into
|
119
|
+
raise ValueError("No match found when deserializing the JSON string into BaseColumnParameterSchemaAllowedColumnTypesInner with anyOf schemas: ListType, ObjectType, ScalarType. Details: " + ", ".join(error_messages))
|
120
120
|
else:
|
121
121
|
return instance
|
122
122
|
|
@@ -147,5 +147,5 @@ class MetricsColumnListParameterSchemaAllowedColumnTypesInner(BaseModel):
|
|
147
147
|
from arthur_client.api_bindings.models.list_type import ListType
|
148
148
|
from arthur_client.api_bindings.models.object_type import ObjectType
|
149
149
|
# TODO: Rewrite to not use raise_errors
|
150
|
-
|
150
|
+
BaseColumnParameterSchemaAllowedColumnTypesInner.model_rebuild(raise_errors=False)
|
151
151
|
|
@@ -0,0 +1,111 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Arthur Scope
|
5
|
+
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
+
from arthur_client.api_bindings.models.model_problem_type import ModelProblemType
|
23
|
+
from typing import Optional, Set
|
24
|
+
from typing_extensions import Self
|
25
|
+
|
26
|
+
class BaseDatasetParameterSchema(BaseModel):
|
27
|
+
"""
|
28
|
+
BaseDatasetParameterSchema
|
29
|
+
""" # noqa: E501
|
30
|
+
parameter_key: StrictStr = Field(description="Name of the parameter.")
|
31
|
+
friendly_name: StrictStr = Field(description="User facing name of the parameter.")
|
32
|
+
description: StrictStr = Field(description="Description of the parameter.")
|
33
|
+
parameter_type: Optional[StrictStr] = 'dataset'
|
34
|
+
model_problem_type: Optional[ModelProblemType] = None
|
35
|
+
__properties: ClassVar[List[str]] = ["parameter_key", "friendly_name", "description", "parameter_type", "model_problem_type"]
|
36
|
+
|
37
|
+
@field_validator('parameter_type')
|
38
|
+
def parameter_type_validate_enum(cls, value):
|
39
|
+
"""Validates the enum"""
|
40
|
+
if value is None:
|
41
|
+
return value
|
42
|
+
|
43
|
+
if value not in set(['dataset']):
|
44
|
+
raise ValueError("must be one of enum values ('dataset')")
|
45
|
+
return value
|
46
|
+
|
47
|
+
model_config = ConfigDict(
|
48
|
+
populate_by_name=True,
|
49
|
+
validate_assignment=True,
|
50
|
+
protected_namespaces=(),
|
51
|
+
)
|
52
|
+
|
53
|
+
|
54
|
+
def to_str(self) -> str:
|
55
|
+
"""Returns the string representation of the model using alias"""
|
56
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
57
|
+
|
58
|
+
def to_json(self) -> str:
|
59
|
+
"""Returns the JSON representation of the model using alias"""
|
60
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
61
|
+
return json.dumps(self.to_dict())
|
62
|
+
|
63
|
+
@classmethod
|
64
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
65
|
+
"""Create an instance of BaseDatasetParameterSchema from a JSON string"""
|
66
|
+
return cls.from_dict(json.loads(json_str))
|
67
|
+
|
68
|
+
def to_dict(self) -> Dict[str, Any]:
|
69
|
+
"""Return the dictionary representation of the model using alias.
|
70
|
+
|
71
|
+
This has the following differences from calling pydantic's
|
72
|
+
`self.model_dump(by_alias=True)`:
|
73
|
+
|
74
|
+
* `None` is only added to the output dict for nullable fields that
|
75
|
+
were set at model initialization. Other fields with value `None`
|
76
|
+
are ignored.
|
77
|
+
"""
|
78
|
+
excluded_fields: Set[str] = set([
|
79
|
+
])
|
80
|
+
|
81
|
+
_dict = self.model_dump(
|
82
|
+
by_alias=True,
|
83
|
+
exclude=excluded_fields,
|
84
|
+
exclude_none=True,
|
85
|
+
)
|
86
|
+
# set to None if model_problem_type (nullable) is None
|
87
|
+
# and model_fields_set contains the field
|
88
|
+
if self.model_problem_type is None and "model_problem_type" in self.model_fields_set:
|
89
|
+
_dict['model_problem_type'] = None
|
90
|
+
|
91
|
+
return _dict
|
92
|
+
|
93
|
+
@classmethod
|
94
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
95
|
+
"""Create an instance of BaseDatasetParameterSchema from a dict"""
|
96
|
+
if obj is None:
|
97
|
+
return None
|
98
|
+
|
99
|
+
if not isinstance(obj, dict):
|
100
|
+
return cls.model_validate(obj)
|
101
|
+
|
102
|
+
_obj = cls.model_validate({
|
103
|
+
"parameter_key": obj.get("parameter_key"),
|
104
|
+
"friendly_name": obj.get("friendly_name"),
|
105
|
+
"description": obj.get("description"),
|
106
|
+
"parameter_type": obj.get("parameter_type") if obj.get("parameter_type") is not None else 'dataset',
|
107
|
+
"model_problem_type": obj.get("model_problem_type")
|
108
|
+
})
|
109
|
+
return _obj
|
110
|
+
|
111
|
+
|