From 8de49c2e4b8e526fa50bb68884f9b1dbdbce6ba7 Mon Sep 17 00:00:00 2001 From: brandon Date: Tue, 5 Mar 2024 10:15:56 -0800 Subject: [PATCH 1/2] Feels like if our client raises a special error, we should allow users to catch it --- src/groundlight/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/groundlight/__init__.py b/src/groundlight/__init__.py index b5339413..58a79fee 100644 --- a/src/groundlight/__init__.py +++ b/src/groundlight/__init__.py @@ -4,6 +4,8 @@ # Imports from our code from .client import Groundlight +from .client import GroundlightClientError +from .client import ApiTokenError from .binary_labels import Label from .version import get_version From 16d13822e95e7f18115546a5c72fc90c366300ca Mon Sep 17 00:00:00 2001 From: brandon Date: Thu, 14 Mar 2024 09:44:55 -0700 Subject: [PATCH 2/2] taking suggestion to add error to docs --- sphinx_docs/models.rst | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/sphinx_docs/models.rst b/sphinx_docs/models.rst index 1055119b..7fe069ad 100644 --- a/sphinx_docs/models.rst +++ b/sphinx_docs/models.rst @@ -1,23 +1,22 @@ SDK Client ===================== -.. autoclass:: groundlight.Groundlight +.. autoclass:: groundlight.Groundlight :members: :special-members: __init__ - :exclude-members: ApiTokenError API Response Objects ===================== -.. autopydantic_model:: model.Detector - :model-show-json: True +.. autopydantic_model:: model.Detector + :model-show-json: True .. autopydantic_model:: model.ImageQuery - :model-show-json: True + :model-show-json: True .. autopydantic_model:: model.PaginatedDetectorList - :model-show-json: True + :model-show-json: True .. autopydantic_model:: model.PaginatedImageQueryList - :model-show-json: True \ No newline at end of file + :model-show-json: True \ No newline at end of file