From b0ab7dab37526a82f9641174415f16404ba373aa Mon Sep 17 00:00:00 2001 From: eelcovdw Date: Tue, 9 Jul 2024 10:26:38 +0200 Subject: [PATCH 1/2] remove prints --- packages/syft/src/syft/service/action/action_service.py | 7 ++----- packages/syft/src/syft/store/kv_document_store.py | 9 --------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/packages/syft/src/syft/service/action/action_service.py b/packages/syft/src/syft/service/action/action_service.py index fcd51277a1c..c4c54c85a24 100644 --- a/packages/syft/src/syft/service/action/action_service.py +++ b/packages/syft/src/syft/service/action/action_service.py @@ -574,11 +574,8 @@ def store_permission( def blob_permission( x: SyftVerifyKey | None = None, - ) -> ActionObjectPermission | None: - if result_blob_id: - return ActionObjectPermission(result_blob_id, read_permission, x) - else: - return None + ) -> ActionObjectPermission: + return ActionObjectPermission(result_blob_id, read_permission, x) if len(output_readers) > 0: store_permissions = [store_permission(x) for x in output_readers] diff --git a/packages/syft/src/syft/store/kv_document_store.py b/packages/syft/src/syft/store/kv_document_store.py index 847a5ca0da9..83ca343b7c3 100644 --- a/packages/syft/src/syft/store/kv_document_store.py +++ b/packages/syft/src/syft/store/kv_document_store.py @@ -495,11 +495,6 @@ def _update( return Err(f"Failed to update obj {obj}, you have no permission") except Exception as e: - # third party - # stdlib - import traceback - - print(traceback.format_exc()) return Err(f"Failed to update obj {obj} with error: {e}") def _get_all_from_store( @@ -704,10 +699,6 @@ def _migrate_data( try: migrated_value = value.migrate_to(to_klass.__version__, context) except Exception: - # stdlib - import traceback - - print(traceback.format_exc()) return Err( f"Failed to migrate data to {to_klass} for qk {to_klass.__version__}: {key}" ) From e87a0dd87fe1119b2ee8c427c1831412325c6035 Mon Sep 17 00:00:00 2001 From: eelcovdw Date: Tue, 9 Jul 2024 10:50:27 +0200 Subject: [PATCH 2/2] add deprecated warning --- packages/syft/src/syft/util/schema.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/syft/src/syft/util/schema.py b/packages/syft/src/syft/util/schema.py index b2a573d2952..7565e051814 100644 --- a/packages/syft/src/syft/util/schema.py +++ b/packages/syft/src/syft/util/schema.py @@ -8,6 +8,9 @@ # syft absolute import syft as sy +# relative +from .decorators import deprecated + RELATIVE_PATH_TO_FRONTEND = "/../../../../grid/frontend/" SCHEMA_FOLDER = "schema" @@ -210,6 +213,9 @@ def resolve_references(json_mappings: dict[str, dict]) -> dict[str, dict]: return json_mappings +@deprecated( + reason="generate_json_schemas is outdated, #1603 for more info", +) def generate_json_schemas(output_path: str | None = None) -> None: # TODO: should we also replace this with the SyftObjectRegistry? json_mappings = process_type_bank(sy.serde.recursive.TYPE_BANK)