From 173f62a05a47ca72d578f23d5ef58f74e481a268 Mon Sep 17 00:00:00 2001 From: Michael Vogelsong Date: Tue, 7 Feb 2023 17:39:38 -0800 Subject: [PATCH 1/6] Add requests = "^2.28.2" --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index a08a06d6..02fb63ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,6 +18,7 @@ urllib3 = "^1.26.9" frozendict = "^2.3.2" certifi = "^2021.10.8" pydantic = "^1.7.4" +requests = "^2.28.2" [tool.poetry.dev-dependencies] black = "^22.3.0" From 9bd022c6b02e7e2e959de6dc2a0763c19d714b14 Mon Sep 17 00:00:00 2001 From: Michael Vogelsong Date: Tue, 7 Feb 2023 17:48:03 -0800 Subject: [PATCH 2/6] Fix test by updating config_name --- test/integration/test_groundlight.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/integration/test_groundlight.py b/test/integration/test_groundlight.py index 2360f0ff..18b48dfb 100644 --- a/test/integration/test_groundlight.py +++ b/test/integration/test_groundlight.py @@ -38,9 +38,9 @@ def test_create_detector(gl: Groundlight): def test_create_detector_with_config_name(gl: Groundlight): - name = f"Test b4mu11-mlp {datetime.utcnow()}" # Need a unique name - query = "Test query with b4mu11-mlp?" - config_name = "b4mu11-mlp" + name = f"Test never-review {datetime.utcnow()}" # Need a unique name + query = "Test query with never-review?" + config_name = "never-review" _detector = gl.create_detector(name=name, query=query, config_name=config_name) assert str(_detector) assert isinstance(_detector, Detector) From c31a9a0873120c198813932c9af932c56a90bb03 Mon Sep 17 00:00:00 2001 From: Michael Vogelsong Date: Tue, 7 Feb 2023 17:50:54 -0800 Subject: [PATCH 3/6] Bump package version to 0.6.4 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 02fb63ec..1c541c31 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "groundlight" -version = "0.6.3" +version = "0.6.4" license = "MIT" readme = "UserGuide.md" homepage = "https://groundlight.ai" From 2033fa3c25f986c0c5d5788dc882ac71c307b111 Mon Sep 17 00:00:00 2001 From: Michael Vogelsong Date: Tue, 7 Feb 2023 17:55:51 -0800 Subject: [PATCH 4/6] Add comment --- test/integration/test_groundlight.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/integration/test_groundlight.py b/test/integration/test_groundlight.py index 18b48dfb..cb796ca0 100644 --- a/test/integration/test_groundlight.py +++ b/test/integration/test_groundlight.py @@ -38,6 +38,8 @@ def test_create_detector(gl: Groundlight): def test_create_detector_with_config_name(gl: Groundlight): + # "never-review" is a special model that always returns the same result with 100% confidence. + # It's useful for testing. name = f"Test never-review {datetime.utcnow()}" # Need a unique name query = "Test query with never-review?" config_name = "never-review" From 6f9a8636f6430920a85c3dbe218651f42a2a0703 Mon Sep 17 00:00:00 2001 From: Michael Vogelsong Date: Tue, 7 Feb 2023 18:16:18 -0800 Subject: [PATCH 5/6] Add test --- test/unit/test_imports.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 test/unit/test_imports.py diff --git a/test/unit/test_imports.py b/test/unit/test_imports.py new file mode 100644 index 00000000..596c7c20 --- /dev/null +++ b/test/unit/test_imports.py @@ -0,0 +1,8 @@ +# pylint: disable=unused-import, import-outside-toplevel +# flake8: noqa: F401 + + +def test_imports(): + """Test that all modules can be imported.""" + import groundlight + from groundlight import ApiException, Groundlight, binary_labels, client, config, images, internalapi From 8574a9b006ad22c5ad89263da0a9f7d50fca1c32 Mon Sep 17 00:00:00 2001 From: Auto-format Bot Date: Wed, 8 Feb 2023 02:19:57 +0000 Subject: [PATCH 6/6] Automatically reformatting code with black --- generated/openapi_client/api_client.py | 2 -- generated/openapi_client/model_utils.py | 1 - 2 files changed, 3 deletions(-) diff --git a/generated/openapi_client/api_client.py b/generated/openapi_client/api_client.py index 080be755..5c474462 100644 --- a/generated/openapi_client/api_client.py +++ b/generated/openapi_client/api_client.py @@ -134,7 +134,6 @@ def __call_api( _check_type: typing.Optional[bool] = None, _content_type: typing.Optional[str] = None, ): - config = self.configuration # header parameters @@ -780,7 +779,6 @@ def __call__(self, *args, **kwargs): return self.callable(self, *args, **kwargs) def call_with_http_info(self, **kwargs): - try: index = ( self.api_client.configuration.server_operation_index.get( diff --git a/generated/openapi_client/model_utils.py b/generated/openapi_client/model_utils.py index de6c1216..4ddb97a8 100644 --- a/generated/openapi_client/model_utils.py +++ b/generated/openapi_client/model_utils.py @@ -1686,7 +1686,6 @@ def get_allof_instances(self, model_args, constant_args): """ composed_instances = [] for allof_class in self._composed_schemas["allOf"]: - try: if constant_args.get("_spec_property_naming"): allof_instance = allof_class._from_openapi_data(**model_args, **constant_args)