Skip to content

Commit

Permalink
add deprecated comment to handlers no longer used. Aid in future refa…
Browse files Browse the repository at this point in the history
…ctor and make #80's reviewer's lives easier.
  • Loading branch information
Austin Raney authored and Austin Raney committed Sep 27, 2021
1 parent e8d73c0 commit 2b9489b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions hydroshare_jupyter_sync/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ def _destroy_session(self):
session_sync_struct.reset_session()


# NOTE: deprecated
class Localmd5Handler(HeadersMixIn, BaseRequestHandler):
"""Handles calculation of local md5 values"""

Expand All @@ -351,6 +352,7 @@ def get(self, res_id):
)


# NOTE: deprecated
class Hsmd5Handler(HeadersMixIn, BaseRequestHandler):
"""Handles calculation of local md5 values"""

Expand Down Expand Up @@ -666,6 +668,7 @@ def _prepend_baggit_prefix(file_path: str) -> str:
return f"{LocalResourceEntityHandler.BAGGIT_PREFIX}{left_truncated_path}"


# NOTE: deprecated
class ResourceHandler(HeadersMixIn, BaseRequestHandler):
"""Handles resource-specific requests made to /resources/<resource_id>"""

Expand Down Expand Up @@ -693,6 +696,7 @@ def delete(self, res_id):
)


# NOTE: deprecated
class DirectorySelectorHandler(HeadersMixIn, BaseRequestHandler):
"""Handles downloading of hydroshare data in user selected directory"""

Expand Down Expand Up @@ -792,6 +796,7 @@ def createDirectory(self, defaultPath):
return returnValue


# NOTE: deprecated
class ResourceLocalFilesRequestHandler(HeadersMixIn, BaseRequestHandler):
"""Facilitates getting, deleting, and uploading to the files contained in
a resource on the local disk"""
Expand Down Expand Up @@ -954,6 +959,7 @@ def post(self, res_id):
)


# NOTE: deprecated
class ResourceHydroShareFilesRequestHandler(HeadersMixIn, BaseRequestHandler):
"""Handles getting and deleting the files in a HydroShare resource"""

Expand Down Expand Up @@ -1065,6 +1071,7 @@ def delete(self, res_id):
COPY = "copy"


# NOTE: deprecated
class DownloadHydroShareFilesRequestHandler(HeadersMixIn, BaseRequestHandler):
_custom_headers = [("Access-Control-Allow-Methods", "POST")]

Expand Down Expand Up @@ -1097,6 +1104,7 @@ def post(self, res_id):
)


# NOTE: deprecated
def checkFileSyncStatus(temporaryRoot, res_id):
serverIsLatest = "HydroShare is latest"
localIsLatest = "Local is Latest"
Expand Down Expand Up @@ -1143,6 +1151,7 @@ def checkFileSyncStatus(temporaryRoot, res_id):
temporaryRoot = sorted(contents, key=lambda x: x["syncStatus"] == " ")


# NOTE: deprecated
def checkHydroShareSyncStatus(local_or_hs_file_data, res_id, is_local_data):
serverIsLatest = "HydroShare is latest"
localIsLatest = "Local is Latest"
Expand All @@ -1168,6 +1177,7 @@ def checkHydroShareSyncStatus(local_or_hs_file_data, res_id, is_local_data):
)


# NOTE: deprecated
def addParameters(
data, data_to_compare, localIsLatest, serverIsLatest, res_id, is_local_data
):
Expand Down Expand Up @@ -1264,6 +1274,7 @@ def addParameters(
)


# NOTE: deprecated
class CheckSyncStatusFilesRequestHandler(HeadersMixIn, BaseRequestHandler):
_custom_headers = [("Access-Control-Allow-Methods", "POST")]
filesChanged = "sync"
Expand Down Expand Up @@ -1342,6 +1353,7 @@ def post(self, res_id):
)


# NOTE: deprecated
class DownloadedLocalFilesRequestHandler(HeadersMixIn, BaseRequestHandler):
_custom_headers = [("Access-Control-Allow-Methods", "GET")]

Expand Down Expand Up @@ -1369,6 +1381,7 @@ def get(self, res_id):
)


# NOTE: deprecated
class MoveCopyFiles(HeadersMixIn, BaseRequestHandler):
"""Handles moving (or renaming) files within the local filesystem,
on HydroShare, and between the two."""
Expand Down Expand Up @@ -1520,6 +1533,7 @@ def get(self):
self.write(user)


# NOTE: deprecated
def get_route_handlers(frontend_url, backend_url):
# routes look like they need to be updated to remove .*
return [
Expand Down

0 comments on commit 2b9489b

Please sign in to comment.