From a3e2d191ffbf8bfcb5c8de7a3f1fc0a669687e5e Mon Sep 17 00:00:00 2001 From: Leo Dirac Date: Tue, 23 May 2023 16:17:04 -0700 Subject: [PATCH 1/3] Friendly string for Groundlight SDK client object including redacted API key and endpoint if configured. --- src/groundlight/client.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/groundlight/client.py b/src/groundlight/client.py index 7fc3d8c6..811b0192 100644 --- a/src/groundlight/client.py +++ b/src/groundlight/client.py @@ -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" ImageQuery: """Post-process the image query so we don't use confusing internal labels. From 27e433501fc5d6473995f9b37b093f2a424fbfeb Mon Sep 17 00:00:00 2001 From: Leo Dirac Date: Mon, 5 Jun 2023 23:45:11 +0000 Subject: [PATCH 2/3] Updating to checkout@v3 to fix cicd. --- .github/workflows/cicd.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cicd.yaml b/.github/workflows/cicd.yaml index 64adc557..7270c887 100644 --- a/.github/workflows/cicd.yaml +++ b/.github/workflows/cicd.yaml @@ -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 From d16a3e1da88b5008bfbda5989332ce2b265aeae2 Mon Sep 17 00:00:00 2001 From: Auto-format Bot Date: Mon, 5 Jun 2023 23:46:06 +0000 Subject: [PATCH 3/3] Automatically reformatting code --- src/groundlight/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/groundlight/client.py b/src/groundlight/client.py index 811b0192..9d304c5e 100644 --- a/src/groundlight/client.py +++ b/src/groundlight/client.py @@ -67,7 +67,7 @@ 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_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)