From 4505df751cfdefccb0e9889e4e546b861e463453 Mon Sep 17 00:00:00 2001 From: Rafal Jankowski Date: Tue, 20 Aug 2024 12:17:31 +0200 Subject: [PATCH 1/4] Protobuf messages regenerated --- src/neptune_api/proto/google_rpc/code_pb2.py | 4 +- .../proto/neptune_pb/ingest/v1/common_pb2.py | 40 ++++++++-------- .../proto/neptune_pb/ingest/v1/common_pb2.pyi | 40 ++++++++++++++-- .../neptune_pb/ingest/v1/pub/__init__.pyi | 1 + .../neptune_pb/ingest/v1/pub/client_pb2.py | 15 ++++-- .../neptune_pb/ingest/v1/pub/client_pb2.pyi | 41 +++++++++++++++- .../neptune_pb/ingest/v1/pub/ingest_pb2.py | 4 +- .../ingest/v1/pub/request_status_pb2.py | 18 +++++++ .../ingest/v1/pub/request_status_pb2.pyi | 47 +++++++++++++++++++ 9 files changed, 178 insertions(+), 32 deletions(-) create mode 100644 src/neptune_api/proto/neptune_pb/ingest/v1/pub/request_status_pb2.py create mode 100644 src/neptune_api/proto/neptune_pb/ingest/v1/pub/request_status_pb2.pyi diff --git a/src/neptune_api/proto/google_rpc/code_pb2.py b/src/neptune_api/proto/google_rpc/code_pb2.py index 22d305f..1a51254 100644 --- a/src/neptune_api/proto/google_rpc/code_pb2.py +++ b/src/neptune_api/proto/google_rpc/code_pb2.py @@ -8,8 +8,8 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'google_rpc.code_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'\n\x0ecom.google.rpcB\tCodeProtoP\x01Z3google.golang.org/genproto/googleapis/rpc/code;code\xa2\x02\x03RPC' _globals['_CODE']._serialized_start = 38 _globals['_CODE']._serialized_end = 349 \ No newline at end of file diff --git a/src/neptune_api/proto/neptune_pb/ingest/v1/common_pb2.py b/src/neptune_api/proto/neptune_pb/ingest/v1/common_pb2.py index 2c7f3c4..1fee543 100644 --- a/src/neptune_api/proto/neptune_pb/ingest/v1/common_pb2.py +++ b/src/neptune_api/proto/neptune_pb/ingest/v1/common_pb2.py @@ -5,23 +5,23 @@ from google.protobuf.internal import builder as _builder _sym_db = _symbol_database.Default() from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!neptune_pb/ingest/v1/common.proto\x12\x11neptune.ingest.v1\x1a\x1fgoogle/protobuf/timestamp.proto"$\n\x04Step\x12\r\n\x05whole\x18\x01 \x01(\x04\x12\r\n\x05micro\x18\x02 \x01(\x04"a\n\tForkPoint\x12\x16\n\x0eparent_project\x18\x01 \x01(\t\x12\x15\n\rparent_run_id\x18\x02 \x01(\t\x12%\n\x04step\x18\x04 \x01(\x0b2\x17.neptune.ingest.v1.Step"\x1b\n\tStringSet\x12\x0e\n\x06values\x18\x01 \x03(\t"\xbb\x01\n\x05Value\x12\x11\n\x07float64\x18\x01 \x01(\x01H\x00\x12\x0f\n\x05int64\x18\x03 \x01(\x03H\x00\x12\x0e\n\x04bool\x18\x05 \x01(\x08H\x00\x12\x10\n\x06string\x18\x06 \x01(\tH\x00\x12/\n\ttimestamp\x18\x08 \x01(\x0b2\x1a.google.protobuf.TimestampH\x00\x122\n\nstring_set\x18\x0c \x01(\x0b2\x1c.neptune.ingest.v1.StringSetH\x00B\x07\n\x05value"\xa2\x01\n\x0fModifyStringSet\x12>\n\x06values\x18\x01 \x03(\x0b2..neptune.ingest.v1.ModifyStringSet.ValuesEntry\x1aO\n\x0bValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12/\n\x05value\x18\x02 \x01(\x0e2 .neptune.ingest.v1.SET_OPERATION:\x028\x01"I\n\tModifySet\x124\n\x06string\x18\x01 \x01(\x0b2".neptune.ingest.v1.ModifyStringSetH\x00B\x06\n\x04type"\x97\x02\n\x03Run\x12\x13\n\x06run_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rexperiment_id\x18\x05 \x01(\tH\x01\x88\x01\x01\x120\n\nfork_point\x18\x02 \x01(\x0b2\x1c.neptune.ingest.v1.ForkPoint\x12\x13\n\x06family\x18\x04 \x01(\tH\x02\x88\x01\x01\x126\n\rcreation_time\x18\x03 \x01(\x0b2\x1a.google.protobuf.TimestampH\x03\x88\x01\x01\x12\x17\n\nrequest_id\x18\x06 \x01(\tH\x04\x88\x01\x01B\t\n\x07_run_idB\x10\n\x0e_experiment_idB\t\n\x07_familyB\x10\n\x0e_creation_timeB\r\n\x0b_request_id"\xc3\x04\n\x11UpdateRunSnapshot\x12%\n\x04step\x18\x01 \x01(\x0b2\x17.neptune.ingest.v1.Step\x12-\n\ttimestamp\x18\x02 \x01(\x0b2\x1a.google.protobuf.Timestamp\x12@\n\x06assign\x18\x04 \x03(\x0b20.neptune.ingest.v1.UpdateRunSnapshot.AssignEntry\x12I\n\x0bmodify_sets\x18\x05 \x03(\x0b24.neptune.ingest.v1.UpdateRunSnapshot.ModifySetsEntry\x12@\n\x06append\x18\x08 \x03(\x0b20.neptune.ingest.v1.UpdateRunSnapshot.AppendEntry\x12\x17\n\nrequest_id\x18\t \x01(\tH\x00\x88\x01\x01\x1aG\n\x0bAssignEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\'\n\x05value\x18\x02 \x01(\x0b2\x18.neptune.ingest.v1.Value:\x028\x01\x1aO\n\x0fModifySetsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12+\n\x05value\x18\x02 \x01(\x0b2\x1c.neptune.ingest.v1.ModifySet:\x028\x01\x1aG\n\x0bAppendEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\'\n\x05value\x18\x02 \x01(\x0b2\x18.neptune.ingest.v1.Value:\x028\x01B\r\n\x0b_request_id*.\n\rSET_OPERATION\x12\x08\n\x04NOOP\x10\x00\x12\x07\n\x03ADD\x10\x01\x12\n\n\x06REMOVE\x10\x02B5\n$ml.neptune.leaderboard.api.ingest.v1B\x0bCommonProtoP\x01b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!neptune_pb/ingest/v1/common.proto\x12\x11neptune.ingest.v1\x1a\x1fgoogle/protobuf/timestamp.proto"$\n\x04Step\x12\r\n\x05whole\x18\x01 \x01(\x04\x12\r\n\x05micro\x18\x02 \x01(\x04"a\n\tForkPoint\x12\x16\n\x0eparent_project\x18\x01 \x01(\t\x12\x15\n\rparent_run_id\x18\x02 \x01(\t\x12%\n\x04step\x18\x04 \x01(\x0b2\x17.neptune.ingest.v1.Step"\x1b\n\tStringSet\x12\x0e\n\x06values\x18\x01 \x03(\t"\xbb\x01\n\x05Value\x12\x11\n\x07float64\x18\x01 \x01(\x01H\x00\x12\x0f\n\x05int64\x18\x03 \x01(\x03H\x00\x12\x0e\n\x04bool\x18\x05 \x01(\x08H\x00\x12\x10\n\x06string\x18\x06 \x01(\tH\x00\x12/\n\ttimestamp\x18\x08 \x01(\x0b2\x1a.google.protobuf.TimestampH\x00\x122\n\nstring_set\x18\x0c \x01(\x0b2\x1c.neptune.ingest.v1.StringSetH\x00B\x07\n\x05value"\xa2\x01\n\x0fModifyStringSet\x12>\n\x06values\x18\x01 \x03(\x0b2..neptune.ingest.v1.ModifyStringSet.ValuesEntry\x1aO\n\x0bValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12/\n\x05value\x18\x02 \x01(\x0e2 .neptune.ingest.v1.SET_OPERATION:\x028\x01"I\n\tModifySet\x124\n\x06string\x18\x01 \x01(\x0b2".neptune.ingest.v1.ModifyStringSetH\x00B\x06\n\x04type"F\n\x05Owner\x12\x11\n\x07user_id\x18\x01 \x01(\tH\x00\x12\x1c\n\x12service_account_id\x18\x02 \x01(\tH\x00B\x0c\n\nowner_type"\xcf\x02\n\x03Run\x12\x13\n\x06run_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rexperiment_id\x18\x05 \x01(\tH\x01\x88\x01\x01\x120\n\nfork_point\x18\x02 \x01(\x0b2\x1c.neptune.ingest.v1.ForkPoint\x12\x13\n\x06family\x18\x04 \x01(\tH\x02\x88\x01\x01\x126\n\rcreation_time\x18\x03 \x01(\x0b2\x1a.google.protobuf.TimestampH\x03\x88\x01\x01\x12,\n\x05owner\x18\x06 \x01(\x0b2\x18.neptune.ingest.v1.OwnerH\x04\x88\x01\x01\x12\x17\n\nrequest_id\x18\x07 \x01(\tH\x05\x88\x01\x01B\t\n\x07_run_idB\x10\n\x0e_experiment_idB\t\n\x07_familyB\x10\n\x0e_creation_timeB\x08\n\x06_ownerB\r\n\x0b_request_id"\xc3\x04\n\x11UpdateRunSnapshot\x12%\n\x04step\x18\x01 \x01(\x0b2\x17.neptune.ingest.v1.Step\x12-\n\ttimestamp\x18\x02 \x01(\x0b2\x1a.google.protobuf.Timestamp\x12@\n\x06assign\x18\x04 \x03(\x0b20.neptune.ingest.v1.UpdateRunSnapshot.AssignEntry\x12I\n\x0bmodify_sets\x18\x05 \x03(\x0b24.neptune.ingest.v1.UpdateRunSnapshot.ModifySetsEntry\x12@\n\x06append\x18\x08 \x03(\x0b20.neptune.ingest.v1.UpdateRunSnapshot.AppendEntry\x12\x17\n\nrequest_id\x18\t \x01(\tH\x00\x88\x01\x01\x1aG\n\x0bAssignEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\'\n\x05value\x18\x02 \x01(\x0b2\x18.neptune.ingest.v1.Value:\x028\x01\x1aO\n\x0fModifySetsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12+\n\x05value\x18\x02 \x01(\x0b2\x1c.neptune.ingest.v1.ModifySet:\x028\x01\x1aG\n\x0bAppendEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\'\n\x05value\x18\x02 \x01(\x0b2\x18.neptune.ingest.v1.Value:\x028\x01B\r\n\x0b_request_id*.\n\rSET_OPERATION\x12\x08\n\x04NOOP\x10\x00\x12\x07\n\x03ADD\x10\x01\x12\n\n\x06REMOVE\x10\x02B5\n$ml.neptune.leaderboard.api.ingest.v1B\x0bCommonProtoP\x01b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'neptune_pb.ingest.v1.common_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'\n$ml.neptune.leaderboard.api.ingest.v1B\x0bCommonProtoP\x01' - _globals['_MODIFYSTRINGSET_VALUESENTRY']._options = None + _globals['_MODIFYSTRINGSET_VALUESENTRY']._loaded_options = None _globals['_MODIFYSTRINGSET_VALUESENTRY']._serialized_options = b'8\x01' - _globals['_UPDATERUNSNAPSHOT_ASSIGNENTRY']._options = None + _globals['_UPDATERUNSNAPSHOT_ASSIGNENTRY']._loaded_options = None _globals['_UPDATERUNSNAPSHOT_ASSIGNENTRY']._serialized_options = b'8\x01' - _globals['_UPDATERUNSNAPSHOT_MODIFYSETSENTRY']._options = None + _globals['_UPDATERUNSNAPSHOT_MODIFYSETSENTRY']._loaded_options = None _globals['_UPDATERUNSNAPSHOT_MODIFYSETSENTRY']._serialized_options = b'8\x01' - _globals['_UPDATERUNSNAPSHOT_APPENDENTRY']._options = None + _globals['_UPDATERUNSNAPSHOT_APPENDENTRY']._loaded_options = None _globals['_UPDATERUNSNAPSHOT_APPENDENTRY']._serialized_options = b'8\x01' - _globals['_SET_OPERATION']._serialized_start = 1549 - _globals['_SET_OPERATION']._serialized_end = 1595 + _globals['_SET_OPERATION']._serialized_start = 1677 + _globals['_SET_OPERATION']._serialized_end = 1723 _globals['_STEP']._serialized_start = 89 _globals['_STEP']._serialized_end = 125 _globals['_FORKPOINT']._serialized_start = 127 @@ -36,13 +36,15 @@ _globals['_MODIFYSTRINGSET_VALUESENTRY']._serialized_end = 608 _globals['_MODIFYSET']._serialized_start = 610 _globals['_MODIFYSET']._serialized_end = 683 - _globals['_RUN']._serialized_start = 686 - _globals['_RUN']._serialized_end = 965 - _globals['_UPDATERUNSNAPSHOT']._serialized_start = 968 - _globals['_UPDATERUNSNAPSHOT']._serialized_end = 1547 - _globals['_UPDATERUNSNAPSHOT_ASSIGNENTRY']._serialized_start = 1307 - _globals['_UPDATERUNSNAPSHOT_ASSIGNENTRY']._serialized_end = 1378 - _globals['_UPDATERUNSNAPSHOT_MODIFYSETSENTRY']._serialized_start = 1380 - _globals['_UPDATERUNSNAPSHOT_MODIFYSETSENTRY']._serialized_end = 1459 - _globals['_UPDATERUNSNAPSHOT_APPENDENTRY']._serialized_start = 1461 - _globals['_UPDATERUNSNAPSHOT_APPENDENTRY']._serialized_end = 1532 \ No newline at end of file + _globals['_OWNER']._serialized_start = 685 + _globals['_OWNER']._serialized_end = 755 + _globals['_RUN']._serialized_start = 758 + _globals['_RUN']._serialized_end = 1093 + _globals['_UPDATERUNSNAPSHOT']._serialized_start = 1096 + _globals['_UPDATERUNSNAPSHOT']._serialized_end = 1675 + _globals['_UPDATERUNSNAPSHOT_ASSIGNENTRY']._serialized_start = 1435 + _globals['_UPDATERUNSNAPSHOT_ASSIGNENTRY']._serialized_end = 1506 + _globals['_UPDATERUNSNAPSHOT_MODIFYSETSENTRY']._serialized_start = 1508 + _globals['_UPDATERUNSNAPSHOT_MODIFYSETSENTRY']._serialized_end = 1587 + _globals['_UPDATERUNSNAPSHOT_APPENDENTRY']._serialized_start = 1589 + _globals['_UPDATERUNSNAPSHOT_APPENDENTRY']._serialized_end = 1660 \ No newline at end of file diff --git a/src/neptune_api/proto/neptune_pb/ingest/v1/common_pb2.pyi b/src/neptune_api/proto/neptune_pb/ingest/v1/common_pb2.pyi index 770394d..0fe755e 100644 --- a/src/neptune_api/proto/neptune_pb/ingest/v1/common_pb2.pyi +++ b/src/neptune_api/proto/neptune_pb/ingest/v1/common_pb2.pyi @@ -191,6 +191,29 @@ class ModifySet(google.protobuf.message.Message): ... global___ModifySet = ModifySet +@typing_extensions.final +class Owner(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + USER_ID_FIELD_NUMBER: builtins.int + SERVICE_ACCOUNT_ID_FIELD_NUMBER: builtins.int + user_id: builtins.str + 'Id of a person\'s account. It will appear in the "sys/owner" field.' + service_account_id: builtins.str + 'Id of a service account used for automation.\n When set to "myaccount", in the "sys/owner" it will appear as "myaccount@myorganization".\n ' + + def __init__(self, *, user_id: builtins.str=..., service_account_id: builtins.str=...) -> None: + ... + + def HasField(self, field_name: typing_extensions.Literal['owner_type', b'owner_type', 'service_account_id', b'service_account_id', 'user_id', b'user_id']) -> builtins.bool: + ... + + def ClearField(self, field_name: typing_extensions.Literal['owner_type', b'owner_type', 'service_account_id', b'service_account_id', 'user_id', b'user_id']) -> None: + ... + + def WhichOneof(self, oneof_group: typing_extensions.Literal['owner_type', b'owner_type']) -> typing_extensions.Literal['user_id', 'service_account_id'] | None: + ... +global___Owner = Owner + @typing_extensions.final class Run(google.protobuf.message.Message): """CreateRun can be used to create a new run. This can be done in two ways: @@ -208,6 +231,7 @@ class Run(google.protobuf.message.Message): FORK_POINT_FIELD_NUMBER: builtins.int FAMILY_FIELD_NUMBER: builtins.int CREATION_TIME_FIELD_NUMBER: builtins.int + OWNER_FIELD_NUMBER: builtins.int REQUEST_ID_FIELD_NUMBER: builtins.int run_id: builtins.str 'Id of the run to be created. Optional if parent context has already specified run_id. If both are set, they\n must be equal, otherwise the operation will fail.\n ' @@ -228,16 +252,22 @@ class Run(google.protobuf.message.Message): for series. If not specified, server will use its current time instead when processing the request. """ + + @property + def owner(self) -> global___Owner: + """User that is the owner of the run/experiment being created. + If not specified, it will be set to a user named "unspecified". + """ request_id: builtins.str 'Optional. The request ID generated by the Neptune client, used for tracking outcome of run creation.' - def __init__(self, *, run_id: builtins.str | None=..., experiment_id: builtins.str | None=..., fork_point: global___ForkPoint | None=..., family: builtins.str | None=..., creation_time: google.protobuf.timestamp_pb2.Timestamp | None=..., request_id: builtins.str | None=...) -> None: + def __init__(self, *, run_id: builtins.str | None=..., experiment_id: builtins.str | None=..., fork_point: global___ForkPoint | None=..., family: builtins.str | None=..., creation_time: google.protobuf.timestamp_pb2.Timestamp | None=..., owner: global___Owner | None=..., request_id: builtins.str | None=...) -> None: ... - def HasField(self, field_name: typing_extensions.Literal['_creation_time', b'_creation_time', '_experiment_id', b'_experiment_id', '_family', b'_family', '_request_id', b'_request_id', '_run_id', b'_run_id', 'creation_time', b'creation_time', 'experiment_id', b'experiment_id', 'family', b'family', 'fork_point', b'fork_point', 'request_id', b'request_id', 'run_id', b'run_id']) -> builtins.bool: + def HasField(self, field_name: typing_extensions.Literal['_creation_time', b'_creation_time', '_experiment_id', b'_experiment_id', '_family', b'_family', '_owner', b'_owner', '_request_id', b'_request_id', '_run_id', b'_run_id', 'creation_time', b'creation_time', 'experiment_id', b'experiment_id', 'family', b'family', 'fork_point', b'fork_point', 'owner', b'owner', 'request_id', b'request_id', 'run_id', b'run_id']) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal['_creation_time', b'_creation_time', '_experiment_id', b'_experiment_id', '_family', b'_family', '_request_id', b'_request_id', '_run_id', b'_run_id', 'creation_time', b'creation_time', 'experiment_id', b'experiment_id', 'family', b'family', 'fork_point', b'fork_point', 'request_id', b'request_id', 'run_id', b'run_id']) -> None: + def ClearField(self, field_name: typing_extensions.Literal['_creation_time', b'_creation_time', '_experiment_id', b'_experiment_id', '_family', b'_family', '_owner', b'_owner', '_request_id', b'_request_id', '_run_id', b'_run_id', 'creation_time', b'creation_time', 'experiment_id', b'experiment_id', 'family', b'family', 'fork_point', b'fork_point', 'owner', b'owner', 'request_id', b'request_id', 'run_id', b'run_id']) -> None: ... @typing.overload @@ -252,6 +282,10 @@ class Run(google.protobuf.message.Message): def WhichOneof(self, oneof_group: typing_extensions.Literal['_family', b'_family']) -> typing_extensions.Literal['family'] | None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing_extensions.Literal['_owner', b'_owner']) -> typing_extensions.Literal['owner'] | None: + ... + @typing.overload def WhichOneof(self, oneof_group: typing_extensions.Literal['_request_id', b'_request_id']) -> typing_extensions.Literal['request_id'] | None: ... diff --git a/src/neptune_api/proto/neptune_pb/ingest/v1/pub/__init__.pyi b/src/neptune_api/proto/neptune_pb/ingest/v1/pub/__init__.pyi index 5895e3b..e574fee 100644 --- a/src/neptune_api/proto/neptune_pb/ingest/v1/pub/__init__.pyi +++ b/src/neptune_api/proto/neptune_pb/ingest/v1/pub/__init__.pyi @@ -1,2 +1,3 @@ from . import client_pb2 from . import ingest_pb2 +from . import request_status_pb2 diff --git a/src/neptune_api/proto/neptune_pb/ingest/v1/pub/client_pb2.py b/src/neptune_api/proto/neptune_pb/ingest/v1/pub/client_pb2.py index a8cd302..9b8efc9 100644 --- a/src/neptune_api/proto/neptune_pb/ingest/v1/pub/client_pb2.py +++ b/src/neptune_api/proto/neptune_pb/ingest/v1/pub/client_pb2.py @@ -4,12 +4,17 @@ from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder _sym_db = _symbol_database.Default() -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%neptune_pb/ingest/v1/pub/client.proto\x12\x15neptune.ingest.v1.pub"\x1a\n\tRequestId\x12\r\n\x05value\x18\x01 \x01(\tB3\n\x1cml.neptune.client.api.modelsB\x11ClientIngestProtoP\x01b\x06proto3') +from .....neptune_pb.ingest.v1.pub import request_status_pb2 as neptune__pb_dot_ingest_dot_v1_dot_pub_dot_request__status__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%neptune_pb/ingest/v1/pub/client.proto\x12\x15neptune.ingest.v1.pub\x1a-neptune_pb/ingest/v1/pub/request_status.proto"\x1a\n\tRequestId\x12\r\n\x05value\x18\x01 \x01(\t">\n\rRequestIdList\x12-\n\x03ids\x18\x01 \x03(\x0b2 .neptune.ingest.v1.pub.RequestId"K\n\x11BulkRequestStatus\x126\n\x08statuses\x18\x01 \x03(\x0b2$.neptune.ingest.v1.pub.RequestStatusB3\n\x1cml.neptune.client.api.modelsB\x11ClientIngestProtoP\x01b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'neptune_pb.ingest.v1.pub.client_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'\n\x1cml.neptune.client.api.modelsB\x11ClientIngestProtoP\x01' - _globals['_REQUESTID']._serialized_start = 64 - _globals['_REQUESTID']._serialized_end = 90 \ No newline at end of file + _globals['_REQUESTID']._serialized_start = 111 + _globals['_REQUESTID']._serialized_end = 137 + _globals['_REQUESTIDLIST']._serialized_start = 139 + _globals['_REQUESTIDLIST']._serialized_end = 201 + _globals['_BULKREQUESTSTATUS']._serialized_start = 203 + _globals['_BULKREQUESTSTATUS']._serialized_end = 278 \ No newline at end of file diff --git a/src/neptune_api/proto/neptune_pb/ingest/v1/pub/client_pb2.pyi b/src/neptune_api/proto/neptune_pb/ingest/v1/pub/client_pb2.pyi index 4d79be4..ac29287 100644 --- a/src/neptune_api/proto/neptune_pb/ingest/v1/pub/client_pb2.pyi +++ b/src/neptune_api/proto/neptune_pb/ingest/v1/pub/client_pb2.pyi @@ -3,8 +3,11 @@ isort:skip_file """ import builtins +import collections.abc import google.protobuf.descriptor +import google.protobuf.internal.containers import google.protobuf.message +from ..... import neptune_pb import sys if sys.version_info >= (3, 8): import typing as typing_extensions @@ -23,4 +26,40 @@ class RequestId(google.protobuf.message.Message): def ClearField(self, field_name: typing_extensions.Literal['value', b'value']) -> None: ... -global___RequestId = RequestId \ No newline at end of file +global___RequestId = RequestId + +@typing_extensions.final +class RequestIdList(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + IDS_FIELD_NUMBER: builtins.int + + @property + def ids(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___RequestId]: + ... + + def __init__(self, *, ids: collections.abc.Iterable[global___RequestId] | None=...) -> None: + ... + + def ClearField(self, field_name: typing_extensions.Literal['ids', b'ids']) -> None: + ... +global___RequestIdList = RequestIdList + +@typing_extensions.final +class BulkRequestStatus(google.protobuf.message.Message): + """Maps a list of request identifiers to their respective statuses. + The backend API guarantees that the number of returned fields is equal + to the number of requested IDs, and the order is the same as requested. + """ + DESCRIPTOR: google.protobuf.descriptor.Descriptor + STATUSES_FIELD_NUMBER: builtins.int + + @property + def statuses(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[neptune_pb.ingest.v1.pub.request_status_pb2.RequestStatus]: + ... + + def __init__(self, *, statuses: collections.abc.Iterable[neptune_pb.ingest.v1.pub.request_status_pb2.RequestStatus] | None=...) -> None: + ... + + def ClearField(self, field_name: typing_extensions.Literal['statuses', b'statuses']) -> None: + ... +global___BulkRequestStatus = BulkRequestStatus \ No newline at end of file diff --git a/src/neptune_api/proto/neptune_pb/ingest/v1/pub/ingest_pb2.py b/src/neptune_api/proto/neptune_pb/ingest/v1/pub/ingest_pb2.py index c1010ad..639621e 100644 --- a/src/neptune_api/proto/neptune_pb/ingest/v1/pub/ingest_pb2.py +++ b/src/neptune_api/proto/neptune_pb/ingest/v1/pub/ingest_pb2.py @@ -9,8 +9,8 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'neptune_pb.ingest.v1.pub.ingest_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'\n(ml.neptune.leaderboard.api.ingest.v1.pubB\x0eIngestPubProtoP\x01' _globals['_RUNOPERATION']._serialized_start = 100 _globals['_RUNOPERATION']._serialized_end = 307 \ No newline at end of file diff --git a/src/neptune_api/proto/neptune_pb/ingest/v1/pub/request_status_pb2.py b/src/neptune_api/proto/neptune_pb/ingest/v1/pub/request_status_pb2.py new file mode 100644 index 0000000..8d06aef --- /dev/null +++ b/src/neptune_api/proto/neptune_pb/ingest/v1/pub/request_status_pb2.py @@ -0,0 +1,18 @@ +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_sym_db = _symbol_database.Default() +from .....google_rpc import code_pb2 as google__rpc_dot_code__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n-neptune_pb/ingest/v1/pub/request_status.proto\x12\x15neptune.ingest.v1.pub\x1a\x15google_rpc/code.proto"\x96\x01\n\rRequestStatus\x12G\n\rcode_by_count\x18\x01 \x03(\x0b20.neptune.ingest.v1.pub.RequestStatus.CodeByCount\x1a<\n\x0bCodeByCount\x12\x1e\n\x04code\x18\x01 \x01(\x0e2\x10.google_rpc.Code\x12\r\n\x05count\x18\x02 \x01(\x03BF\n(ml.neptune.leaderboard.api.ingest.v1.pubB\x18IngestRequestStatusProtoP\x01b\x06proto3') +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'neptune_pb.ingest.v1.pub.request_status_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n(ml.neptune.leaderboard.api.ingest.v1.pubB\x18IngestRequestStatusProtoP\x01' + _globals['_REQUESTSTATUS']._serialized_start = 96 + _globals['_REQUESTSTATUS']._serialized_end = 246 + _globals['_REQUESTSTATUS_CODEBYCOUNT']._serialized_start = 186 + _globals['_REQUESTSTATUS_CODEBYCOUNT']._serialized_end = 246 \ No newline at end of file diff --git a/src/neptune_api/proto/neptune_pb/ingest/v1/pub/request_status_pb2.pyi b/src/neptune_api/proto/neptune_pb/ingest/v1/pub/request_status_pb2.pyi new file mode 100644 index 0000000..54bd16a --- /dev/null +++ b/src/neptune_api/proto/neptune_pb/ingest/v1/pub/request_status_pb2.pyi @@ -0,0 +1,47 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" +import builtins +import collections.abc +import google.protobuf.descriptor +import google.protobuf.internal.containers +import google.protobuf.message +from ..... import google_rpc +import sys +if sys.version_info >= (3, 8): + import typing as typing_extensions +else: + import typing_extensions +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +@typing_extensions.final +class RequestStatus(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing_extensions.final + class CodeByCount(google.protobuf.message.Message): + """in case all operations are successful {"OK": 1}, otherwise errors are reported""" + DESCRIPTOR: google.protobuf.descriptor.Descriptor + CODE_FIELD_NUMBER: builtins.int + COUNT_FIELD_NUMBER: builtins.int + code: google_rpc.code_pb2.Code.ValueType + count: builtins.int + + def __init__(self, *, code: google_rpc.code_pb2.Code.ValueType=..., count: builtins.int=...) -> None: + ... + + def ClearField(self, field_name: typing_extensions.Literal['code', b'code', 'count', b'count']) -> None: + ... + CODE_BY_COUNT_FIELD_NUMBER: builtins.int + + @property + def code_by_count(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___RequestStatus.CodeByCount]: + ... + + def __init__(self, *, code_by_count: collections.abc.Iterable[global___RequestStatus.CodeByCount] | None=...) -> None: + ... + + def ClearField(self, field_name: typing_extensions.Literal['code_by_count', b'code_by_count']) -> None: + ... +global___RequestStatus = RequestStatus \ No newline at end of file From 2273af37be157205824f57ed8700fe320725b6fd Mon Sep 17 00:00:00 2001 From: Rafal Jankowski Date: Tue, 20 Aug 2024 13:13:48 +0200 Subject: [PATCH 2/4] Imports fixed and removed old model --- .../proto/neptune_pb/ingest/v1/__init__.pyi | 1 - .../ingest/v1/request_status_pb2.py | 18 ------- .../ingest/v1/request_status_pb2.pyi | 47 ------------------- 3 files changed, 66 deletions(-) delete mode 100644 src/neptune_api/proto/neptune_pb/ingest/v1/request_status_pb2.py delete mode 100644 src/neptune_api/proto/neptune_pb/ingest/v1/request_status_pb2.pyi diff --git a/src/neptune_api/proto/neptune_pb/ingest/v1/__init__.pyi b/src/neptune_api/proto/neptune_pb/ingest/v1/__init__.pyi index 17f695f..1ad682c 100644 --- a/src/neptune_api/proto/neptune_pb/ingest/v1/__init__.pyi +++ b/src/neptune_api/proto/neptune_pb/ingest/v1/__init__.pyi @@ -1,3 +1,2 @@ -from . import request_status_pb2 from . import pub from . import common_pb2 diff --git a/src/neptune_api/proto/neptune_pb/ingest/v1/request_status_pb2.py b/src/neptune_api/proto/neptune_pb/ingest/v1/request_status_pb2.py deleted file mode 100644 index 8d5d59d..0000000 --- a/src/neptune_api/proto/neptune_pb/ingest/v1/request_status_pb2.py +++ /dev/null @@ -1,18 +0,0 @@ -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import builder as _builder -_sym_db = _symbol_database.Default() -from ....google_rpc import code_pb2 as google__rpc_dot_code__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)neptune_pb/ingest/v1/request_status.proto\x12\x15neptune.ingest.v1.pub\x1a\x15google_rpc/code.proto"\x96\x01\n\rRequestStatus\x12G\n\rcode_by_count\x18\x01 \x03(\x0b20.neptune.ingest.v1.pub.RequestStatus.CodeByCount\x1a<\n\x0bCodeByCount\x12\x1e\n\x04code\x18\x01 \x01(\x0e2\x10.google_rpc.Code\x12\r\n\x05count\x18\x02 \x01(\x03BQ\n3ml.neptune.leaderboard.api.ingest.v1.request.statusB\x18IngestRequestStatusProtoP\x01b\x06proto3') -_globals = globals() -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'neptune_pb.ingest.v1.request_status_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'\n3ml.neptune.leaderboard.api.ingest.v1.request.statusB\x18IngestRequestStatusProtoP\x01' - _globals['_REQUESTSTATUS']._serialized_start = 92 - _globals['_REQUESTSTATUS']._serialized_end = 242 - _globals['_REQUESTSTATUS_CODEBYCOUNT']._serialized_start = 182 - _globals['_REQUESTSTATUS_CODEBYCOUNT']._serialized_end = 242 \ No newline at end of file diff --git a/src/neptune_api/proto/neptune_pb/ingest/v1/request_status_pb2.pyi b/src/neptune_api/proto/neptune_pb/ingest/v1/request_status_pb2.pyi deleted file mode 100644 index 1cebd18..0000000 --- a/src/neptune_api/proto/neptune_pb/ingest/v1/request_status_pb2.pyi +++ /dev/null @@ -1,47 +0,0 @@ -""" -@generated by mypy-protobuf. Do not edit manually! -isort:skip_file -""" -import builtins -import collections.abc -import google.protobuf.descriptor -import google.protobuf.internal.containers -import google.protobuf.message -from .... import google_rpc -import sys -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor - -@typing_extensions.final -class RequestStatus(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - @typing_extensions.final - class CodeByCount(google.protobuf.message.Message): - """in case all operations are successful {"OK": 1}, otherwise errors are reported""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor - CODE_FIELD_NUMBER: builtins.int - COUNT_FIELD_NUMBER: builtins.int - code: google_rpc.code_pb2.Code.ValueType - count: builtins.int - - def __init__(self, *, code: google_rpc.code_pb2.Code.ValueType=..., count: builtins.int=...) -> None: - ... - - def ClearField(self, field_name: typing_extensions.Literal['code', b'code', 'count', b'count']) -> None: - ... - CODE_BY_COUNT_FIELD_NUMBER: builtins.int - - @property - def code_by_count(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___RequestStatus.CodeByCount]: - ... - - def __init__(self, *, code_by_count: collections.abc.Iterable[global___RequestStatus.CodeByCount] | None=...) -> None: - ... - - def ClearField(self, field_name: typing_extensions.Literal['code_by_count', b'code_by_count']) -> None: - ... -global___RequestStatus = RequestStatus \ No newline at end of file From 5d1e331b8366c9f7c0aff505ebeedb53373f0c40 Mon Sep 17 00:00:00 2001 From: Rafal Jankowski Date: Tue, 20 Aug 2024 13:14:04 +0200 Subject: [PATCH 3/4] Bulk check endpoint support --- scripts/preserve_files.txt | 1 + .../data_ingestion/check_request_status.py | 2 +- .../check_request_status_bulk.py | 181 ++++++++++++++++++ src/neptune_api/models/__init__.py | 4 + src/neptune_api/models/bulk_request_status.py | 49 +++++ src/neptune_api/models/request_id_list.py | 49 +++++ 6 files changed, 285 insertions(+), 1 deletion(-) create mode 100644 src/neptune_api/api/data_ingestion/check_request_status_bulk.py create mode 100644 src/neptune_api/models/bulk_request_status.py create mode 100644 src/neptune_api/models/request_id_list.py diff --git a/scripts/preserve_files.txt b/scripts/preserve_files.txt index 93449ff..834a503 100644 --- a/scripts/preserve_files.txt +++ b/scripts/preserve_files.txt @@ -2,4 +2,5 @@ neptune_api/credentials.py neptune_api/auth_helpers.py neptune_api/proto/ neptune_api/api/data_ingestion/check_request_status.py +neptune_api/api/data_ingestion/check_request_status_bulk.py neptune_api/api/data_ingestion/submit_operation.py diff --git a/src/neptune_api/api/data_ingestion/check_request_status.py b/src/neptune_api/api/data_ingestion/check_request_status.py index d13b122..9e943fd 100644 --- a/src/neptune_api/api/data_ingestion/check_request_status.py +++ b/src/neptune_api/api/data_ingestion/check_request_status.py @@ -13,7 +13,7 @@ AuthenticatedClient, Client, ) -from neptune_api.proto.neptune_pb.ingest.v1.request_status_pb2 import RequestStatus +from neptune_api.proto.neptune_pb.ingest.v1.pub.request_status_pb2 import RequestStatus from neptune_api.types import ( UNSET, Response, diff --git a/src/neptune_api/api/data_ingestion/check_request_status_bulk.py b/src/neptune_api/api/data_ingestion/check_request_status_bulk.py new file mode 100644 index 0000000..296e737 --- /dev/null +++ b/src/neptune_api/api/data_ingestion/check_request_status_bulk.py @@ -0,0 +1,181 @@ +from http import HTTPStatus +from typing import ( + Any, + Dict, + Optional, + Union, +) + +import httpx + +from neptune_api import errors +from neptune_api.client import ( + AuthenticatedClient, + Client, +) +from neptune_api.proto.neptune_pb.ingest.v1.pub.client_pb2 import ( + BulkRequestStatus, + RequestIdList, +) +from neptune_api.types import Response + + +def _get_kwargs( + *, + body: RequestIdList, + project_identifier: str, +) -> Dict[str, Any]: + return { + "method": "post", + "url": "/api/client/v1/ingest/check", + "params": { + "projectIdentifier": project_identifier, + }, + "content": body.SerializeToString(), + "headers": { + "Content-Type": "application/x-protobuf", + }, + } + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[BulkRequestStatus]: + if response.status_code == HTTPStatus.OK: + response_200 = BulkRequestStatus() + response_200.ParseFromString(response.content) + + return response_200 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[BulkRequestStatus]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: RequestIdList, + project_identifier: str, +) -> Response[BulkRequestStatus]: + """Checks the processing status of multiple operations + + Args: + project_identifier (str): + body (RequestIdList): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkRequestStatus] + """ + + kwargs = _get_kwargs( + body=body, + project_identifier=project_identifier, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: RequestIdList, + project_identifier: str, +) -> Optional[BulkRequestStatus]: + """Checks the processing status of multiple operations + + Args: + project_identifier (str): + body (RequestIdList): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkRequestStatus + """ + + return sync_detailed( + client=client, + body=body, + project_identifier=project_identifier, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: RequestIdList, + project_identifier: str, +) -> Response[BulkRequestStatus]: + """Checks the processing status of multiple operations + + Args: + project_identifier (str): + body (RequestIdList): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkRequestStatus] + """ + + kwargs = _get_kwargs( + body=body, + project_identifier=project_identifier, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: RequestIdList, + project_identifier: str, +) -> Optional[BulkRequestStatus]: + """Checks the processing status of multiple operations + + Args: + project_identifier (str): + body (RequestIdList): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkRequestStatus + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + project_identifier=project_identifier, + ) + ).parsed diff --git a/src/neptune_api/models/__init__.py b/src/neptune_api/models/__init__.py index 5fdf2ec..945954d 100644 --- a/src/neptune_api/models/__init__.py +++ b/src/neptune_api/models/__init__.py @@ -1,22 +1,26 @@ """Contains all the data models used in inputs/outputs""" +from .bulk_request_status import BulkRequestStatus from .client_config import ClientConfig from .client_versions_config_dto import ClientVersionsConfigDTO from .error import Error from .neptune_oauth_token import NeptuneOauthToken from .project_dto import ProjectDTO from .request_id import RequestId +from .request_id_list import RequestIdList from .request_status import RequestStatus from .run_operation import RunOperation from .security_dto import SecurityDTO __all__ = ( + "BulkRequestStatus", "ClientConfig", "ClientVersionsConfigDTO", "Error", "NeptuneOauthToken", "ProjectDTO", "RequestId", + "RequestIdList", "RequestStatus", "RunOperation", "SecurityDTO", diff --git a/src/neptune_api/models/bulk_request_status.py b/src/neptune_api/models/bulk_request_status.py new file mode 100644 index 0000000..e0f600e --- /dev/null +++ b/src/neptune_api/models/bulk_request_status.py @@ -0,0 +1,49 @@ +from typing import ( + Any, + Dict, + List, + Type, + TypeVar, +) + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="BulkRequestStatus") + + +@_attrs_define +class BulkRequestStatus: + """ """ + + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + bulk_request_status = cls() + + bulk_request_status.additional_properties = d + return bulk_request_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/neptune_api/models/request_id_list.py b/src/neptune_api/models/request_id_list.py new file mode 100644 index 0000000..67df1d1 --- /dev/null +++ b/src/neptune_api/models/request_id_list.py @@ -0,0 +1,49 @@ +from typing import ( + Any, + Dict, + List, + Type, + TypeVar, +) + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RequestIdList") + + +@_attrs_define +class RequestIdList: + """ """ + + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + request_id_list = cls() + + request_id_list.additional_properties = d + return request_id_list + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties From 9e8bd42e733aa2dda6955a104a5e20c3560cf9fb Mon Sep 17 00:00:00 2001 From: Rafal Jankowski Date: Tue, 20 Aug 2024 13:16:34 +0200 Subject: [PATCH 4/4] CHANGELOG --- CHANGELOG.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 230b143..58758ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.5.0] - 2024-08-20 + +### Added +- Support for request status bulk checks endpoint ([#18](https://github.com/neptune-ai/neptune-api/pull/18)) + ## [0.4.0] - 2024-08-13 ### Added @@ -25,7 +30,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Added initial package setup and OpenAPI client ([#1](https://github.com/neptune-ai/neptune-api/pull/1)) -[unreleased]: https://github.com/neptune-ai/neptune-api/compare/0.4.0...HEAD +[unreleased]: https://github.com/neptune-ai/neptune-api/compare/0.5.0...HEAD +[0.5.0]: https://github.com/neptune-ai/neptune-api/compare/0.4.0...0.5.0 [0.4.0]: https://github.com/neptune-ai/neptune-api/compare/0.3.0...0.4.0 [0.3.0]: https://github.com/neptune-ai/neptune-api/compare/0.2.0...0.3.0 [0.2.0]: https://github.com/neptune-ai/neptune-api/compare/0.1.0...0.2.0