Skip to content

Commit 516eceb

Browse files
committed
Address review comments
1 parent e9c3944 commit 516eceb

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

bioblend/galaxy/__init__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def __init__(
3939
email: Optional[str] = None,
4040
password: Optional[str] = None,
4141
*,
42+
token: Optional[str] = None,
4243
verify: bool = True,
4344
) -> None:
4445
"""
@@ -79,10 +80,16 @@ def __init__(
7980
:param password: Password of Galaxy account corresponding to the above
8081
e-mail address. Ignored if key is supplied directly.
8182
83+
:type token: str
84+
:param token: An OIDC access token obtained from an OIDC provider
85+
configured in `oidc_backends_config.xml`. Can be used
86+
as a substitue for an API key. You must make sure the access
87+
token has not expired when making an API call.
88+
8289
:param verify: Whether to verify the server's TLS certificate
8390
:type verify: bool
8491
"""
85-
super().__init__(url, key=key, email=email, password=password, verify=verify)
92+
super().__init__(url, key=key, email=email, password=password, token=token, verify=verify)
8693
self.libraries = libraries.LibraryClient(self)
8794
self.histories = histories.HistoryClient(self)
8895
self.workflows = workflows.WorkflowClient(self)

bioblend/galaxy/objects/galaxy_instance.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,10 @@ def __init__(
5757
email: Optional[str] = None,
5858
password: Optional[str] = None,
5959
*,
60+
token: Optional[str] = None,
6061
verify: bool = True,
6162
) -> None:
62-
self.gi = bioblend.galaxy.GalaxyInstance(url, key=api_key, email=email, password=password, verify=verify)
63+
self.gi = bioblend.galaxy.GalaxyInstance(url, key=api_key, email=email, password=password, token=token, verify=verify)
6364
self.log = bioblend.log
6465
self.datasets = client.ObjDatasetClient(self)
6566
self.dataset_collections = client.ObjDatasetCollectionClient(self)

bioblend/galaxyclient.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ def __init__(
3434
self,
3535
url: str,
3636
key: Optional[str] = None,
37-
token: Optional[str] = None,
3837
email: Optional[str] = None,
3938
password: Optional[str] = None,
4039
*,
40+
token: Optional[str] = None,
4141
verify: bool = True,
4242
timeout: Optional[float] = None,
4343
) -> None:

bioblend/toolshed/__init__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def __init__(
1919
email: Optional[str] = None,
2020
password: Optional[str] = None,
2121
*,
22+
token: Optional[str] = None,
2223
verify: bool = True,
2324
) -> None:
2425
"""
@@ -57,10 +58,15 @@ def __init__(
5758
:param password: Password of ToolShed account corresponding to the above
5859
e-mail address. Ignored if key is supplied directly.
5960
61+
:param token: An OIDC access token obtained from an OIDC provider
62+
configured in `oidc_backends_config.xml`. Can be used
63+
as a substitue for an API key. You must make sure the access
64+
token has not expired when making an API call.
65+
6066
:param verify: Whether to verify the server's TLS certificate
6167
:type verify: bool
6268
"""
63-
super().__init__(url, key=key, email=email, password=password, verify=verify)
69+
super().__init__(url, key=key, email=email, password=password, token=token, verify=verify)
6470
self.categories = categories.ToolShedCategoryClient(self)
6571
self.repositories = repositories.ToolShedRepositoryClient(self)
6672
self.tools = tools.ToolShedToolClient(self)

0 commit comments

Comments
 (0)