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) diff --git a/pyproject.toml b/pyproject.toml index a08a06d6..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" @@ -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" diff --git a/test/integration/test_groundlight.py b/test/integration/test_groundlight.py index 2360f0ff..cb796ca0 100644 --- a/test/integration/test_groundlight.py +++ b/test/integration/test_groundlight.py @@ -38,9 +38,11 @@ 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" + # "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" _detector = gl.create_detector(name=name, query=query, config_name=config_name) assert str(_detector) assert isinstance(_detector, Detector) 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