Skip to content

Commit

Permalink
Merge pull request #7 from kitware-resonant/rename-girder-to-resonant
Browse files Browse the repository at this point in the history
Rename girder -> resonant
  • Loading branch information
danlamanna authored Feb 3, 2025
2 parents 3f572c0 + b42e5eb commit 8c30937
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# girder-cli-oauth-client
# resonant-cli-oauth-client

A Python library for performing OAuth login to a Girder 4 (Django) server.
A Python library for performing OAuth login to a Resonant server.

## Description
This provides support for authenticating with Girder 4 servers,
This provides support for authenticating with Resonant servers
using the OAuth2.0 Device Code Grant.

## Usage
* Install the library:
```bash
pip install girder-cli-oauth-client
pip install resonant-cli-oauth-client
```

* Instantiate an `OauthClient` with your application-specific configuration:
```py
from girder_cli_oauth_client import GirderCliOAuthClient
from resonant_cli_oauth_client import ResonantCliOAuthClient

oauth_client = GirderCliOAuthClient(
oauth_client = ResonantCliOAuthClient(
'http://127.0.0.1:8000/oauth/',
'jUQhgOTQYiG6hmNSvaodOGJeriAqA1anqo8WFjCw',
['identity'],
Expand Down Expand Up @@ -48,7 +48,7 @@ using the OAuth2.0 Device Code Grant.
## Example app
This repository comes bundled with an [example application](example/cli.py). Run it with:
```bash
git clone https://github.com/girder/girder-cli-oauth-client.git
git clone https://github.com/kitware-resonant/resonant-cli-oauth-client.git
pip install -e '.[example]'
cd example
./manage.py migrate
Expand Down
4 changes: 2 additions & 2 deletions example/cli.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import click # noqa: INP001
import requests

from girder_cli_oauth_client import GirderCliOAuthClient
from resonant_cli_oauth_client import ResonantCliOAuthClient


@click.group()
@click.pass_context
def cli(ctx):
ctx.obj["client"] = GirderCliOAuthClient(
ctx.obj["client"] = ResonantCliOAuthClient(
"http://127.0.0.1:8000/oauth",
"jUQhgOTQYiG6hmNSvaodOGJeriAqA1anqo8WFjCw",
["identity"],
Expand Down
6 changes: 3 additions & 3 deletions girder_cli_oauth_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from importlib.metadata import PackageNotFoundError, version

with suppress(PackageNotFoundError):
__version__ = version("girder-cli-oauth-client")
__version__ = version("resonant-cli-oauth-client")

from .client import GirderCliOAuthClient
from .client import ResonantCliOAuthClient

__all__ = ["GirderCliOAuthClient"]
__all__ = ["ResonantCliOAuthClient"]
4 changes: 2 additions & 2 deletions girder_cli_oauth_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class TokenResponseError:
error: Literal["expired_token", "access_denied"]


class GirderCliOAuthClient:
class ResonantCliOAuthClient:
_token: AccessToken | None
_authorization_response: AuthorizationResponse | None

Expand All @@ -70,7 +70,7 @@ def __init__(self, oauth_url: str, client_id: str, scopes: list[str] | None = No
def _data_path(self) -> Path:
hostname = urlparse(self.oauth_url).hostname
assert hostname # noqa: S101
namespace = Path("girder_cli_oauth_client") / Path(hostname) / Path(self.client_id)
namespace = Path("resonant_cli_oauth_client") / Path(hostname) / Path(self.client_id)
return Path(BaseDirectory.save_data_path(namespace))

@property
Expand Down
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
long_description = f.read()

setup(
name="girder-cli-oauth-client",
description="A Python library for performing OAuth login to a Girder 4 (Django) server.",
name="resonant-cli-oauth-client",
description="A Python library for performing OAuth login to a Resonant server.",
long_description=long_description,
long_description_content_type="text/markdown",
license="Apache 2.0",
url="https://github.com/girder/girder-cli-oauth-client",
url="https://github.com/kitware-resonant/resonant-cli-oauth-client",
project_urls={
"Bug Reports": "https://github.com/girder/girder-cli-oauth-client/issues",
"Source": "https://github.com/girder/girder-cli-oauth-client",
"Bug Reports": "https://github.com/kitware-resonant/resonant-cli-oauth-client/issues",
"Source": "https://github.com/kitware-resonant/resonant-cli-oauth-client",
},
author="Kitware, Inc.",
author_email="[email protected]",
Expand Down

0 comments on commit 8c30937

Please sign in to comment.