Skip to content

Commit

Permalink
Merge pull request #9028 from OpenMined/eelco/migration-frontend-json
Browse files Browse the repository at this point in the history
deprecation warning frontend json
  • Loading branch information
eelcovdw authored Jul 9, 2024
2 parents 4ba0b03 + e3f94a2 commit 9ece82d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
7 changes: 2 additions & 5 deletions packages/syft/src/syft/service/action/action_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
9 changes: 0 additions & 9 deletions packages/syft/src/syft/store/kv_document_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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}"
)
Expand Down
6 changes: 6 additions & 0 deletions packages/syft/src/syft/util/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
# syft absolute
import syft as sy

# relative
from .decorators import deprecated

RELATIVE_PATH_TO_FRONTEND = "/../../../../grid/frontend/"
SCHEMA_FOLDER = "schema"

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 9ece82d

Please sign in to comment.