Skip to content

Commit

Permalink
Merge pull request #48 from iluvcapra/pt-2024.6
Browse files Browse the repository at this point in the history
Made changes for 2024.10 field validation
  • Loading branch information
iluvcapra authored Nov 22, 2024
2 parents 5702d75 + 19f9abc commit 84f6a33
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion ptsl/builders/create_session_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def interleaved(self, value: bool):
self._is_interleaved = value

def create(self) -> None:
import pprint
op = ops.CreateSession(
session_name=self._session_name,
file_type=self._audio_format,
Expand All @@ -70,8 +71,11 @@ def create(self) -> None:
is_interleaved=self._is_interleaved,
session_location=self._path,
bit_depth=self._bit_depth,
is_cloud_project=False,
create_from_template=False,
)

print("------")
pprint.pprint(op.request)
self._engine.client.run(op)


Expand Down
3 changes: 2 additions & 1 deletion ptsl/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def run(self, operation: Operation) -> None:
# this happens
assert False, \
f"Unexpected response code {response.header.status} " + \
"({pt.TaskStatus.Name(response.header.status)})"
f"({pt.TaskStatus.Name(response.header.status)})"

self.auditor.run_returning()

Expand All @@ -181,6 +181,7 @@ def _prepare_operation_request_json(self, operation):
else:
request_body_json = \
json_format.MessageToJson(operation.request,
always_print_fields_with_no_presence=True,
# including_default_value_fields=True,
preserving_proto_field_name=True)

Expand Down

0 comments on commit 84f6a33

Please sign in to comment.