Skip to content

Commit b961161

Browse files
committed
MINOR: improve dms_tree performance, mainly by remove urls fields by default
1 parent 562a94f commit b961161

19 files changed

+804
-50
lines changed

.openapi-generator/FILES

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ bimdata_api_client/model/layer_element.py
9393
bimdata_api_client/model/layer_element_request.py
9494
bimdata_api_client/model/layer_request.py
9595
bimdata_api_client/model/light_document.py
96+
bimdata_api_client/model/light_model.py
9697
bimdata_api_client/model/line.py
9798
bimdata_api_client/model/line_request.py
9899
bimdata_api_client/model/log_entry.py
@@ -378,6 +379,7 @@ docs/LayerElement.md
378379
docs/LayerElementRequest.md
379380
docs/LayerRequest.md
380381
docs/LightDocument.md
382+
docs/LightModel.md
381383
docs/Line.md
382384
docs/LineRequest.md
383385
docs/LogEntry.md
@@ -667,6 +669,7 @@ test/test_layer_element.py
667669
test/test_layer_element_request.py
668670
test/test_layer_request.py
669671
test/test_light_document.py
672+
test/test_light_model.py
670673
test/test_line.py
671674
test/test_line_request.py
672675
test/test_log_entry.py

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ Class | Method | HTTP request | Description
454454
*ModelApi* | [**get_model_unit**](docs/ModelApi.md#get_model_unit) | **GET** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/unit/{id} | Retrieve a Unit of a model
455455
*ModelApi* | [**get_model_units**](docs/ModelApi.md#get_model_units) | **GET** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/unit | Retrieve all Units of a model
456456
*ModelApi* | [**get_models**](docs/ModelApi.md#get_models) | **GET** /cloud/{cloud_pk}/project/{project_pk}/model | Retrieve all models
457+
*ModelApi* | [**get_models_summary**](docs/ModelApi.md#get_models_summary) | **GET** /cloud/{cloud_pk}/project/{project_pk}/model/summary | Retrieve all models summary
457458
*ModelApi* | [**get_positioned_model**](docs/ModelApi.md#get_positioned_model) | **GET** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/positioned-model/{id} | Retrieve one specific child model & position on the model
458459
*ModelApi* | [**get_positioned_models**](docs/ModelApi.md#get_positioned_models) | **GET** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/positioned-model | Retrieve all positioned child model & positions on the model
459460
*ModelApi* | [**get_processor_handler**](docs/ModelApi.md#get_processor_handler) | **GET** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/processorhandler/{id} | Retrieve a processor handler
@@ -619,6 +620,7 @@ Class | Method | HTTP request | Description
619620
- [LayerElementRequest](docs/LayerElementRequest.md)
620621
- [LayerRequest](docs/LayerRequest.md)
621622
- [LightDocument](docs/LightDocument.md)
623+
- [LightModel](docs/LightModel.md)
622624
- [Line](docs/Line.md)
623625
- [LineRequest](docs/LineRequest.md)
624626
- [LogEntry](docs/LogEntry.md)

bimdata_api_client/api/collaboration_api.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4889,6 +4889,7 @@ def __init__(self, api_client=None):
48894889
'all': [
48904890
'cloud_pk',
48914891
'id',
4892+
'with_urls',
48924893
],
48934894
'required': [
48944895
'cloud_pk',
@@ -4897,6 +4898,7 @@ def __init__(self, api_client=None):
48974898
'nullable': [
48984899
],
48994900
'enum': [
4901+
'with_urls',
49004902
],
49014903
'validation': [
49024904
]
@@ -4905,20 +4907,29 @@ def __init__(self, api_client=None):
49054907
'validations': {
49064908
},
49074909
'allowed_values': {
4910+
('with_urls',): {
4911+
4912+
"FALSE": "false",
4913+
"TRUE": "true"
4914+
},
49084915
},
49094916
'openapi_types': {
49104917
'cloud_pk':
49114918
(int,),
49124919
'id':
49134920
(int,),
4921+
'with_urls':
4922+
(str,),
49144923
},
49154924
'attribute_map': {
49164925
'cloud_pk': 'cloud_pk',
49174926
'id': 'id',
4927+
'with_urls': 'with_urls',
49184928
},
49194929
'location_map': {
49204930
'cloud_pk': 'path',
49214931
'id': 'path',
4932+
'with_urls': 'query',
49224933
},
49234934
'collection_format_map': {
49244935
}
@@ -9333,7 +9344,7 @@ def create_document(
93339344
):
93349345
"""Create a document # noqa: E501
93359346

9336-
Create a document. If the document is one of {'DXF', 'OBJ', 'IFC', 'PHOTOSPHERE', 'GLTF', 'POINT_CLOUD', 'DWG'}, a model will be created and attached to this document Required scopes: document:write # noqa: E501
9347+
Create a document. If the document is one of {'GLTF', 'OBJ', 'POINT_CLOUD', 'DXF', 'PHOTOSPHERE', 'DWG', 'IFC'}, a model will be created and attached to this document Required scopes: document:write # noqa: E501
93379348
This method makes a synchronous HTTP request by default. To make an
93389349
asynchronous HTTP request, please pass async_req=True
93399350

@@ -13667,6 +13678,7 @@ def get_project_dms_tree(
1366713678
id (int): A unique integer value identifying this project.
1366813679

1366913680
Keyword Args:
13681+
with_urls (str): By default, `file` and `office_preview` fields are set to None for performance reasons. If you want those fields, set `?with_urls=true`. . [optional]
1367013682
_return_http_data_only (bool): response data without head status
1367113683
code and headers. Default is True.
1367213684
_preload_content (bool): if False, the urllib3.HTTPResponse object

bimdata_api_client/api/model_api.py

Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
from bimdata_api_client.model.ifc_optimize_request import IfcOptimizeRequest
4646
from bimdata_api_client.model.layer import Layer
4747
from bimdata_api_client.model.layer_request import LayerRequest
48+
from bimdata_api_client.model.light_model import LightModel
4849
from bimdata_api_client.model.mask2_d import Mask2D
4950
from bimdata_api_client.model.mask2_d_request import Mask2DRequest
5051
from bimdata_api_client.model.material import Material
@@ -8247,6 +8248,119 @@ def __init__(self, api_client=None):
82478248
},
82488249
api_client=api_client
82498250
)
8251+
self.get_models_summary_endpoint = _Endpoint(
8252+
settings={
8253+
'response_type': ([LightModel],),
8254+
'auth': [
8255+
'ApiKey',
8256+
'BIMData_Connect',
8257+
'BIMData_Connect',
8258+
'Bearer'
8259+
],
8260+
'endpoint_path': '/cloud/{cloud_pk}/project/{project_pk}/model/summary',
8261+
'operation_id': 'get_models_summary',
8262+
'http_method': 'GET',
8263+
'servers': None,
8264+
},
8265+
params_map={
8266+
'all': [
8267+
'cloud_pk',
8268+
'project_pk',
8269+
'source',
8270+
'status',
8271+
'type',
8272+
],
8273+
'required': [
8274+
'cloud_pk',
8275+
'project_pk',
8276+
],
8277+
'nullable': [
8278+
],
8279+
'enum': [
8280+
'source',
8281+
'status',
8282+
'type',
8283+
],
8284+
'validation': [
8285+
]
8286+
},
8287+
root_map={
8288+
'validations': {
8289+
},
8290+
'allowed_values': {
8291+
('source',): {
8292+
8293+
"EXPORT": "EXPORT",
8294+
"MERGE": "MERGE",
8295+
"OPTIMIZED": "OPTIMIZED",
8296+
"SPLIT": "SPLIT",
8297+
"UPLOAD": "UPLOAD"
8298+
},
8299+
('status',): {
8300+
8301+
"C": "C",
8302+
"D": "D",
8303+
"E": "E",
8304+
"I": "I",
8305+
"P": "P",
8306+
"W": "W",
8307+
"X": "X"
8308+
},
8309+
('type',): {
8310+
8311+
"DWG": "DWG",
8312+
"DXF": "DXF",
8313+
"GLTF": "GLTF",
8314+
"IFC": "IFC",
8315+
"JPEG": "JPEG",
8316+
"METABUILDING": "METABUILDING",
8317+
"OBJ": "OBJ",
8318+
"PDF": "PDF",
8319+
"PHOTOSPHERE": "PHOTOSPHERE",
8320+
"PHOTOSPHERE_BUILDING": "PHOTOSPHERE_BUILDING",
8321+
"PNG": "PNG",
8322+
"POINT_CLOUD": "POINT_CLOUD"
8323+
},
8324+
},
8325+
'openapi_types': {
8326+
'cloud_pk':
8327+
(int,),
8328+
'project_pk':
8329+
(int,),
8330+
'source':
8331+
(str,),
8332+
'status':
8333+
([str],),
8334+
'type':
8335+
([str],),
8336+
},
8337+
'attribute_map': {
8338+
'cloud_pk': 'cloud_pk',
8339+
'project_pk': 'project_pk',
8340+
'source': 'source',
8341+
'status': 'status',
8342+
'type': 'type',
8343+
},
8344+
'location_map': {
8345+
'cloud_pk': 'path',
8346+
'project_pk': 'path',
8347+
'source': 'query',
8348+
'status': 'query',
8349+
'type': 'query',
8350+
},
8351+
'collection_format_map': {
8352+
'status': 'multi',
8353+
'type': 'multi',
8354+
}
8355+
},
8356+
headers_map={
8357+
'accept': [
8358+
'application/json'
8359+
],
8360+
'content_type': [],
8361+
},
8362+
api_client=api_client
8363+
)
82508364
self.get_positioned_model_endpoint = _Endpoint(
82518365
settings={
82528366
'response_type': (ModelOnModelPosition,),
@@ -22963,6 +23077,91 @@ def get_models(
2296323077
project_pk
2296423078
return self.get_models_endpoint.call_with_http_info(**kwargs)
2296523079

23080+
def get_models_summary(
23081+
self,
23082+
cloud_pk,
23083+
project_pk,
23084+
**kwargs
23085+
):
23086+
"""Retrieve all models summary # noqa: E501
23087+
23088+
Retrieve all models summary with a light payload. Required scopes: ifc:read, model:read # noqa: E501
23089+
This method makes a synchronous HTTP request by default. To make an
23090+
asynchronous HTTP request, please pass async_req=True
23091+
23092+
>>> thread = api.get_models_summary(cloud_pk, project_pk, async_req=True)
23093+
>>> result = thread.get()
23094+
23095+
Args:
23096+
cloud_pk (int):
23097+
project_pk (int):
23098+
23099+
Keyword Args:
23100+
source (str): * `UPLOAD` - UPLOAD * `SPLIT` - SPLIT * `MERGE` - MERGE * `EXPORT` - EXPORT * `OPTIMIZED` - OPTIMIZED. [optional]
23101+
status ([str]): * `C` - completed * `D` - deleted * `P` - pending * `W` - waiting * `I` - in process * `E` - errored * `X` - won't fix. [optional]
23102+
type ([str]): * `IFC` - IFC * `DWG` - DWG * `DXF` - DXF * `GLTF` - GLTF * `PDF` - PDF * `JPEG` - JPEG * `PNG` - PNG * `OBJ` - OBJ * `POINT_CLOUD` - POINT_CLOUD * `PHOTOSPHERE` - PHOTOSPHERE * `METABUILDING` - METABUILDING * `PHOTOSPHERE_BUILDING` - PHOTOSPHERE_BUILDING. [optional]
23103+
_return_http_data_only (bool): response data without head status
23104+
code and headers. Default is True.
23105+
_preload_content (bool): if False, the urllib3.HTTPResponse object
23106+
will be returned without reading/decoding response data.
23107+
Default is True.
23108+
_request_timeout (int/float/tuple): timeout setting for this request. If
23109+
one number provided, it will be total request timeout. It can also
23110+
be a pair (tuple) of (connection, read) timeouts.
23111+
Default is None.
23112+
_check_input_type (bool): specifies if type checking
23113+
should be done one the data sent to the server.
23114+
Default is True.
23115+
_check_return_type (bool): specifies if type checking
23116+
should be done one the data received from the server.
23117+
Default is True.
23118+
_spec_property_naming (bool): True if the variable names in the input data
23119+
are serialized names, as specified in the OpenAPI document.
23120+
False if the variable names in the input data
23121+
are pythonic names, e.g. snake case (default)
23122+
_content_type (str/None): force body content-type.
23123+
Default is None and content-type will be predicted by allowed
23124+
content-types and body.
23125+
_host_index (int/None): specifies the index of the server
23126+
that we want to use.
23127+
Default is read from the configuration.
23128+
async_req (bool): execute request asynchronously
23129+
23130+
Returns:
23131+
[LightModel]
23132+
If the method is called asynchronously, returns the request
23133+
thread.
23134+
"""
23135+
kwargs['async_req'] = kwargs.get(
23136+
'async_req', False
23137+
)
23138+
kwargs['_return_http_data_only'] = kwargs.get(
23139+
'_return_http_data_only', True
23140+
)
23141+
kwargs['_preload_content'] = kwargs.get(
23142+
'_preload_content', True
23143+
)
23144+
kwargs['_request_timeout'] = kwargs.get(
23145+
'_request_timeout', None
23146+
)
23147+
kwargs['_check_input_type'] = kwargs.get(
23148+
'_check_input_type', True
23149+
)
23150+
kwargs['_check_return_type'] = kwargs.get(
23151+
'_check_return_type', True
23152+
)
23153+
kwargs['_spec_property_naming'] = kwargs.get(
23154+
'_spec_property_naming', False
23155+
)
23156+
kwargs['_content_type'] = kwargs.get(
23157+
'_content_type')
23158+
kwargs['_host_index'] = kwargs.get('_host_index')
23159+
kwargs['cloud_pk'] = \
23160+
cloud_pk
23161+
kwargs['project_pk'] = \
23162+
project_pk
23163+
return self.get_models_summary_endpoint.call_with_http_info(**kwargs)
23164+
2296623165
def get_positioned_model(
2296723166
self,
2296823167
cloud_pk,

bimdata_api_client/model/document_text.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ class DocumentText(ModelNormal):
5858
allowed_values = {
5959
('language',): {
6060
'None': None,
61-
'GERMAN': "german",
62-
'ITALIAN': "italian",
6361
'ENGLISH': "english",
6462
'SPANISH': "spanish",
6563
'FRENCH': "french",
64+
'ITALIAN': "italian",
65+
'GERMAN': "german",
6666
'NULL': "null",
6767
},
6868
}
@@ -153,7 +153,7 @@ def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501
153153
through its discriminator because we passed in
154154
_visited_composed_classes = (Animal,)
155155
text (str, none_type): The full text representation of a document if the feature is enabled and the file format supported. [optional] # noqa: E501
156-
language (str, none_type): * `german` - german * `italian` - italian * `english` - english * `spanish` - spanish * `french` - french. [optional] # noqa: E501
156+
language (str, none_type): * `english` - english * `spanish` - spanish * `french` - french * `italian` - italian * `german` - german. [optional] # noqa: E501
157157
"""
158158

159159
_check_type = kwargs.pop('_check_type', True)
@@ -237,7 +237,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
237237
through its discriminator because we passed in
238238
_visited_composed_classes = (Animal,)
239239
text (str, none_type): The full text representation of a document if the feature is enabled and the file format supported. [optional] # noqa: E501
240-
language (str, none_type): * `german` - german * `italian` - italian * `english` - english * `spanish` - spanish * `french` - french. [optional] # noqa: E501
240+
language (str, none_type): * `english` - english * `spanish` - spanish * `french` - french * `italian` - italian * `german` - german. [optional] # noqa: E501
241241
"""
242242

243243
_check_type = kwargs.pop('_check_type', True)

0 commit comments

Comments
 (0)