Skip to content

Commit

Permalink
allow users to update existing functions without redefinint them
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoens committed Sep 17, 2024
1 parent 3416240 commit f7173d2
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 15 deletions.
1 change: 0 additions & 1 deletion tabpy/tabpy_server/handlers/endpoint_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ def delete(self, name):
return

self.logger.log(logging.DEBUG, f"Processing DELETE for /endpoints/{name}")
self.logger.log(logging.INFO, f"Processing DELETE for /endpoints/{name}")

try:
endpoints = self.tabpy_state.get_endpoints(name)
Expand Down
2 changes: 1 addition & 1 deletion tabpy/tabpy_server/handlers/management_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def _add_or_update_endpoint(self, action, name, version, request_data):
"""
Add or update an endpoint
"""
self.logger.log(logging.INFO, f"Adding/updating model {name}...")
self.logger.log(logging.DEBUG, f"Adding/updating model {name}...")

if not isinstance(name, str):
msg = "Endpoint name must be a string"
Expand Down
1 change: 0 additions & 1 deletion tabpy/tabpy_tools/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ def PUT(self, url, data, timeout=None):
data = self._encode_request(data)

logger.info(f"PUT {url} with {data}")
logger.log(logging.INFO, f"PUT {url} with {data}")

response = self.session.put(
url,
Expand Down
12 changes: 0 additions & 12 deletions tabpy/tabpy_tools/rest_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,18 +216,6 @@ def set_endpoint(self, endpoint):
"""
return self.service_client.PUT("endpoints/" + endpoint.name, endpoint.to_json())

def make_public(self, endpoint):
"""Updates an existing endpoint to be public.
Parameters
----------
endpoint : Endpoint
The endpoint to make public.
"""
self.service_client.PUT("endpoints/" + endpoint.name, endpoint.to_json())

def remove_endpoint(self, endpoint_name):
"""Deletes an endpoint through the management API.
Expand Down

0 comments on commit f7173d2

Please sign in to comment.