Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: get code
uses: actions/checkout@v1
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: install python
Expand Down
8 changes: 8 additions & 0 deletions src/groundlight/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,18 @@ def __init__(self, endpoint: Optional[str] = None, api_token: Optional[str] = No

configuration.api_key["ApiToken"] = api_token

self.api_token = api_token[:20] + "..." # redact the secret
self.api_client = GroundlightApiClient(configuration)
self.detectors_api = DetectorsApi(self.api_client)
self.image_queries_api = ImageQueriesApi(self.api_client)

def __str__(self) -> str:
out = f"<Groundlight api_token='{self.api_token}'"
if self.endpoint != "https://api.groundlight.ai/":
out += " endpoint={self.endpoint}"
out += ">"
return out

@classmethod
def _post_process_image_query(cls, iq: ImageQuery) -> ImageQuery:
"""Post-process the image query so we don't use confusing internal labels.
Expand Down