Skip to content

Commit 370edf5

Browse files
authored
Rename groundlight_openapi_client (#201)
* Rename groundlight_openapi_client * Fix test * Bump 0.15.1
1 parent ac1c114 commit 370edf5

File tree

84 files changed

+395
-394
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+395
-394
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ install-generator: install ## Install dependencies for SDK code generator
1919
generate: install-generator ## Generate the SDK from our public openapi spec
2020
node_modules/.bin/openapi-generator-cli generate -i spec/public-api.yaml \
2121
-g python \
22-
-o ./generated
22+
-o ./generated \
23+
--additional-properties=packageName=groundlight_openapi_client
2324
poetry run datamodel-codegen --input spec/public-api.yaml --output generated/model.py
2425
poetry run black .
2526

generated/.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ stages:
88
script:
99
- pip install -r requirements.txt
1010
- pip install -r test-requirements.txt
11-
- pytest --cov=openapi_client
11+
- pytest --cov=groundlight_openapi_client
1212

1313
test-3.6:
1414
extends: .tests

generated/.openapi-generator/FILES

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -28,41 +28,41 @@ docs/RulesApi.md
2828
docs/User.md
2929
docs/UserApi.md
3030
git_push.sh
31-
openapi_client/__init__.py
32-
openapi_client/api/__init__.py
33-
openapi_client/api/detectors_api.py
34-
openapi_client/api/image_queries_api.py
35-
openapi_client/api/images_api.py
36-
openapi_client/api/notes_api.py
37-
openapi_client/api/rules_api.py
38-
openapi_client/api/user_api.py
39-
openapi_client/api_client.py
40-
openapi_client/apis/__init__.py
41-
openapi_client/configuration.py
42-
openapi_client/exceptions.py
43-
openapi_client/model/__init__.py
44-
openapi_client/model/action.py
45-
openapi_client/model/classification_result.py
46-
openapi_client/model/condition.py
47-
openapi_client/model/detector.py
48-
openapi_client/model/detector_creation_input.py
49-
openapi_client/model/detector_type_enum.py
50-
openapi_client/model/image_query.py
51-
openapi_client/model/image_query_type_enum.py
52-
openapi_client/model/inline_response200.py
53-
openapi_client/model/note.py
54-
openapi_client/model/note_creation_input.py
55-
openapi_client/model/paginated_detector_list.py
56-
openapi_client/model/paginated_image_query_list.py
57-
openapi_client/model/paginated_rule_list.py
58-
openapi_client/model/result_type_enum.py
59-
openapi_client/model/rule.py
60-
openapi_client/model/rule_base.py
61-
openapi_client/model/rule_creation_input.py
62-
openapi_client/model/user.py
63-
openapi_client/model_utils.py
64-
openapi_client/models/__init__.py
65-
openapi_client/rest.py
31+
groundlight_openapi_client/__init__.py
32+
groundlight_openapi_client/api/__init__.py
33+
groundlight_openapi_client/api/detectors_api.py
34+
groundlight_openapi_client/api/image_queries_api.py
35+
groundlight_openapi_client/api/images_api.py
36+
groundlight_openapi_client/api/notes_api.py
37+
groundlight_openapi_client/api/rules_api.py
38+
groundlight_openapi_client/api/user_api.py
39+
groundlight_openapi_client/api_client.py
40+
groundlight_openapi_client/apis/__init__.py
41+
groundlight_openapi_client/configuration.py
42+
groundlight_openapi_client/exceptions.py
43+
groundlight_openapi_client/model/__init__.py
44+
groundlight_openapi_client/model/action.py
45+
groundlight_openapi_client/model/classification_result.py
46+
groundlight_openapi_client/model/condition.py
47+
groundlight_openapi_client/model/detector.py
48+
groundlight_openapi_client/model/detector_creation_input.py
49+
groundlight_openapi_client/model/detector_type_enum.py
50+
groundlight_openapi_client/model/image_query.py
51+
groundlight_openapi_client/model/image_query_type_enum.py
52+
groundlight_openapi_client/model/inline_response200.py
53+
groundlight_openapi_client/model/note.py
54+
groundlight_openapi_client/model/note_creation_input.py
55+
groundlight_openapi_client/model/paginated_detector_list.py
56+
groundlight_openapi_client/model/paginated_image_query_list.py
57+
groundlight_openapi_client/model/paginated_rule_list.py
58+
groundlight_openapi_client/model/result_type_enum.py
59+
groundlight_openapi_client/model/rule.py
60+
groundlight_openapi_client/model/rule_base.py
61+
groundlight_openapi_client/model/rule_creation_input.py
62+
groundlight_openapi_client/model/user.py
63+
groundlight_openapi_client/model_utils.py
64+
groundlight_openapi_client/models/__init__.py
65+
groundlight_openapi_client/rest.py
6666
requirements.txt
6767
setup.cfg
6868
setup.py

generated/.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ install:
1010
- "pip install -r requirements.txt"
1111
- "pip install -r test-requirements.txt"
1212
# command to run tests
13-
script: pytest --cov=openapi_client
13+
script: pytest --cov=groundlight_openapi_client

generated/README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# openapi-client
1+
# groundlight-openapi-client
22
Easy Computer Vision powered by Natural Language
33

44
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
@@ -23,7 +23,7 @@ pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
2323

2424
Then import the package:
2525
```python
26-
import openapi_client
26+
import groundlight_openapi_client
2727
```
2828

2929
### Setuptools
@@ -37,7 +37,7 @@ python setup.py install --user
3737

3838
Then import the package:
3939
```python
40-
import openapi_client
40+
import groundlight_openapi_client
4141
```
4242

4343
## Getting Started
@@ -47,15 +47,15 @@ Please follow the [installation procedure](#installation--usage) and then run th
4747
```python
4848

4949
import time
50-
import openapi_client
50+
import groundlight_openapi_client
5151
from pprint import pprint
52-
from openapi_client.api import detectors_api
53-
from openapi_client.model.detector import Detector
54-
from openapi_client.model.detector_creation_input import DetectorCreationInput
55-
from openapi_client.model.paginated_detector_list import PaginatedDetectorList
52+
from groundlight_openapi_client.api import detectors_api
53+
from groundlight_openapi_client.model.detector import Detector
54+
from groundlight_openapi_client.model.detector_creation_input import DetectorCreationInput
55+
from groundlight_openapi_client.model.paginated_detector_list import PaginatedDetectorList
5656
# Defining the host is optional and defaults to https://api.groundlight.ai/device-api
5757
# See configuration.py for a list of all supported configuration parameters.
58-
configuration = openapi_client.Configuration(
58+
configuration = groundlight_openapi_client.Configuration(
5959
host = "https://api.groundlight.ai/device-api"
6060
)
6161

@@ -72,7 +72,7 @@ configuration.api_key['ApiToken'] = 'YOUR_API_KEY'
7272

7373

7474
# Enter a context with an instance of the API client
75-
with openapi_client.ApiClient(configuration) as api_client:
75+
with groundlight_openapi_client.ApiClient(configuration) as api_client:
7676
# Create an instance of the API class
7777
api_instance = detectors_api.DetectorsApi(api_client)
7878
detector_creation_input = DetectorCreationInput(
@@ -87,7 +87,7 @@ with openapi_client.ApiClient(configuration) as api_client:
8787
try:
8888
api_response = api_instance.create_detector(detector_creation_input)
8989
pprint(api_response)
90-
except openapi_client.ApiException as e:
90+
except groundlight_openapi_client.ApiException as e:
9191
print("Exception when calling DetectorsApi->create_detector: %s\n" % e)
9292
```
9393

@@ -152,21 +152,21 @@ support@groundlight.ai
152152

153153

154154
## Notes for Large OpenAPI documents
155-
If the OpenAPI document is large, imports in openapi_client.apis and openapi_client.models may fail with a
155+
If the OpenAPI document is large, imports in groundlight_openapi_client.apis and groundlight_openapi_client.models may fail with a
156156
RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:
157157

158158
Solution 1:
159159
Use specific imports for apis and models like:
160-
- `from openapi_client.api.default_api import DefaultApi`
161-
- `from openapi_client.model.pet import Pet`
160+
- `from groundlight_openapi_client.api.default_api import DefaultApi`
161+
- `from groundlight_openapi_client.model.pet import Pet`
162162

163163
Solution 2:
164164
Before importing the package, adjust the maximum recursion limit as shown below:
165165
```
166166
import sys
167167
sys.setrecursionlimit(1500)
168-
import openapi_client
169-
from openapi_client.apis import *
170-
from openapi_client.models import *
168+
import groundlight_openapi_client
169+
from groundlight_openapi_client.apis import *
170+
from groundlight_openapi_client.models import *
171171
```
172172

generated/docs/DetectorsApi.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# openapi_client.DetectorsApi
1+
# groundlight_openapi_client.DetectorsApi
22

33
All URIs are relative to *https://api.groundlight.ai/device-api*
44

@@ -22,14 +22,14 @@ Create a new detector.
2222

2323
```python
2424
import time
25-
import openapi_client
26-
from openapi_client.api import detectors_api
27-
from openapi_client.model.detector_creation_input import DetectorCreationInput
28-
from openapi_client.model.detector import Detector
25+
import groundlight_openapi_client
26+
from groundlight_openapi_client.api import detectors_api
27+
from groundlight_openapi_client.model.detector import Detector
28+
from groundlight_openapi_client.model.detector_creation_input import DetectorCreationInput
2929
from pprint import pprint
3030
# Defining the host is optional and defaults to https://api.groundlight.ai/device-api
3131
# See configuration.py for a list of all supported configuration parameters.
32-
configuration = openapi_client.Configuration(
32+
configuration = groundlight_openapi_client.Configuration(
3333
host = "https://api.groundlight.ai/device-api"
3434
)
3535

@@ -45,7 +45,7 @@ configuration.api_key['ApiToken'] = 'YOUR_API_KEY'
4545
# configuration.api_key_prefix['ApiToken'] = 'Bearer'
4646

4747
# Enter a context with an instance of the API client
48-
with openapi_client.ApiClient(configuration) as api_client:
48+
with groundlight_openapi_client.ApiClient(configuration) as api_client:
4949
# Create an instance of the API class
5050
api_instance = detectors_api.DetectorsApi(api_client)
5151
detector_creation_input = DetectorCreationInput(
@@ -61,7 +61,7 @@ with openapi_client.ApiClient(configuration) as api_client:
6161
try:
6262
api_response = api_instance.create_detector(detector_creation_input)
6363
pprint(api_response)
64-
except openapi_client.ApiException as e:
64+
except groundlight_openapi_client.ApiException as e:
6565
print("Exception when calling DetectorsApi->create_detector: %s\n" % e)
6666
```
6767

@@ -107,13 +107,13 @@ Retrieve a detector by its ID.
107107

108108
```python
109109
import time
110-
import openapi_client
111-
from openapi_client.api import detectors_api
112-
from openapi_client.model.detector import Detector
110+
import groundlight_openapi_client
111+
from groundlight_openapi_client.api import detectors_api
112+
from groundlight_openapi_client.model.detector import Detector
113113
from pprint import pprint
114114
# Defining the host is optional and defaults to https://api.groundlight.ai/device-api
115115
# See configuration.py for a list of all supported configuration parameters.
116-
configuration = openapi_client.Configuration(
116+
configuration = groundlight_openapi_client.Configuration(
117117
host = "https://api.groundlight.ai/device-api"
118118
)
119119

@@ -129,7 +129,7 @@ configuration.api_key['ApiToken'] = 'YOUR_API_KEY'
129129
# configuration.api_key_prefix['ApiToken'] = 'Bearer'
130130

131131
# Enter a context with an instance of the API client
132-
with openapi_client.ApiClient(configuration) as api_client:
132+
with groundlight_openapi_client.ApiClient(configuration) as api_client:
133133
# Create an instance of the API class
134134
api_instance = detectors_api.DetectorsApi(api_client)
135135
id = "id_example" # str | Choose a detector by its ID.
@@ -138,7 +138,7 @@ with openapi_client.ApiClient(configuration) as api_client:
138138
try:
139139
api_response = api_instance.get_detector(id)
140140
pprint(api_response)
141-
except openapi_client.ApiException as e:
141+
except groundlight_openapi_client.ApiException as e:
142142
print("Exception when calling DetectorsApi->get_detector: %s\n" % e)
143143
```
144144

@@ -184,13 +184,13 @@ Retrieve a list of detectors.
184184

185185
```python
186186
import time
187-
import openapi_client
188-
from openapi_client.api import detectors_api
189-
from openapi_client.model.paginated_detector_list import PaginatedDetectorList
187+
import groundlight_openapi_client
188+
from groundlight_openapi_client.api import detectors_api
189+
from groundlight_openapi_client.model.paginated_detector_list import PaginatedDetectorList
190190
from pprint import pprint
191191
# Defining the host is optional and defaults to https://api.groundlight.ai/device-api
192192
# See configuration.py for a list of all supported configuration parameters.
193-
configuration = openapi_client.Configuration(
193+
configuration = groundlight_openapi_client.Configuration(
194194
host = "https://api.groundlight.ai/device-api"
195195
)
196196

@@ -206,7 +206,7 @@ configuration.api_key['ApiToken'] = 'YOUR_API_KEY'
206206
# configuration.api_key_prefix['ApiToken'] = 'Bearer'
207207

208208
# Enter a context with an instance of the API client
209-
with openapi_client.ApiClient(configuration) as api_client:
209+
with groundlight_openapi_client.ApiClient(configuration) as api_client:
210210
# Create an instance of the API class
211211
api_instance = detectors_api.DetectorsApi(api_client)
212212
page = 1 # int | A page number within the paginated result set. (optional)
@@ -217,7 +217,7 @@ with openapi_client.ApiClient(configuration) as api_client:
217217
try:
218218
api_response = api_instance.list_detectors(page=page, page_size=page_size)
219219
pprint(api_response)
220-
except openapi_client.ApiException as e:
220+
except groundlight_openapi_client.ApiException as e:
221221
print("Exception when calling DetectorsApi->list_detectors: %s\n" % e)
222222
```
223223

0 commit comments

Comments
 (0)