Skip to content

Commit 57cd828

Browse files
snus-kinCopilot
andauthored
feat: s/athena-client/resolver-athena-client/g (#19)
* feat: s/athena-client/resolver-athena-client/g * Update docs/api/client.rst Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update docs/conf.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update docs/installation.rst Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 3ca59a2 commit 57cd828

64 files changed

Lines changed: 564 additions & 311 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
src/athena_client/generated/* linguist-generated=true
1+
src/resolver_athena_client/generated/* linguist-generated=true

.github/workflows/ci.yml

Lines changed: 7 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -52,22 +52,22 @@ jobs:
5252
- name: Install the project
5353
run: uv sync --locked --all-extras --dev
5454

55-
- name: Ensure no differences in generated code (Unix)
55+
- name: Ensure no differences in generated code
5656
if: runner.os != 'Windows'
5757
shell: bash
5858
run: |
5959
source .venv/bin/activate
60-
GENERATED_DIR="src/athena_client/generated"
61-
BACKUP_DIR="src/athena_client/generated_backup"
60+
GENERATED_DIR="src/resolver_athena_client/generated"
61+
BACKUP_DIR="src/resolver_athena_client/generated_backup"
6262
6363
cp -r $GENERATED_DIR $BACKUP_DIR
6464
6565
./scripts/compile_proto.sh || (echo "Protobuf compilation failed. Ensure submodules are initialized and the proto file exists." && exit 1)
6666
6767
# Fix imports in generated files
6868
if [[ -f "$GENERATED_DIR/athena/athena_pb2_grpc.py" && -f "$GENERATED_DIR/athena/athena_pb2.py" ]]; then
69-
sed -i.bak 's/^from athena /from athena_client.generated.athena /' "$GENERATED_DIR/athena/athena_pb2_grpc.py"
70-
sed -i.bak 's/^from athena /from athena_client.generated.athena /' "$GENERATED_DIR/athena/athena_pb2.py"
69+
sed -i.bak 's/^from athena /from resolver_athena_client.generated.athena /' "$GENERATED_DIR/athena/athena_pb2_grpc.py"
70+
sed -i.bak 's/^from athena /from resolver_athena_client.generated.athena /' "$GENERATED_DIR/athena/athena_pb2.py"
7171
rm -f "$GENERATED_DIR/athena/athena_pb2_grpc.py.bak" "$GENERATED_DIR/athena/athena_pb2.py.bak"
7272
else
7373
echo "Error: Expected files not found in $GENERATED_DIR/athena"
@@ -78,44 +78,6 @@ jobs:
7878
7979
rm -rf $BACKUP_DIR
8080
81-
- name: Ensure no differences in generated code (Windows)
82-
if: runner.os == 'Windows'
83-
shell: powershell
84-
run: |
85-
& .venv\Scripts\Activate.ps1
86-
$GENERATED_DIR = "src\athena_client\generated"
87-
$BACKUP_DIR = "src\athena_client\generated_backup"
88-
89-
Copy-Item -Recurse -Path $GENERATED_DIR -Destination $BACKUP_DIR
90-
91-
# Compile protobuf files directly since compile_proto.sh won't work on Windows
92-
if (!(Test-Path "athena-protobufs\athena\athena.proto")) {
93-
Write-Host "Error: Protobuf file not found at athena-protobufs\athena\athena.proto. Ensure the submodule is initialized and updated."
94-
exit 1
95-
}
96-
97-
New-Item -ItemType Directory -Force -Path $GENERATED_DIR | Out-Null
98-
99-
python -m grpc_tools.protoc --proto_path="athena-protobufs" --python_out=$GENERATED_DIR --grpc_python_out=$GENERATED_DIR --mypy_out=$GENERATED_DIR "athena-protobufs\athena\athena.proto"
100-
101-
# Fix imports in generated files
102-
if ((Test-Path "$GENERATED_DIR\athena\athena_pb2_grpc.py") -and (Test-Path "$GENERATED_DIR\athena\athena_pb2.py")) {
103-
(Get-Content "$GENERATED_DIR\athena\athena_pb2_grpc.py") -replace '^from athena ', 'from athena_client.generated.athena ' | Set-Content "$GENERATED_DIR\athena\athena_pb2_grpc.py"
104-
(Get-Content "$GENERATED_DIR\athena\athena_pb2.py") -replace '^from athena ', 'from athena_client.generated.athena ' | Set-Content "$GENERATED_DIR\athena\athena_pb2.py"
105-
} else {
106-
Write-Host "Error: Expected files not found in $GENERATED_DIR\athena"
107-
exit 1
108-
}
109-
110-
# Simple directory comparison for Windows
111-
$differences = Compare-Object -ReferenceObject (Get-ChildItem -Recurse $GENERATED_DIR) -DifferenceObject (Get-ChildItem -Recurse $BACKUP_DIR) -Property Name, Length
112-
if ($differences) {
113-
Write-Host "Generated code differs. Please commit the changes after running compile_proto.sh."
114-
exit 1
115-
}
116-
117-
Remove-Item -Recurse -Force $BACKUP_DIR
118-
11981
- name: Run linter
12082
run: |
12183
uv run ruff check
@@ -130,7 +92,7 @@ jobs:
13092
13193
- name: Run tests
13294
run: |
133-
uv run pytest --junitxml=pytest.xml --tb=auto --cov-report=term-missing:skip-covered --cov=src tests/ | tee pytest-coverage.txt
95+
uv run pytest --junitxml=pytest.xml --tb=auto --cov-report=term-missing:skip-covered --cov=src/resolver_athena_client tests/ | tee pytest-coverage.txt
13496
13597
- name: Upload test results
13698
uses: actions/upload-artifact@v4
@@ -188,7 +150,7 @@ jobs:
188150
if: github.event_name == 'release' && github.event.action == 'published'
189151
environment:
190152
name: pypi
191-
url: https://pypi.org/p/athena-client
153+
url: https://pypi.org/p/resolver-athena-client
192154
permissions:
193155
id-token: write
194156

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The Athena client supports two authentication methods:
99

1010
### Static Token Authentication
1111
```python
12-
from athena_client.client.channel import create_channel
12+
from resolver_athena_client.client.channel import create_channel
1313

1414
# Use a pre-existing authentication token
1515
channel = create_channel(host="your-host", auth_token="your-token")
@@ -20,7 +20,7 @@ The credential helper automatically handles OAuth token acquisition and refresh:
2020

2121
```python
2222
import asyncio
23-
from athena_client.client.channel import CredentialHelper, create_channel_with_credentials
23+
from resolver_athena_client.client.channel import CredentialHelper, create_channel_with_credentials
2424

2525
async def main():
2626
# Create credential helper with OAuth settings

docs/api/client.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Client Interface
22
================
33

4-
.. currentmodule:: athena_client.client
4+
.. currentmodule:: resolver_athena_client.client
55

66
The client module provides the main interface for interacting with Athena
77
services, including the primary client class and authentication helpers.
@@ -19,7 +19,7 @@ Example:
1919
... print(result.outputs)
2020

2121

22-
.. currentmodule:: athena_client.client.athena_client
22+
.. currentmodule:: resolver_athena_client.client.athena_client
2323

2424
.. autoclass:: AthenaClient
2525
:members:
@@ -30,7 +30,7 @@ Example:
3030
Channel Management
3131
------------------
3232

33-
.. currentmodule:: athena_client.client.channel
33+
.. currentmodule:: resolver_athena_client.client.channel
3434

3535
.. autofunction:: create_channel_with_credentials
3636

@@ -55,14 +55,14 @@ Channel Management
5555
Deployment Selection
5656
--------------------
5757

58-
.. currentmodule:: athena_client.client.deployment_selector
58+
.. currentmodule:: resolver_athena_client.client.deployment_selector
5959

6060
See :doc:`deployment_selector` for deployment discovery and selection functionality.
6161

6262
Correlation and Tracing
6363
-----------------------
6464

65-
.. currentmodule:: athena_client.client.correlation
65+
.. currentmodule:: resolver_athena_client.client.correlation
6666

6767
.. autoclass:: CorrelationProvider
6868
:members:
@@ -87,7 +87,7 @@ Correlation and Tracing
8787
Utility Functions
8888
-----------------
8989

90-
.. currentmodule:: athena_client.client.utils
90+
.. currentmodule:: resolver_athena_client.client.utils
9191

9292
.. autofunction:: process_classification_outputs
9393

@@ -109,7 +109,7 @@ Utility Functions
109109
Constants
110110
---------
111111

112-
.. currentmodule:: athena_client.client.consts
112+
.. currentmodule:: resolver_athena_client.client.consts
113113

114114
Common constants used throughout the client library.
115115

@@ -127,9 +127,9 @@ Basic Classification
127127
.. code-block:: python
128128
129129
import asyncio
130-
from athena_client.client.athena_client import AthenaClient
131-
from athena_client.client.athena_options import AthenaOptions
132-
from athena_client.client.channel import create_channel
130+
from resolver_athena_client.client.athena_client import AthenaClient
131+
from resolver_athena_client.client.athena_options import AthenaOptions
132+
from resolver_athena_client.client.channel import create_channel
133133
134134
async def main():
135135
# Create channel with static token
@@ -167,9 +167,9 @@ OAuth Authentication
167167
168168
import asyncio
169169
import os
170-
from athena_client.client.athena_client import AthenaClient
171-
from athena_client.client.athena_options import AthenaOptions
172-
from athena_client.client.channel import (
170+
from resolver_athena_client.client.athena_client import AthenaClient
171+
from resolver_athena_client.client.athena_options import AthenaOptions
172+
from resolver_athena_client.client.channel import (
173173
CredentialHelper,
174174
create_channel_with_credentials
175175
)
@@ -205,12 +205,12 @@ Error Handling
205205

206206
.. code-block:: python
207207
208-
from athena_client.client.exceptions import (
208+
from resolver_athena_client.client.exceptions import (
209209
AthenaClientError,
210210
AuthenticationError,
211211
ConnectionError
212212
)
213-
from athena_client.client.utils import (
213+
from resolver_athena_client.client.utils import (
214214
process_classification_outputs,
215215
has_output_errors
216216
)

docs/api/correlation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The correlation system provides mechanisms for generating and managing
55
correlation IDs for requests. This system enables request tracing,
66
deduplication, and logging correlation across the service.
77

8-
.. module:: athena_client.client.correlation
8+
.. module:: resolver_athena_client.client.correlation
99

1010
Correlation Providers
1111
~~~~~~~~~~~~~~~~~~~~~

docs/api/deployment_selector.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The deployment selector provides functionality for discovering and selecting
55
Athena service deployments. It abstracts the complexities of deployment
66
management and provides a simple interface for listing deployments.
77

8-
.. module:: athena_client.client.deployment_selector
8+
.. module:: resolver_athena_client.client.deployment_selector
99

1010
.. autoclass:: DeploymentSelector
1111
:members:

docs/api/exceptions.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Error Handling
22
==============
33

4-
.. currentmodule:: athena_client.client.exceptions
4+
.. currentmodule:: resolver_athena_client.client.exceptions
55

66
The exceptions module provides a comprehensive hierarchy of exception types for handling various error conditions that can occur when using the Athena Client library.
77

@@ -88,7 +88,7 @@ Basic Error Handling
8888

8989
.. code-block:: python
9090
91-
from athena_client.client.exceptions import (
91+
from resolver_athena_client.client.exceptions import (
9292
AthenaError,
9393
InvalidAuthError,
9494
InvalidRequestError
@@ -118,7 +118,7 @@ OAuth Error Handling
118118

119119
.. code-block:: python
120120
121-
from athena_client.client.exceptions import (
121+
from resolver_athena_client.client.exceptions import (
122122
OAuthError,
123123
TokenExpiredError,
124124
CredentialError
@@ -145,8 +145,8 @@ Classification Error Handling
145145

146146
.. code-block:: python
147147
148-
from athena_client.client.exceptions import ClassificationOutputError
149-
from athena_client.client.utils import process_classification_outputs
148+
from resolver_athena_client.client.exceptions import ClassificationOutputError
149+
from resolver_athena_client.client.utils import process_classification_outputs
150150
151151
try:
152152
async for result in results:
@@ -174,7 +174,7 @@ Connection Error Handling
174174

175175
.. code-block:: python
176176
177-
from athena_client.client.exceptions import InvalidHostError
177+
from resolver_athena_client.client.exceptions import InvalidHostError
178178
import asyncio
179179
180180
try:
@@ -201,7 +201,7 @@ Retry Logic
201201
.. code-block:: python
202202
203203
import asyncio
204-
from athena_client.client.exceptions import (
204+
from resolver_athena_client.client.exceptions import (
205205
AthenaError,
206206
TokenExpiredError,
207207
InvalidRequestError
@@ -239,7 +239,7 @@ Graceful Degradation
239239

240240
.. code-block:: python
241241
242-
from athena_client.client.exceptions import AthenaError
242+
from resolver_athena_client.client.exceptions import AthenaError
243243
244244
async def classify_with_fallback(client, image_iterator, fallback_handler=None):
245245
"""Classify images with fallback handling."""

docs/api/grpc_wrappers.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ The GRPC wrappers module provides low-level components for interacting with the
55
Athena service via GRPC. These are consumed by the higher-level clients, you
66
should only use them directly if you are implementing a new client.
77

8-
See the :doc:`athena_protobufs:index` for more information about the protobuf definitions.
8+
See the athena-protobufs repository for more information about the protobuf definitions.
99

10-
.. module:: athena_client.grpc_wrappers
10+
.. module:: resolver_athena_client.grpc_wrappers
1111

1212
Service Clients
1313
---------------
1414

15-
.. autoclass:: athena_client.grpc_wrappers.classifier_service.ClassifierServiceClient
15+
.. autoclass:: resolver_athena_client.grpc_wrappers.classifier_service.ClassifierServiceClient
1616
:members:
1717
:special-members: __init__
1818
:show-inheritance:
@@ -24,6 +24,6 @@ The ClassifierServiceClient provides direct access to Athena service methods::
2424
classify_response = await client.classify(request)
2525

2626

27-
The ``list_deployments(request)`` method corresponds to :doc:`athena_protobufs:api_reference#listdeployments`.
27+
The ``list_deployments(request)`` method lists available deployments for classification.
2828

29-
The ``classify(request)`` method corresponds to :doc:`athena_protobufs:api_reference#classify`.
29+
The ``classify(request)`` method performs image classification using the configured deployment.

0 commit comments

Comments
 (0)