Conversation
test: add test to prevent regression
apdavison
requested changes
Dec 1, 2025
Member
apdavison
left a comment
There was a problem hiding this comment.
I should note that we have end-to-end tests running on EBRAINS GitLab, but I'm fine with having read-only tests of public buckets also running on GitHub.
ebrains_drive/client.py
Outdated
|
|
||
|
|
||
| def wrap_exchange_seafile_token(): | ||
| def exchnage_oidc_for_seafile(self: "DriveApiClient"): |
Member
There was a problem hiding this comment.
should be "exchange" not "exchnage"
ebrains_drive/client.py
Outdated
| kwargs = copy(kwargs) | ||
|
|
||
| if self._seafile_token is None: | ||
| self._seafile_token = exchnage_oidc_for_seafile(self) |
Member
There was a problem hiding this comment.
should be "exchange" not "exchnage"
ebrains_drive/client.py
Outdated
| return fn(self, *args, **kwargs) | ||
| except ClientHttpError as e: | ||
| if e.code == 401: | ||
| self._seafile_token = exchnage_oidc_for_seafile(self) |
Member
There was a problem hiding this comment.
should be "exchange" not "exchnage"
|
|
||
|
|
||
| _I_AM_A_PUBLIC_BUCKET = "_I_AM_A_PUBLIC_BUCKET" | ||
| _I_AM_A_PUBLIC_BUCKET = object() |
Member
There was a problem hiding this comment.
can you explain the motivation for this change?
Collaborator
Author
There was a problem hiding this comment.
mainly so that user cannot accidentally provide "_I_AM_A_PUBLIC_BUCKET" as a token, no matter now unlikely.
In thie case, even if the user provide object() as token kwarg, the is check will return false.
apdavison
approved these changes
Dec 1, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #48
this is a quick fix. In future, we should introduce: