Skip to content

Commit

Permalink
fix errors from serverless side
Browse files Browse the repository at this point in the history
  • Loading branch information
Tansito committed Jan 13, 2025
1 parent 9244b49 commit 2792cf0
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 15 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ authors = []
dependencies = [
"certifi>=2021.5.30",
"importlib_metadata>=4.8.1",
"qiskit_serverless>=0.18.0, <0.19.0",
"qiskit_serverless @ git+https://github.com/Qiskit/qiskit-serverless.git#subdirectory=client",
]

[project.optional-dependencies]
Expand Down
19 changes: 12 additions & 7 deletions qiskit_ibm_catalog/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ def file_download(
download_location: str = "./",
):
"""Download a file available to the user for the specific Qiskit Function."""
return self._client.download(file, download_location, function, target_name)
return self._client.file_download(
file, function, target_name, download_location
)

def provider_file_download(
self,
Expand All @@ -155,25 +157,28 @@ def provider_file_download(
download_location: str = "./",
):
"""Download a file available to the provider for the specific Qiskit Function."""
return self._client.provider_download(
file, download_location, function, target_name
return self._client.provider_file_download(
file,
function,
target_name,
download_location,
)

def file_delete(self, file: str, function: QiskitFunction):
"""Deletes a file available to the user for the specific Qiskit Function."""
return self._client.delete(file, function)
return self._client.file_delete(file, function)

def provider_file_delete(self, file: str, function: QiskitFunction):
"""Deletes a file available to the provider for the specific Qiskit Function."""
return self._client.provider_delete(file, function)
return self._client.provider_file_delete(file, function)

def file_upload(self, file: str, function: QiskitFunction):
"""Uploads a file in the specific user's Qiskit Function folder."""
return self._client.upload(file, function)
return self._client.file_upload(file, function)

def provider_file_upload(self, file: str, function: QiskitFunction):
"""Uploads a file in the specific provider's Qiskit Function folder."""
return self._client.provider_upload(file, function)
return self._client.provider_file_upload(file, function)

def __repr__(self) -> str:
return "<QiskitFunctionsCatalog>"
Expand Down
19 changes: 12 additions & 7 deletions qiskit_ibm_catalog/serverless.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ def file_download(
download_location: str = "./",
):
"""Download a file available to the user for the specific Qiskit Function."""
return self._client.download(file, download_location, function, target_name)
return self._client.file_download(
file, function, target_name, download_location
)

def provider_file_download(
self,
Expand All @@ -167,25 +169,28 @@ def provider_file_download(
download_location: str = "./",
):
"""Download a file available to the provider for the specific Qiskit Function."""
return self._client.provider_download(
file, download_location, function, target_name
return self._client.provider_file_download(
file,
function,
target_name,
download_location,
)

def file_delete(self, file: str, function: QiskitFunction):
"""Deletes a file available to the user for the specific Qiskit Function."""
return self._client.delete(file, function)
return self._client.file_delete(file, function)

def provider_file_delete(self, file: str, function: QiskitFunction):
"""Deletes a file available to the provider for the specific Qiskit Function."""
return self._client.provider_delete(file, function)
return self._client.provider_file_delete(file, function)

def file_upload(self, file: str, function: QiskitFunction):
"""Uploads a file in the specific user's Qiskit Function folder."""
return self._client.upload(file, function)
return self._client.file_upload(file, function)

def provider_file_upload(self, file: str, function: QiskitFunction):
"""Uploads a file in the specific provider's Qiskit Function folder."""
return self._client.provider_upload(file, function)
return self._client.provider_file_upload(file, function)

def __repr__(self) -> str:
return "<QiskitServerless>"
Expand Down

0 comments on commit 2792cf0

Please sign in to comment.