Skip to content

Commit 8708530

Browse files
committed
run make check, formatted, fixed some linting and mypy complaints.
1 parent a8c099c commit 8708530

File tree

153 files changed

+3767
-5316
lines changed

Some content is hidden

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

153 files changed

+3767
-5316
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ repos:
1414
hooks:
1515
- id: ruff
1616
args: [--exit-non-zero-on-fix]
17+
exclude: 'pyvcell/api/.*\.py'
1718
- id: ruff-format
1819

1920
- repo: https://github.com/pre-commit/mirrors-prettier

poetry.lock

Lines changed: 135 additions & 132 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,13 @@ orjson = "^3.10.3"
2121
vtk = "^9.3.1"
2222
pyvcell-fvsolver = "^0.1.0"
2323
typer = "^0.12.3"
24-
jupyter = "^1.1.1"
2524
pydantic = "^2.10.5"
2625
requests-oauth2client = "^1.6.0"
26+
jupyter = {version = "^1.1.1", optional = true}
27+
overrides = "^7.7.0"
28+
29+
[tool.poetry.extras]
30+
notebooks = ["jupyter"]
2731

2832
[tool.poetry.group.dev.dependencies]
2933
pytest = "^7.2.0"

pyvcell/api/vcell_client/__init__.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,17 @@
33
# flake8: noqa
44

55
"""
6-
VCell API
6+
VCell API
77
8-
VCell API
8+
VCell API
99
10-
The version of the OpenAPI document: 1.0.1
11-
Contact: vcell_support@uchc.com
12-
Generated by OpenAPI Generator (https://openapi-generator.tech)
10+
The version of the OpenAPI document: 1.0.1
11+
Contact: vcell_support@uchc.com
12+
Generated by OpenAPI Generator (https://openapi-generator.tech)
1313
14-
Do not edit the class manually.
14+
Do not edit the class manually.
1515
""" # noqa: E501
1616

17-
1817
__version__ = "1.0.0"
1918

2019
# import apis into sdk package
@@ -84,7 +83,6 @@
8483
"PublicationResourceApi",
8584
"SimulationResourceApi",
8685
"UsersResourceApi",
87-
8886
"ApiResponse",
8987
"ApiClient",
9088
"Configuration",
@@ -94,4 +92,4 @@
9492
"ApiKeyError",
9593
"ApiAttributeError",
9694
"ApiException",
97-
]
95+
]

