Skip to content

Commit aa3fdcf

Browse files
michael-groundlightAuto-format Bot
andauthored
Add requests dependency (#27)
* Add requests = "^2.28.2" * Fix test by updating config_name * Bump package version to 0.6.4 * Add comment * Add test * Automatically reformatting code with black --------- Co-authored-by: Auto-format Bot <runner@fv-az255-5.54km3ax3mhvehkq0h1bkgrewib.dx.internal.cloudapp.net>
1 parent eb89ebf commit aa3fdcf

File tree

5 files changed

+15
-7
lines changed

5 files changed

+15
-7
lines changed

generated/openapi_client/api_client.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ def __call_api(
134134
_check_type: typing.Optional[bool] = None,
135135
_content_type: typing.Optional[str] = None,
136136
):
137-
138137
config = self.configuration
139138

140139
# header parameters
@@ -780,7 +779,6 @@ def __call__(self, *args, **kwargs):
780779
return self.callable(self, *args, **kwargs)
781780

782781
def call_with_http_info(self, **kwargs):
783-
784782
try:
785783
index = (
786784
self.api_client.configuration.server_operation_index.get(

generated/openapi_client/model_utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1686,7 +1686,6 @@ def get_allof_instances(self, model_args, constant_args):
16861686
"""
16871687
composed_instances = []
16881688
for allof_class in self._composed_schemas["allOf"]:
1689-
16901689
try:
16911690
if constant_args.get("_spec_property_naming"):
16921691
allof_instance = allof_class._from_openapi_data(**model_args, **constant_args)

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "groundlight"
3-
version = "0.6.3"
3+
version = "0.6.4"
44
license = "MIT"
55
readme = "UserGuide.md"
66
homepage = "https://groundlight.ai"
@@ -18,6 +18,7 @@ urllib3 = "^1.26.9"
1818
frozendict = "^2.3.2"
1919
certifi = "^2021.10.8"
2020
pydantic = "^1.7.4"
21+
requests = "^2.28.2"
2122

2223
[tool.poetry.dev-dependencies]
2324
black = "^22.3.0"

test/integration/test_groundlight.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@ def test_create_detector(gl: Groundlight):
3838

3939

4040
def test_create_detector_with_config_name(gl: Groundlight):
41-
name = f"Test b4mu11-mlp {datetime.utcnow()}" # Need a unique name
42-
query = "Test query with b4mu11-mlp?"
43-
config_name = "b4mu11-mlp"
41+
# "never-review" is a special model that always returns the same result with 100% confidence.
42+
# It's useful for testing.
43+
name = f"Test never-review {datetime.utcnow()}" # Need a unique name
44+
query = "Test query with never-review?"
45+
config_name = "never-review"
4446
_detector = gl.create_detector(name=name, query=query, config_name=config_name)
4547
assert str(_detector)
4648
assert isinstance(_detector, Detector)

test/unit/test_imports.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# pylint: disable=unused-import, import-outside-toplevel
2+
# flake8: noqa: F401
3+
4+
5+
def test_imports():
6+
"""Test that all modules can be imported."""
7+
import groundlight
8+
from groundlight import ApiException, Groundlight, binary_labels, client, config, images, internalapi

0 commit comments

Comments
 (0)