evo-objects 0.6.6__tar.gz → 0.9.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {evo_objects-0.6.6 → evo_objects-0.9.0}/PKG-INFO +7 -7
- {evo_objects-0.6.6 → evo_objects-0.9.0}/pyproject.toml +6 -6
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/client/api_client.py +57 -4
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/client/parse.py +2 -1
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/endpoints/__init__.py +1 -1
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/endpoints/api/data_api.py +2 -2
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/endpoints/api/metadata_api.py +3 -3
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/endpoints/api/objects_api.py +85 -15
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/endpoints/api/stages_api.py +2 -2
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/endpoints/models.py +102 -12
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/typed/__init__.py +4 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/typed/block_model_ref.py +8 -3
- {evo_objects-0.6.6 → evo_objects-0.9.0}/.gitignore +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/LICENSE.md +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/__init__.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/_model_config.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/client/__init__.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/client/object_client.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/data.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/endpoints/api/__init__.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/exceptions.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/io.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/parquet/__init__.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/parquet/loader.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/py.typed +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/typed/_data.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/typed/_downhole.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/typed/_grid.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/typed/_model.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/typed/_prefetch.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/typed/_utils.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/typed/attributes.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/typed/base.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/typed/downhole_collection.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/typed/downhole_intervals.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/typed/exceptions.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/typed/pointset.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/typed/regular_grid.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/typed/regular_masked_grid.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/typed/spatial.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/typed/tensor_grid.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/typed/types.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/typed/variogram.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/utils/__init__.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/utils/data.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/utils/downhole.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/utils/table_formats.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/utils/tables.py +0 -0
- {evo_objects-0.6.6 → evo_objects-0.9.0}/src/evo/objects/utils/types.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: evo-objects
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.0
|
|
4
4
|
Summary: Python SDK for using the Seequent Evo Geoscience Object API
|
|
5
5
|
Project-URL: Source, https://github.com/SeequentEvo/evo-python-sdk
|
|
6
6
|
Project-URL: Tracker, https://github.com/SeequentEvo/evo-python-sdk/issues
|
|
@@ -8,15 +8,15 @@ Project-URL: Homepage, https://www.seequent.com/
|
|
|
8
8
|
Project-URL: Documentation, https://developer.seequent.com/
|
|
9
9
|
Author-email: Seequent <support@seequent.com>
|
|
10
10
|
License-File: LICENSE.md
|
|
11
|
-
Requires-Python: >=3.
|
|
12
|
-
Requires-Dist: evo-sdk-common[jmespath]>=0.
|
|
11
|
+
Requires-Python: >=3.11.5
|
|
12
|
+
Requires-Dist: evo-sdk-common[jmespath]>=0.6.0
|
|
13
13
|
Requires-Dist: pydantic<3,>=2
|
|
14
14
|
Provides-Extra: aiohttp
|
|
15
|
-
Requires-Dist: evo-sdk-common[aiohttp]; extra == 'aiohttp'
|
|
15
|
+
Requires-Dist: evo-sdk-common[aiohttp]>=0.6.0; extra == 'aiohttp'
|
|
16
16
|
Provides-Extra: blockmodels
|
|
17
|
-
Requires-Dist: evo-blockmodels[utils]>=0.
|
|
17
|
+
Requires-Dist: evo-blockmodels[utils]>=0.11.0; extra == 'blockmodels'
|
|
18
18
|
Provides-Extra: notebooks
|
|
19
|
-
Requires-Dist: evo-sdk-common[notebooks]; extra == 'notebooks'
|
|
19
|
+
Requires-Dist: evo-sdk-common[notebooks]>=0.6.0; extra == 'notebooks'
|
|
20
20
|
Provides-Extra: utils
|
|
21
21
|
Requires-Dist: numpy; extra == 'utils'
|
|
22
22
|
Requires-Dist: pandas; extra == 'utils'
|
|
@@ -42,7 +42,7 @@ data, empowering our users to build responsive modern workflows.
|
|
|
42
42
|
|
|
43
43
|
## Pre-requisites
|
|
44
44
|
|
|
45
|
-
* Python
|
|
45
|
+
* Python 3.11.5 or higher
|
|
46
46
|
* An [application registered in Bentley](https://developer.bentley.com/register/?product=seequent-evo)
|
|
47
47
|
|
|
48
48
|
## Installation
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "evo-objects"
|
|
3
3
|
description = "Python SDK for using the Seequent Evo Geoscience Object API"
|
|
4
|
-
version = "0.
|
|
5
|
-
requires-python = ">=3.
|
|
4
|
+
version = "0.9.0"
|
|
5
|
+
requires-python = ">=3.11.5"
|
|
6
6
|
license-files = ["LICENSE.md"]
|
|
7
7
|
dynamic = ["readme"]
|
|
8
8
|
authors = [
|
|
@@ -10,7 +10,7 @@ authors = [
|
|
|
10
10
|
]
|
|
11
11
|
|
|
12
12
|
dependencies = [
|
|
13
|
-
"evo-sdk-common[jmespath]>=0.
|
|
13
|
+
"evo-sdk-common[jmespath]>=0.6.0",
|
|
14
14
|
"pydantic>=2,<3",
|
|
15
15
|
]
|
|
16
16
|
|
|
@@ -21,10 +21,10 @@ Homepage = "https://www.seequent.com/"
|
|
|
21
21
|
Documentation = "https://developer.seequent.com/"
|
|
22
22
|
|
|
23
23
|
[project.optional-dependencies]
|
|
24
|
-
aiohttp = ["evo-sdk-common[aiohttp]"]
|
|
25
|
-
notebooks = ["evo-sdk-common[notebooks]"]
|
|
24
|
+
aiohttp = ["evo-sdk-common[aiohttp]>=0.6.0"]
|
|
25
|
+
notebooks = ["evo-sdk-common[notebooks]>=0.6.0"]
|
|
26
26
|
utils = ["pyarrow", "pyarrow-stubs", "pandas", "numpy"]
|
|
27
|
-
blockmodels = ["evo-blockmodels[utils]>=0.
|
|
27
|
+
blockmodels = ["evo-blockmodels[utils]>=0.11.0"]
|
|
28
28
|
|
|
29
29
|
[dependency-groups]
|
|
30
30
|
# Dev dependencies. The version is left unspecified so the latest is installed.
|
|
@@ -21,7 +21,7 @@ from evo.common.utils import get_service_health, parse_order_by
|
|
|
21
21
|
|
|
22
22
|
from ..data import ObjectMetadata, ObjectOrderByEnum, ObjectReference, ObjectVersion, OrgObjectMetadata, Stage
|
|
23
23
|
from ..endpoints import MetadataApi, ObjectsApi, StagesApi
|
|
24
|
-
from ..endpoints.models import GeoscienceObject, MetadataUpdateBody, UpdateGeoscienceObject
|
|
24
|
+
from ..endpoints.models import GeoscienceObject, MetadataUpdateBody, MoveObjectRequest, UpdateGeoscienceObject
|
|
25
25
|
from ..exceptions import ObjectUUIDError
|
|
26
26
|
from ..io import ObjectDataDownload, ObjectDataUpload
|
|
27
27
|
from . import parse
|
|
@@ -190,7 +190,6 @@ class ObjectAPIClient(BaseAPIClient):
|
|
|
190
190
|
order_by=parsed_order_by,
|
|
191
191
|
schema_id=schema_id,
|
|
192
192
|
request_timeout=request_timeout,
|
|
193
|
-
permitted_workspaces_only=True,
|
|
194
193
|
deleted=deleted,
|
|
195
194
|
)
|
|
196
195
|
return parse.page_of_metadata(response, self._environment)
|
|
@@ -332,9 +331,13 @@ class ObjectAPIClient(BaseAPIClient):
|
|
|
332
331
|
async def move_geoscience_object(
|
|
333
332
|
self, path: str, object_dict: dict, request_timeout: int | float | tuple[int | float, int | float] | None = None
|
|
334
333
|
) -> ObjectMetadata:
|
|
335
|
-
"""Move an existing geoscience object to a new path
|
|
334
|
+
"""Move and/or rename an existing geoscience object by uploading it to a new path.
|
|
336
335
|
|
|
337
|
-
|
|
336
|
+
The path includes the object name, so a path in the same folder with a different name renames the object.
|
|
337
|
+
This uploads the object to the new path, which creates a new version of the object. To move or rename an
|
|
338
|
+
object without creating a new version, use `move_geoscience_object_by_id` instead.
|
|
339
|
+
|
|
340
|
+
:param path: The new path of the object, including its name.
|
|
338
341
|
:param object_dict: The geoscience object to be moved.
|
|
339
342
|
:param request_timeout: Timeout setting for this request. If one number is provided, it will be the
|
|
340
343
|
total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
|
|
@@ -356,6 +359,56 @@ class ObjectAPIClient(BaseAPIClient):
|
|
|
356
359
|
)
|
|
357
360
|
return parse.object_metadata(result, self._environment)
|
|
358
361
|
|
|
362
|
+
async def move_geoscience_object_by_id(
|
|
363
|
+
self,
|
|
364
|
+
object_id: UUID,
|
|
365
|
+
name: str | None = None,
|
|
366
|
+
folder_path: str | None = None,
|
|
367
|
+
folder_id: UUID | None = None,
|
|
368
|
+
request_timeout: int | float | tuple[int | float, int | float] | None = None,
|
|
369
|
+
) -> ObjectMetadata:
|
|
370
|
+
"""Move and/or rename an existing geoscience object (by UUID) without creating a new version.
|
|
371
|
+
|
|
372
|
+
Despite the name, this method also renames objects. Arguments that are `None` are left unchanged:
|
|
373
|
+
|
|
374
|
+
- Provide only `name` to rename the object in its current folder.
|
|
375
|
+
- Provide only `folder_path` and/or `folder_id` to move the object while keeping its name.
|
|
376
|
+
- Provide `name` together with a folder to move and rename the object in a single request.
|
|
377
|
+
|
|
378
|
+
If both `folder_path` and `folder_id` are provided, they must refer to the same folder.
|
|
379
|
+
|
|
380
|
+
:param object_id: The UUID of the geoscience object.
|
|
381
|
+
:param name: The new name of the object, including the `.json` extension.
|
|
382
|
+
:param folder_path: The path of the destination folder, starting with `/` and excluding the object name.
|
|
383
|
+
Missing intermediate folders are created.
|
|
384
|
+
:param folder_id: The UUID of an existing destination folder in the same workspace.
|
|
385
|
+
:param request_timeout: Timeout setting for this request. If one number is provided, it will be the
|
|
386
|
+
total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
|
|
387
|
+
|
|
388
|
+
:return: The metadata of the object. If nothing changed, because no arguments were provided or the destination
|
|
389
|
+
is the object's current location, the current metadata is returned and `modified_at` is unchanged.
|
|
390
|
+
|
|
391
|
+
:raises ObjectAlreadyExistsError: If an object with the same name already exists in the destination folder.
|
|
392
|
+
"""
|
|
393
|
+
org_id = str(self._environment.org_id)
|
|
394
|
+
workspace_id = str(self._environment.workspace_id)
|
|
395
|
+
result = await self._objects_api.move_object_by_id(
|
|
396
|
+
object_id=str(object_id),
|
|
397
|
+
org_id=org_id,
|
|
398
|
+
workspace_id=workspace_id,
|
|
399
|
+
move_object_request=MoveObjectRequest(name=name, folder_id=folder_id, folder_path=folder_path),
|
|
400
|
+
request_timeout=request_timeout,
|
|
401
|
+
)
|
|
402
|
+
if isinstance(result, EmptyResponse):
|
|
403
|
+
# The service responds with 204 No Content when nothing changed, so fetch the current metadata.
|
|
404
|
+
result = await self._objects_api.get_object_by_id(
|
|
405
|
+
object_id=str(object_id),
|
|
406
|
+
org_id=org_id,
|
|
407
|
+
workspace_id=workspace_id,
|
|
408
|
+
request_timeout=request_timeout,
|
|
409
|
+
)
|
|
410
|
+
return parse.object_metadata(result, self._environment)
|
|
411
|
+
|
|
359
412
|
async def update_geoscience_object(
|
|
360
413
|
self, object_dict: dict, request_timeout: int | float | tuple[int | float, int | float] | None = None
|
|
361
414
|
) -> ObjectMetadata:
|
|
@@ -98,7 +98,8 @@ def schema(schema_id: str) -> ObjectSchema:
|
|
|
98
98
|
|
|
99
99
|
|
|
100
100
|
def object_metadata(
|
|
101
|
-
model: models.ListedObject | models.GetObjectResponse | models.PostObjectResponse
|
|
101
|
+
model: models.ListedObject | models.GetObjectResponse | models.PostObjectResponse | models.MoveObjectResponse,
|
|
102
|
+
environment: Environment,
|
|
102
103
|
) -> ObjectMetadata:
|
|
103
104
|
"""Parse an ObjectMetadata from the generated model.
|
|
104
105
|
|
|
@@ -21,11 +21,11 @@ For more information on using the Geoscience Object API, see the [Geoscience Obj
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
This code is generated from the OpenAPI specification for Geoscience Object API.
|
|
24
|
-
API version: 1.
|
|
24
|
+
API version: 1.26.0
|
|
25
25
|
"""
|
|
26
26
|
|
|
27
27
|
from evo.common.connector import APIConnector
|
|
28
|
-
from evo.common.data import RequestMethod
|
|
28
|
+
from evo.common.data import EmptyResponse, RequestMethod # noqa: F401
|
|
29
29
|
from evo.common.utils import get_header_metadata
|
|
30
30
|
|
|
31
31
|
from ..models import * # noqa: F403
|
|
@@ -21,7 +21,7 @@ For more information on using the Geoscience Object API, see the [Geoscience Obj
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
This code is generated from the OpenAPI specification for Geoscience Object API.
|
|
24
|
-
API version: 1.
|
|
24
|
+
API version: 1.26.0
|
|
25
25
|
"""
|
|
26
26
|
|
|
27
27
|
from evo.common.connector import APIConnector
|
|
@@ -61,9 +61,9 @@ class MetadataApi:
|
|
|
61
61
|
|
|
62
62
|
Update metadata for a geoscience object version. If a version is not specified, the latest version of the object will be used. Setting the metadata property to `null` will remove the metadata from the object version.
|
|
63
63
|
|
|
64
|
-
:param object_id:
|
|
64
|
+
:param object_id: UUID of a geoscience object.
|
|
65
65
|
Format: `uuid`
|
|
66
|
-
Example: `'
|
|
66
|
+
Example: `'355fa5a6-f37d-11ed-93c1-00155d19a71b'`
|
|
67
67
|
:param org_id: The customer's organisation ID
|
|
68
68
|
Format: `uuid`
|
|
69
69
|
Example: `'b208a6c9-6881-4b97-b02d-acb5d81299bb'`
|
|
@@ -21,7 +21,7 @@ For more information on using the Geoscience Object API, see the [Geoscience Obj
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
This code is generated from the OpenAPI specification for Geoscience Object API.
|
|
24
|
-
API version: 1.
|
|
24
|
+
API version: 1.26.0
|
|
25
25
|
"""
|
|
26
26
|
|
|
27
27
|
from evo.common.connector import APIConnector
|
|
@@ -125,9 +125,9 @@ class ObjectsApi:
|
|
|
125
125
|
|
|
126
126
|
Delete a geoscience object by UUID. Deleting an object to this endpoint will soft delete the existing object with a corresponding UUID. Note that the value of the `uuid` field in the object must match the value in the URL path.
|
|
127
127
|
|
|
128
|
-
:param object_id:
|
|
128
|
+
:param object_id: UUID of a geoscience object.
|
|
129
129
|
Format: `uuid`
|
|
130
|
-
Example: `'
|
|
130
|
+
Example: `'355fa5a6-f37d-11ed-93c1-00155d19a71b'`
|
|
131
131
|
:param org_id: The customer's organisation ID
|
|
132
132
|
Format: `uuid`
|
|
133
133
|
Example: `'b208a6c9-6881-4b97-b02d-acb5d81299bb'`
|
|
@@ -446,9 +446,9 @@ class ObjectsApi:
|
|
|
446
446
|
|
|
447
447
|
List specific versions of a Geoscience Object. The response will include all the versions specified in `version_ids` field of the request body. If one or more of the version ids are not found for the geoscience object a 404 error will be returned.
|
|
448
448
|
|
|
449
|
-
:param object_id:
|
|
449
|
+
:param object_id: UUID of a geoscience object.
|
|
450
450
|
Format: `uuid`
|
|
451
|
-
Example: `'
|
|
451
|
+
Example: `'355fa5a6-f37d-11ed-93c1-00155d19a71b'`
|
|
452
452
|
:param org_id: The customer's organisation ID
|
|
453
453
|
Format: `uuid`
|
|
454
454
|
Example: `'b208a6c9-6881-4b97-b02d-acb5d81299bb'`
|
|
@@ -545,7 +545,7 @@ class ObjectsApi:
|
|
|
545
545
|
:param deleted: (optional) When true, only objects that have been deleted will be returned
|
|
546
546
|
Example: `True`
|
|
547
547
|
:param order_by: (optional) A comma separated list of fields to order by, where the default sort order is ascending. To specify the sort order, prefix the field name with either `asc:` or `desc:` for ascending or descending respectively. Field names can either be arbitrary, representing a field nested inside the data, or one of the following known sort fields: `author`, `created_at`, `created_by`, `deleted_at`, `modified_at`, `modified_by`, `object_name`
|
|
548
|
-
Example: `'
|
|
548
|
+
Example: `'object_name,desc:created_by,asc:object.a.b.c'`
|
|
549
549
|
:param author: (optional) (deprecated, use `created_by`) The profile ID that you want to filter by
|
|
550
550
|
Example: `['00000000-0000-0000-0000-000000000000']`
|
|
551
551
|
:param created_by: (optional) The UUID of the user that created an object
|
|
@@ -556,7 +556,7 @@ class ObjectsApi:
|
|
|
556
556
|
Example: `['00000000-0000-0000-0000-000000000000']`
|
|
557
557
|
:param modified_at: (optional) A date or dates (max 2) to filter objects by. Dates may contain operator prefixes, in the form `<operator>:<datetime>`. The following operators are available (`lt`=less than, `lte`=less than or equal to, `gt`=greater than, `gte`=greater than or equal to). If you omit the operator, then it is assumed the operator is 'equal to'. In this case you may only supply one date. The dates must also be in a valid ISO 8601 format. Dates may include a UTC offset. If the offset is omitted, the timezone is assumed to be UTC.
|
|
558
558
|
Example: `['gte:2023-03-10T22:56:53Z']`
|
|
559
|
-
:param object_name: (optional) The name of the object to filter on. For backwards compatibility, when no operators are supplied, this will perform a case sensitive prefix match of the object file name. The query `object_name=gold` will match an object with the name `goldcolumns.json`. Providing an operator will query over the
|
|
559
|
+
:param object_name: (optional) The name of the object to filter on. For backwards compatibility, when no operators are supplied, this will perform a case sensitive prefix match of the object file name. The query `object_name=gold` will match an object with the name `goldcolumns.json`. Providing an operator will query over the file name.
|
|
560
560
|
Example: `['object.json']`
|
|
561
561
|
:param schema_id: (optional) The type of schema you want to filter by.
|
|
562
562
|
Example: `['/objects/variogram/0.1.0/variogram.schema.json']`
|
|
@@ -662,7 +662,6 @@ class ObjectsApi:
|
|
|
662
662
|
offset: int | None = None,
|
|
663
663
|
limit: int | None = None,
|
|
664
664
|
deleted: bool | None = None,
|
|
665
|
-
permitted_workspaces_only: bool | None = None,
|
|
666
665
|
order_by: str | None = None,
|
|
667
666
|
created_by: list[str] | None = None,
|
|
668
667
|
created_at: list[str] | None = None,
|
|
@@ -689,10 +688,8 @@ class ObjectsApi:
|
|
|
689
688
|
Example: `5000`
|
|
690
689
|
:param deleted: (optional) When true, only objects that have been deleted will be returned
|
|
691
690
|
Example: `True`
|
|
692
|
-
:param permitted_workspaces_only: (optional) Only return objects in workspaces the user is permitted to access.
|
|
693
|
-
Example: `True`
|
|
694
691
|
:param order_by: (optional) A comma separated list of fields to order by, where the default sort order is ascending. To specify the sort order, prefix the field name with either `asc:` or `desc:` for ascending or descending respectively. Field names can either be arbitrary, representing a field nested inside the data, or one of the following known sort fields: `created_at`, `created_by`, `modified_at`, `modified_by`, `object_name`, `deleted_at`
|
|
695
|
-
Example: `'
|
|
692
|
+
Example: `'object_name,desc:created_by,asc:object.a.b.c'`
|
|
696
693
|
:param created_by: (optional) The UUID of the user that created an object
|
|
697
694
|
Example: `['00000000-0000-0000-0000-000000000000']`
|
|
698
695
|
:param created_at: (optional) A date or dates (max 2) to filter objects by. Dates may contain operator prefixes, in the form `<operator>:<datetime>`. The following operators are available (`lt`=less than, `lte`=less than or equal to, `gt`=greater than, `gte`=greater than or equal to). If you omit the operator, then it is assumed the operator is 'equal to'. In this case you may only supply one date. The dates must also be in a valid ISO 8601 format. Dates may include a UTC offset. If the offset is omitted, the timezone is assumed to be UTC.
|
|
@@ -701,7 +698,7 @@ class ObjectsApi:
|
|
|
701
698
|
Example: `['00000000-0000-0000-0000-000000000000']`
|
|
702
699
|
:param modified_at: (optional) A date or dates (max 2) to filter objects by. Dates may contain operator prefixes, in the form `<operator>:<datetime>`. The following operators are available (`lt`=less than, `lte`=less than or equal to, `gt`=greater than, `gte`=greater than or equal to). If you omit the operator, then it is assumed the operator is 'equal to'. In this case you may only supply one date. The dates must also be in a valid ISO 8601 format. Dates may include a UTC offset. If the offset is omitted, the timezone is assumed to be UTC.
|
|
703
700
|
Example: `['gte:2023-03-10T22:56:53Z']`
|
|
704
|
-
:param object_name: (optional) The name of the object to filter on. For backwards compatibility, when no operators are supplied, this will perform a case sensitive prefix match of the object file name. The query `object_name=gold` will match an object with the name `goldcolumns.json`. Providing an operator will query over the
|
|
701
|
+
:param object_name: (optional) The name of the object to filter on. For backwards compatibility, when no operators are supplied, this will perform a case sensitive prefix match of the object file name. The query `object_name=gold` will match an object with the name `goldcolumns.json`. Providing an operator will query over the file name.
|
|
705
702
|
Example: `['object.json']`
|
|
706
703
|
:param schema_id: (optional) The type of schema you want to filter by.
|
|
707
704
|
Example: `['/objects/variogram/0.1.0/variogram.schema.json']`
|
|
@@ -741,8 +738,6 @@ class ObjectsApi:
|
|
|
741
738
|
_query_params["limit"] = limit
|
|
742
739
|
if deleted is not None:
|
|
743
740
|
_query_params["deleted"] = deleted
|
|
744
|
-
if permitted_workspaces_only is not None:
|
|
745
|
-
_query_params["permitted_workspaces_only"] = permitted_workspaces_only
|
|
746
741
|
if order_by is not None:
|
|
747
742
|
_query_params["order_by"] = order_by
|
|
748
743
|
if created_by is not None:
|
|
@@ -799,6 +794,81 @@ class ObjectsApi:
|
|
|
799
794
|
request_timeout=request_timeout,
|
|
800
795
|
)
|
|
801
796
|
|
|
797
|
+
async def move_object_by_id(
|
|
798
|
+
self,
|
|
799
|
+
object_id: str,
|
|
800
|
+
org_id: str,
|
|
801
|
+
workspace_id: str,
|
|
802
|
+
move_object_request: MoveObjectRequest, # noqa: F405
|
|
803
|
+
additional_headers: dict[str, str] | None = None,
|
|
804
|
+
request_timeout: int | float | tuple[int | float, int | float] | None = None,
|
|
805
|
+
) -> MoveObjectResponse: # noqa: F405
|
|
806
|
+
"""Move or rename a geoscience object
|
|
807
|
+
|
|
808
|
+
Move and/or rename an object without creating a new version. Omitted or null fields are unchanged. An empty JSON object or an unchanged destination returns 204 without changing modification metadata. The object must exist and must not be deleted. Provide just `name` to only rename the object. Provide just `folder_path` and/or `folder_id` to only move the object. Providing both `folder_path` and `folder_id` allows for extra validation of the target folder. Providing either or both folder fields and name field allows for simultaneous move and rename. A real change updates modified_at and modified_by and returns the object, without a versions array.
|
|
809
|
+
|
|
810
|
+
:param object_id: UUID of a geoscience object.
|
|
811
|
+
Format: `uuid`
|
|
812
|
+
Example: `'355fa5a6-f37d-11ed-93c1-00155d19a71b'`
|
|
813
|
+
:param org_id: The customer's organisation ID
|
|
814
|
+
Format: `uuid`
|
|
815
|
+
Example: `'b208a6c9-6881-4b97-b02d-acb5d81299bb'`
|
|
816
|
+
:param workspace_id:
|
|
817
|
+
Format: `uuid`
|
|
818
|
+
Example: `'032806a8-dcd7-11ed-8d5c-00155d8f28b5'`
|
|
819
|
+
:param move_object_request:
|
|
820
|
+
Example: `endpoints.MoveObjectRequest()`
|
|
821
|
+
:param additional_headers: (optional) Additional headers to send with the request.
|
|
822
|
+
:param request_timeout: (optional) Timeout setting for this request. If one number is provided, it will be the
|
|
823
|
+
total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
|
|
824
|
+
|
|
825
|
+
:return: Returns the result object.
|
|
826
|
+
|
|
827
|
+
:raise evo.common.exceptions.BadRequestException: If the server responds with HTTP status 400.
|
|
828
|
+
:raise evo.common.exceptions.UnauthorizedException: If the server responds with HTTP status 401.
|
|
829
|
+
:raise evo.common.exceptions.ForbiddenException: If the server responds with HTTP status 403.
|
|
830
|
+
:raise evo.common.exceptions.NotFoundException: If the server responds with HTTP status 404.
|
|
831
|
+
:raise evo.common.exceptions.BaseTypedError: If the server responds with any other HTTP status between
|
|
832
|
+
400 and 599, and the body of the response contains a descriptive `type` parameter.
|
|
833
|
+
:raise evo.common.exceptions.EvoAPIException: If the server responds with any other HTTP status between 400
|
|
834
|
+
and 599, and the body of the response does not contain a `type` parameter.
|
|
835
|
+
:raise evo.common.exceptions.UnknownResponseError: For other HTTP status codes with no corresponding response
|
|
836
|
+
type in `response_types_map`.
|
|
837
|
+
"""
|
|
838
|
+
# Prepare the path parameters.
|
|
839
|
+
_path_params = {
|
|
840
|
+
"object_id": object_id,
|
|
841
|
+
"org_id": org_id,
|
|
842
|
+
"workspace_id": workspace_id,
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
# Prepare the header parameters.
|
|
846
|
+
_header_params = {
|
|
847
|
+
"Content-Type": "application/json",
|
|
848
|
+
"Accept": "application/json",
|
|
849
|
+
} | get_header_metadata(__name__)
|
|
850
|
+
if additional_headers is not None:
|
|
851
|
+
_header_params.update(additional_headers)
|
|
852
|
+
|
|
853
|
+
# Define the collection formats.
|
|
854
|
+
_collection_formats = {}
|
|
855
|
+
|
|
856
|
+
_response_types_map = {
|
|
857
|
+
"200": MoveObjectResponse, # noqa: F405
|
|
858
|
+
"204": EmptyResponse,
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
return await self.connector.call_api(
|
|
862
|
+
method=RequestMethod.PATCH,
|
|
863
|
+
resource_path="/geoscience-object/orgs/{org_id}/workspaces/{workspace_id}/objects/{object_id}",
|
|
864
|
+
path_params=_path_params,
|
|
865
|
+
header_params=_header_params,
|
|
866
|
+
body=move_object_request,
|
|
867
|
+
collection_formats=_collection_formats,
|
|
868
|
+
response_types_map=_response_types_map,
|
|
869
|
+
request_timeout=request_timeout,
|
|
870
|
+
)
|
|
871
|
+
|
|
802
872
|
async def post_objects(
|
|
803
873
|
self,
|
|
804
874
|
org_id: str,
|
|
@@ -811,7 +881,7 @@ class ObjectsApi:
|
|
|
811
881
|
) -> PostObjectResponse: # noqa: F405
|
|
812
882
|
"""Create a geoscience object
|
|
813
883
|
|
|
814
|
-
Create or update a geoscience object. Upload a geoscience object based on the schema element. Geoscience objects can be stored hierarchically,
|
|
884
|
+
Create or update a geoscience object. Upload a geoscience object based on the schema element. Geoscience objects can be stored hierarchically, by providing the path to the object, including the object name, in the request URL. A detailed list of the available object schemas can be found in Seequent's [evo-schemas](https://github.com/seequentevo/evo-schemas) repository. The submitted properties will be validated against the specified schema properties. To create a new object, upload it to a unique path with the UUID field set to `null`. The response will contain a reflection of the uploaded object with a newly assigned object ID. This can be used for future requests to update the object. If a version of the geoscience object already exists at the specified path a new version will be created. To move or rename an existing object, simply upload a new version of it (with the same UUID) to a new, unique path or file name. Note that every upload of an object is considered a new version, even if no changes have been made. If required, the object should be compressed, currently gzip compression is supported. Set header `Content-Encoding: gzip` if the content is compressed and `Accept-Encoding: gzip` to receive compressed content.
|
|
815
885
|
|
|
816
886
|
:param org_id: The customer's organisation ID
|
|
817
887
|
Format: `uuid`
|
|
@@ -21,11 +21,11 @@ For more information on using the Geoscience Object API, see the [Geoscience Obj
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
This code is generated from the OpenAPI specification for Geoscience Object API.
|
|
24
|
-
API version: 1.
|
|
24
|
+
API version: 1.26.0
|
|
25
25
|
"""
|
|
26
26
|
|
|
27
27
|
from evo.common.connector import APIConnector
|
|
28
|
-
from evo.common.data import RequestMethod
|
|
28
|
+
from evo.common.data import EmptyResponse, RequestMethod # noqa: F401
|
|
29
29
|
from evo.common.utils import get_header_metadata
|
|
30
30
|
|
|
31
31
|
from ..models import * # noqa: F403
|
|
@@ -21,6 +21,7 @@ from uuid import UUID
|
|
|
21
21
|
|
|
22
22
|
from pydantic import (
|
|
23
23
|
Field,
|
|
24
|
+
RootModel,
|
|
24
25
|
StrictBool,
|
|
25
26
|
StrictFloat,
|
|
26
27
|
StrictInt,
|
|
@@ -30,6 +31,23 @@ from pydantic import (
|
|
|
30
31
|
from .._model_config import CustomBaseModel
|
|
31
32
|
|
|
32
33
|
|
|
34
|
+
class CoordinateItem(RootModel[list[StrictFloat]]):
|
|
35
|
+
root: Annotated[list[StrictFloat], Field(max_length=2, min_length=2, title="GeoJSON Point")]
|
|
36
|
+
"""
|
|
37
|
+
A WGS84 coordinate pair [longitude, latitude]. The longitude must come before the latitude, in order to be considered a valid GeoJSON Point
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class Coordinate(RootModel[list[CoordinateItem]]):
|
|
42
|
+
root: Annotated[
|
|
43
|
+
list[CoordinateItem],
|
|
44
|
+
Field(max_length=5, min_length=5, title="GeoJSON LinearRing"),
|
|
45
|
+
]
|
|
46
|
+
"""
|
|
47
|
+
A list of GeoJSON points defining a closed linear ring. In order for the ring to be closed, the last point must be the same as the first point. Only a rectangle is supported, so the ring must be defined by 5 points.
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
|
|
33
51
|
class DataDownloadUrl(CustomBaseModel):
|
|
34
52
|
download_url: Annotated[StrictStr | None, Field(title="Download Url")] = None
|
|
35
53
|
id: Annotated[UUID, Field(title="Id")]
|
|
@@ -100,6 +118,39 @@ class MetadataUpdateBody(CustomBaseModel):
|
|
|
100
118
|
stage_id: Annotated[UUID | None, Field(title="Stage Id")] = None
|
|
101
119
|
|
|
102
120
|
|
|
121
|
+
class MoveObjectRequest(CustomBaseModel):
|
|
122
|
+
"""
|
|
123
|
+
Optional destination fields; omitted or null values leave that field unchanged.
|
|
124
|
+
"""
|
|
125
|
+
|
|
126
|
+
folder_id: Annotated[
|
|
127
|
+
UUID | None,
|
|
128
|
+
Field(examples=["442daf92-4fde-4c0a-986e-cd231db22eb7"], title="Folder Id"),
|
|
129
|
+
] = None
|
|
130
|
+
"""
|
|
131
|
+
Optional ID of an existing folder to move this object to.
|
|
132
|
+
The indicated folder must not be deleted and in the same workspace as the object being moved.
|
|
133
|
+
Can optionally be combined with `folder_path` for extra validation of the target folder.
|
|
134
|
+
Omit both `folder_id` and `folder_path` to keep the current folder.
|
|
135
|
+
"""
|
|
136
|
+
folder_path: Annotated[StrictStr | None, Field(examples=["/my/folder/path"], title="Folder Path")] = None
|
|
137
|
+
"""
|
|
138
|
+
Optional path to a folder to move this object to. Must start with a '/'.
|
|
139
|
+
Must not end with a '/' (unless the target is the root folder).
|
|
140
|
+
Does not contain the name of the object itself.
|
|
141
|
+
Folder names are 1-100 UTF-8 characters with a total max folder_path length of 1520 characters.
|
|
142
|
+
Will create all intermediate folders if they do not exist.
|
|
143
|
+
If `folder_id` is also provided then `folder_path` must match the path of the folder specified by `folder_id`.
|
|
144
|
+
Omit both `folder_id` and `folder_path` to keep the current folder.
|
|
145
|
+
"""
|
|
146
|
+
name: Annotated[StrictStr | None, Field(examples=["grid_collection.json"], title="Name")] = None
|
|
147
|
+
"""
|
|
148
|
+
Optional new name for the object. Names are 1-256 characters, must end in .json,
|
|
149
|
+
and cannot contain path separators or double dots, start with a dot, or start/end with whitespace.
|
|
150
|
+
Omit to keep the current name.
|
|
151
|
+
"""
|
|
152
|
+
|
|
153
|
+
|
|
103
154
|
class ObjectResponseLinks(CustomBaseModel):
|
|
104
155
|
data: Annotated[list[DataDownloadUrl], Field(title="Data")]
|
|
105
156
|
download: Annotated[StrictStr, Field(title="Download")]
|
|
@@ -160,12 +211,7 @@ class BoundingBox(CustomBaseModel):
|
|
|
160
211
|
"""
|
|
161
212
|
|
|
162
213
|
coordinates: Annotated[
|
|
163
|
-
list[
|
|
164
|
-
Annotated[
|
|
165
|
-
list[Annotated[list[StrictFloat], Field(max_length=2, min_length=2, title="GeoJSON Point")]],
|
|
166
|
-
Field(max_length=5, min_length=5, title="GeoJSON LinearRing"),
|
|
167
|
-
]
|
|
168
|
-
],
|
|
214
|
+
list[Coordinate],
|
|
169
215
|
Field(max_length=1, min_length=1, title="GeoJSON Polygon Coordinates"),
|
|
170
216
|
]
|
|
171
217
|
"""
|
|
@@ -193,10 +239,14 @@ class GetObjectResponse(CustomBaseModel):
|
|
|
193
239
|
deleted_at: Annotated[datetime | None, Field(title="Deleted At")] = None
|
|
194
240
|
deleted_by: User | None = None
|
|
195
241
|
etag: Annotated[StrictStr, Field(title="Etag")]
|
|
242
|
+
folder_id: Annotated[UUID | None, Field(title="Folder Id")] = None
|
|
196
243
|
geojson_bounding_box: BoundingBox | None = None
|
|
197
244
|
geojson_bounding_box_from_workspace_crs: Annotated[
|
|
198
|
-
StrictBool
|
|
199
|
-
]
|
|
245
|
+
StrictBool, Field(title="Geojson Bounding Box From Workspace Crs")
|
|
246
|
+
]
|
|
247
|
+
"""
|
|
248
|
+
True if the bounding box was calculated using the workspace CRS, else False.
|
|
249
|
+
"""
|
|
200
250
|
links: ObjectResponseLinks
|
|
201
251
|
modified_at: Annotated[datetime, Field(title="Modified At")]
|
|
202
252
|
modified_by: User | None = None
|
|
@@ -222,10 +272,14 @@ class ListedObject(CustomBaseModel):
|
|
|
222
272
|
deleted_at: Annotated[datetime | None, Field(title="Deleted At")] = None
|
|
223
273
|
deleted_by: User | None = None
|
|
224
274
|
etag: Annotated[StrictStr, Field(title="Etag")]
|
|
275
|
+
folder_id: Annotated[UUID | None, Field(title="Folder Id")] = None
|
|
225
276
|
geojson_bounding_box: BoundingBox | None = None
|
|
226
277
|
geojson_bounding_box_from_workspace_crs: Annotated[
|
|
227
|
-
StrictBool
|
|
228
|
-
]
|
|
278
|
+
StrictBool, Field(title="Geojson Bounding Box From Workspace Crs")
|
|
279
|
+
]
|
|
280
|
+
"""
|
|
281
|
+
True if the bounding box was calculated using the workspace CRS, else False.
|
|
282
|
+
"""
|
|
229
283
|
links: ListedObjectLinks
|
|
230
284
|
modified_at: Annotated[datetime, Field(title="Modified At")]
|
|
231
285
|
modified_by: User | None = None
|
|
@@ -240,16 +294,48 @@ class ListedObject(CustomBaseModel):
|
|
|
240
294
|
version_id: Annotated[StrictStr, Field(title="Version Id")]
|
|
241
295
|
|
|
242
296
|
|
|
297
|
+
class MoveObjectResponse(CustomBaseModel):
|
|
298
|
+
created_at: Annotated[datetime, Field(title="Created At")]
|
|
299
|
+
created_by: User | None = None
|
|
300
|
+
deleted_at: Annotated[datetime | None, Field(title="Deleted At")] = None
|
|
301
|
+
deleted_by: User | None = None
|
|
302
|
+
etag: Annotated[StrictStr, Field(title="Etag")]
|
|
303
|
+
folder_id: Annotated[UUID | None, Field(title="Folder Id")] = None
|
|
304
|
+
geojson_bounding_box: BoundingBox | None = None
|
|
305
|
+
geojson_bounding_box_from_workspace_crs: Annotated[
|
|
306
|
+
StrictBool, Field(title="Geojson Bounding Box From Workspace Crs")
|
|
307
|
+
]
|
|
308
|
+
"""
|
|
309
|
+
True if the bounding box was calculated using the workspace CRS, else False.
|
|
310
|
+
"""
|
|
311
|
+
links: ObjectResponseLinks
|
|
312
|
+
modified_at: Annotated[datetime, Field(title="Modified At")]
|
|
313
|
+
modified_by: User | None = None
|
|
314
|
+
object: GeoscienceObject
|
|
315
|
+
object_id: Annotated[UUID, Field(title="Object Id")]
|
|
316
|
+
object_path: Annotated[StrictStr | None, Field(title="Object Path")] = None
|
|
317
|
+
stage: StageResponse | None = None
|
|
318
|
+
version_id: Annotated[StrictStr, Field(title="Version Id")]
|
|
319
|
+
|
|
320
|
+
|
|
243
321
|
class OrgListedObject(CustomBaseModel):
|
|
244
322
|
created_at: Annotated[datetime, Field(title="Created At")]
|
|
245
323
|
created_by: User | None = None
|
|
246
324
|
deleted_at: Annotated[datetime | None, Field(title="Deleted At")] = None
|
|
247
325
|
deleted_by: User | None = None
|
|
326
|
+
folder_id: Annotated[UUID | None, Field(title="Folder Id")] = None
|
|
248
327
|
geojson_bounding_box: BoundingBox | None = None
|
|
328
|
+
geojson_bounding_box_from_workspace_crs: Annotated[
|
|
329
|
+
StrictBool, Field(title="Geojson Bounding Box From Workspace Crs")
|
|
330
|
+
]
|
|
331
|
+
"""
|
|
332
|
+
True if the bounding box was calculated using the workspace CRS, else False.
|
|
333
|
+
"""
|
|
249
334
|
modified_at: Annotated[datetime, Field(title="Modified At")]
|
|
250
335
|
modified_by: User | None = None
|
|
251
336
|
name: Annotated[StrictStr, Field(title="Name")]
|
|
252
337
|
object_id: Annotated[UUID, Field(title="Object Id")]
|
|
338
|
+
path: Annotated[StrictStr, Field(title="Path")]
|
|
253
339
|
schema_: Annotated[StrictStr, Field(alias="schema", title="Schema")]
|
|
254
340
|
stage: StageResponse | None = None
|
|
255
341
|
workspace_access: RoleEnum | None = None
|
|
@@ -263,10 +349,14 @@ class PostObjectResponse(CustomBaseModel):
|
|
|
263
349
|
deleted_at: Annotated[datetime | None, Field(title="Deleted At")] = None
|
|
264
350
|
deleted_by: User | None = None
|
|
265
351
|
etag: Annotated[StrictStr, Field(title="Etag")]
|
|
352
|
+
folder_id: Annotated[UUID | None, Field(title="Folder Id")] = None
|
|
266
353
|
geojson_bounding_box: BoundingBox | None = None
|
|
267
354
|
geojson_bounding_box_from_workspace_crs: Annotated[
|
|
268
|
-
StrictBool
|
|
269
|
-
]
|
|
355
|
+
StrictBool, Field(title="Geojson Bounding Box From Workspace Crs")
|
|
356
|
+
]
|
|
357
|
+
"""
|
|
358
|
+
True if the bounding box was calculated using the workspace CRS, else False.
|
|
359
|
+
"""
|
|
270
360
|
links: ObjectResponseLinks
|
|
271
361
|
modified_at: Annotated[datetime, Field(title="Modified At")]
|
|
272
362
|
modified_by: User | None = None
|
|
@@ -141,6 +141,8 @@ try:
|
|
|
141
141
|
ReportColumnSpec,
|
|
142
142
|
ReportResult,
|
|
143
143
|
ReportSpecificationData,
|
|
144
|
+
SpatialRelation,
|
|
145
|
+
VolumeFilter,
|
|
144
146
|
)
|
|
145
147
|
|
|
146
148
|
__all__ += [
|
|
@@ -152,6 +154,8 @@ try:
|
|
|
152
154
|
"ReportColumnSpec",
|
|
153
155
|
"ReportResult",
|
|
154
156
|
"ReportSpecificationData",
|
|
157
|
+
"SpatialRelation",
|
|
158
|
+
"VolumeFilter",
|
|
155
159
|
]
|
|
156
160
|
except ImportError:
|
|
157
161
|
pass
|
|
@@ -353,6 +353,7 @@ class BlockModel(BaseSpatialObject):
|
|
|
353
353
|
self,
|
|
354
354
|
data: ReportSpecificationData,
|
|
355
355
|
fb: IFeedback = NoFeedback,
|
|
356
|
+
preview: bool = False,
|
|
356
357
|
) -> Report:
|
|
357
358
|
"""Create a new report specification for this block model.
|
|
358
359
|
|
|
@@ -362,6 +363,8 @@ class BlockModel(BaseSpatialObject):
|
|
|
362
363
|
|
|
363
364
|
:param data: The report specification data.
|
|
364
365
|
:param fb: Optional feedback interface for progress reporting.
|
|
366
|
+
:param preview: Opt in to preview API features (required when ``data.volume_filter`` is set).
|
|
367
|
+
The returned report keeps this setting for subsequent calls.
|
|
365
368
|
:return: A Report instance representing the created report.
|
|
366
369
|
|
|
367
370
|
Example::
|
|
@@ -378,13 +381,15 @@ class BlockModel(BaseSpatialObject):
|
|
|
378
381
|
>>> report # Pretty-prints with BlockSync link
|
|
379
382
|
"""
|
|
380
383
|
typed_bm = await self._get_or_create_typed_block_model()
|
|
381
|
-
return await typed_bm.create_report(data, fb=fb)
|
|
384
|
+
return await typed_bm.create_report(data, fb=fb, preview=preview)
|
|
382
385
|
|
|
383
|
-
async def list_reports(self, fb: IFeedback = NoFeedback) -> list[Report]:
|
|
386
|
+
async def list_reports(self, fb: IFeedback = NoFeedback, preview: bool = False) -> list[Report]:
|
|
384
387
|
"""List all report specifications for this block model.
|
|
385
388
|
|
|
386
389
|
:param fb: Optional feedback interface for progress reporting.
|
|
390
|
+
:param preview: Opt in to preview API features (e.g. reports with volume filters).
|
|
391
|
+
The returned reports keep this setting for subsequent calls.
|
|
387
392
|
:return: List of Report instances.
|
|
388
393
|
"""
|
|
389
394
|
typed_bm = await self._get_or_create_typed_block_model()
|
|
390
|
-
return await typed_bm.list_reports(fb=fb)
|
|
395
|
+
return await typed_bm.list_reports(fb=fb, preview=preview)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|