pyvcell/api/vcell_client/api/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@
88
from pyvcell.api.vcell_client.api.publication_resource_api import PublicationResourceApi
99
from pyvcell.api.vcell_client.api.simulation_resource_api import SimulationResourceApi
1010
from pyvcell.api.vcell_client.api.users_resource_api import UsersResourceApi
11-
Lines changed: 32 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,18 @@
1-
# coding: utf-8
2-
31
"""
4-
VCell API
2+
VCell API
53
6-
VCell API
4+
VCell API
75
8-
The version of the OpenAPI document: 1.0.1
9-
Contact: vcell_support@uchc.com
10-
Generated by OpenAPI Generator (https://openapi-generator.tech)
6+
The version of the OpenAPI document: 1.0.1
7+
Contact: vcell_support@uchc.com
8+
Generated by OpenAPI Generator (https://openapi-generator.tech)
119
12-
Do not edit the class manually.
13-
""" # noqa: E501
10+
Do not edit the class manually.
11+
"""
1412

15-
import warnings
16-
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17-
from typing import Any, Dict, List, Optional, Tuple, Union
18-
from typing_extensions import Annotated
13+
from typing import Annotated, Any, Dict, List, Optional, Tuple, Union
1914

20-
from pydantic import StrictBytes, StrictStr
21-
from typing import Tuple, Union
15+
from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call
2216

2317
from pyvcell.api.vcell_client.api_client import ApiClient, RequestSerialized
2418
from pyvcell.api.vcell_client.api_response import ApiResponse
@@ -37,17 +31,13 @@ def __init__(self, api_client=None) -> None:
3731
api_client = ApiClient.get_default()
3832
self.api_client = api_client
3933

40-
4134
@validate_call
4235
def get_usage(
4336
self,
4437
_request_timeout: Union[
4538
None,
4639
Annotated[StrictFloat, Field(gt=0)],
47-
Tuple[
48-
Annotated[StrictFloat, Field(gt=0)],
49-
Annotated[StrictFloat, Field(gt=0)]
50-
]
40+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
5141
] = None,
5242
_request_auth: Optional[Dict[StrictStr, Any]] = None,
5343
_content_type: Optional[StrictStr] = None,
@@ -77,39 +67,29 @@ def get_usage(
7767
in the spec for a single request.
7868
:type _host_index: int, optional
7969
:return: Returns the result object.
80-
""" # noqa: E501
70+
"""
8171

8272
_param = self._get_usage_serialize(
83-
_request_auth=_request_auth,
84-
_content_type=_content_type,
85-
_headers=_headers,
86-
_host_index=_host_index
73+
_request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
8774
)
8875

8976
_response_types_map: Dict[str, Optional[str]] = {
90-
'200': "bytearray",
77+
"200": "bytearray",
9178
}
92-
response_data = self.api_client.call_api(
93-
*_param,
94-
_request_timeout=_request_timeout
95-
)
79+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
9680
response_data.read()
9781
return self.api_client.response_deserialize(
9882
response_data=response_data,
9983
response_types_map=_response_types_map,
10084
).data
10185

102-
10386
@validate_call
10487
def get_usage_with_http_info(
10588
self,
10689
_request_timeout: Union[
10790
None,
10891
Annotated[StrictFloat, Field(gt=0)],
109-
Tuple[
110-
Annotated[StrictFloat, Field(gt=0)],
111-
Annotated[StrictFloat, Field(gt=0)]
112-
]
92+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
11393
] = None,
11494
_request_auth: Optional[Dict[StrictStr, Any]] = None,
11595
_content_type: Optional[StrictStr] = None,
@@ -139,39 +119,29 @@ def get_usage_with_http_info(
139119
in the spec for a single request.
140120
:type _host_index: int, optional
141121
:return: Returns the result object.
142-
""" # noqa: E501
122+
"""
143123

144124
_param = self._get_usage_serialize(
145-
_request_auth=_request_auth,
146-
_content_type=_content_type,
147-
_headers=_headers,
148-
_host_index=_host_index
125+
_request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
149126
)
150127

151128
_response_types_map: Dict[str, Optional[str]] = {
152-
'200': "bytearray",
129+
"200": "bytearray",
153130
}
154-
response_data = self.api_client.call_api(
155-
*_param,
156-
_request_timeout=_request_timeout
157-
)
131+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
158132
response_data.read()
159133
return self.api_client.response_deserialize(
160134
response_data=response_data,
161135
response_types_map=_response_types_map,
162136
)
163137

164-
165138
@validate_call
166139
def get_usage_without_preload_content(
167140
self,
168141
_request_timeout: Union[
169142
None,
170143
Annotated[StrictFloat, Field(gt=0)],
171-
Tuple[
172-
Annotated[StrictFloat, Field(gt=0)],
173-
Annotated[StrictFloat, Field(gt=0)]
174-
]
144+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
175145
] = None,
176146
_request_auth: Optional[Dict[StrictStr, Any]] = None,
177147
_content_type: Optional[StrictStr] = None,
@@ -201,45 +171,34 @@ def get_usage_without_preload_content(
201171
in the spec for a single request.
202172
:type _host_index: int, optional
203173
:return: Returns the result object.
204-
""" # noqa: E501
174+
"""
205175

206176
_param = self._get_usage_serialize(
207-
_request_auth=_request_auth,
208-
_content_type=_content_type,
209-
_headers=_headers,
210-
_host_index=_host_index
177+
_request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
211178
)
212179

213180
_response_types_map: Dict[str, Optional[str]] = {
214-
'200': "bytearray",
181+
"200": "bytearray",
215182
}
216-
response_data = self.api_client.call_api(
217-
*_param,
218-
_request_timeout=_request_timeout
219-
)
183+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
220184
return response_data.response
221185

222-
223186
def _get_usage_serialize(
224187
self,
225188
_request_auth,
226189
_content_type,
227190
_headers,
228191
_host_index,
229192
) -> RequestSerialized:
230-
231193
_host = None
232194

233-
_collection_formats: Dict[str, str] = {
234-
}
195+
_collection_formats: Dict[str, str] = {}
235196

236197
_path_params: Dict[str, str] = {}
237198
_query_params: List[Tuple[str, str]] = []
238199
_header_params: Dict[str, Optional[str]] = _headers or {}
239200
_form_params: List[Tuple[str, str]] = []
240-
_files: Dict[
241-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
242-
] = {}
201+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
243202
_body_params: Optional[bytes] = None
244203

245204
# process the path parameters
@@ -248,23 +207,16 @@ def _get_usage_serialize(
248207
# process the form parameters
249208
# process the body parameter
250209

251-
252210
# set the HTTP header `Accept`
253-
if 'Accept' not in _header_params:
254-
_header_params['Accept'] = self.api_client.select_header_accept(
255-
[
256-
'application/pdf'
257-
]
258-
)
259-
211+
if "Accept" not in _header_params:
212+
_header_params["Accept"] = self.api_client.select_header_accept(["application/pdf"])
260213

261214
# authentication setting
262-
_auth_settings: List[str] = [
263-
]
215+
_auth_settings: List[str] = []
264216

265217
return self.api_client.param_serialize(
266-
method='GET',
267-
resource_path='/api/v1/admin/usage',
218+
method="GET",
219+
resource_path="/api/v1/admin/usage",
268220
path_params=_path_params,
269221
query_params=_query_params,
270222
header_params=_header_params,
@@ -274,7 +226,5 @@ def _get_usage_serialize(
274226
auth_settings=_auth_settings,
275227
collection_formats=_collection_formats,
276228
_host=_host,
277-
_request_auth=_request_auth
229+
_request_auth=_request_auth,
278230
)
279-
280-

0 commit comments

Comments
 (0)