From 9ec0259a5d05f63721e68512d969563a17fb153f Mon Sep 17 00:00:00 2001 From: David Michaels Date: Tue, 11 Jun 2024 07:55:14 -0400 Subject: [PATCH] removed delete/purge functions from portal_utils. --- CHANGELOG.rst | 1 - dcicutils/portal_utils.py | 16 +--------------- pyproject.toml | 2 +- 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2dc5296d8..3a43116e3 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -13,7 +13,6 @@ Change Log * Added Question class to command_utils (factored out of smaht-submitr). * Refactored out some identifying property related code from portal_object_utils to portal_utils. * Internalized lookup_strategy related code to structured_data/portal_object_utils/portal_utils. -* Added delete/purge_metadata to portal_utils.Portal, for testing and completeness. 8.9.0 diff --git a/dcicutils/portal_utils.py b/dcicutils/portal_utils.py index daf5264b4..005eb400a 100644 --- a/dcicutils/portal_utils.py +++ b/dcicutils/portal_utils.py @@ -17,7 +17,7 @@ from webtest.app import TestApp, TestResponse from wsgiref.simple_server import make_server as wsgi_make_server from dcicutils.common import APP_SMAHT, OrchestratedApp, ORCHESTRATED_APPS -from dcicutils.ff_utils import delete_metadata, get_metadata, get_schema, patch_metadata, post_metadata, purge_metadata +from dcicutils.ff_utils import get_metadata, get_schema, patch_metadata, post_metadata from dcicutils.misc_utils import to_camel_case, VirtualApp from dcicutils.schema_utils import get_identifying_properties from dcicutils.tmpfile_utils import temporary_file @@ -280,20 +280,6 @@ def post_metadata(self, object_type: str, data: dict, check_only: bool = False) add_on="check_only=True" if check_only else "") return self.post(f"/{object_type}{'?check_only=True' if check_only else ''}", data).json() - def delete_metadata(self, object_id: str) -> Optional[dict]: - if isinstance(object_id, str) and object_id: - if self.key: - return delete_metadata(obj_id=object_id, key=self.key) - else: - return self.patch_metadata(object_id, {"status": "deleted"}) - return None - - def purge_metadata(self, object_id: str) -> Optional[dict]: - if isinstance(object_id, str) and object_id: - if self.key: - return purge_metadata(obj_id=object_id, key=self.key) - return None - def get_health(self) -> OptionalResponse: return self.get("/health") diff --git a/pyproject.toml b/pyproject.toml index 18547b5c2..0d3845b58 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "dcicutils" -version = "8.9.0.1b7" # TODO: To become 8.10.0 +version = "8.9.0.1b8" # TODO: To become 8.10.0 description = "Utility package for interacting with the 4DN Data Portal and other 4DN resources" authors = ["4DN-DCIC Team "] license = "MIT"