datamint 2.3.0__py3-none-any.whl → 2.3.1__py3-none-any.whl
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.
Potentially problematic release.
This version of datamint might be problematic. Click here for more details.
- datamint/api/endpoints/annotations_api.py +31 -0
- datamint/entities/project.py +3 -1
- {datamint-2.3.0.dist-info → datamint-2.3.1.dist-info}/METADATA +1 -1
- {datamint-2.3.0.dist-info → datamint-2.3.1.dist-info}/RECORD +6 -6
- {datamint-2.3.0.dist-info → datamint-2.3.1.dist-info}/WHEEL +0 -0
- {datamint-2.3.0.dist-info → datamint-2.3.1.dist-info}/entry_points.txt +0 -0
|
@@ -6,6 +6,7 @@ from ..entity_base_api import ApiConfig, CreatableEntityApi, DeletableEntityApi
|
|
|
6
6
|
from .models_api import ModelsApi
|
|
7
7
|
from datamint.entities.annotation import Annotation
|
|
8
8
|
from datamint.entities.resource import Resource
|
|
9
|
+
from datamint.entities.project import Project
|
|
9
10
|
from datamint.apihandler.dto.annotation_dto import AnnotationType, CreateAnnotationDto, LineGeometry, BoxGeometry, CoordinateSystem, Geometry
|
|
10
11
|
import numpy as np
|
|
11
12
|
import os
|
|
@@ -997,3 +998,33 @@ class AnnotationsApi(CreatableEntityApi[Annotation], DeletableEntityApi[Annotati
|
|
|
997
998
|
) -> None:
|
|
998
999
|
"""Alias for :py:meth:`download_multiple_files`"""
|
|
999
1000
|
return self.download_multiple_files(annotations, save_paths)
|
|
1001
|
+
|
|
1002
|
+
def patch(self,
|
|
1003
|
+
annotation: str | Annotation,
|
|
1004
|
+
identifier: str) -> None:
|
|
1005
|
+
"""
|
|
1006
|
+
Update the project assignment for an annotation.
|
|
1007
|
+
|
|
1008
|
+
Args:
|
|
1009
|
+
annotation: The annotation unique id or Annotation instance.
|
|
1010
|
+
identifier: The new identifier/label for the annotation.
|
|
1011
|
+
|
|
1012
|
+
Raises:
|
|
1013
|
+
DatamintException: If the update fails.
|
|
1014
|
+
"""
|
|
1015
|
+
annotation_id = self._entid(annotation)
|
|
1016
|
+
|
|
1017
|
+
payload = {'identifier': identifier}
|
|
1018
|
+
# remove None values
|
|
1019
|
+
payload = {k: v for k, v in payload.items() if v is not None}
|
|
1020
|
+
if len(payload) == 0:
|
|
1021
|
+
_LOGGER.info("No fields to update for annotation patch.")
|
|
1022
|
+
return
|
|
1023
|
+
|
|
1024
|
+
resp = self._make_request('PATCH',
|
|
1025
|
+
f'{self.endpoint_base}/{annotation_id}',
|
|
1026
|
+
json=payload)
|
|
1027
|
+
|
|
1028
|
+
respdata = resp.json()
|
|
1029
|
+
if isinstance(respdata, dict) and 'error' in respdata:
|
|
1030
|
+
raise DatamintException(respdata['error'])
|
datamint/entities/project.py
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
from datetime import datetime
|
|
4
4
|
import logging
|
|
5
5
|
from .base_entity import BaseEntity, MISSING_FIELD
|
|
6
|
+
from typing import Any
|
|
6
7
|
|
|
7
8
|
logger = logging.getLogger(__name__)
|
|
8
9
|
|
|
@@ -43,9 +44,10 @@ class Project(BaseEntity):
|
|
|
43
44
|
resource_count: int
|
|
44
45
|
annotated_resource_count: int
|
|
45
46
|
description: str | None
|
|
46
|
-
ai_model_id: str | None
|
|
47
47
|
viewable_ai_segs: list | None
|
|
48
48
|
editable_ai_segs: list | None
|
|
49
|
+
registered_model: Any | None = MISSING_FIELD
|
|
50
|
+
ai_model_id: str | None = MISSING_FIELD
|
|
49
51
|
closed_resources_count: int = MISSING_FIELD
|
|
50
52
|
resources_to_annotate_count: int = MISSING_FIELD
|
|
51
53
|
most_recent_experiment: str | None = MISSING_FIELD # ISO timestamp string
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: datamint
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.1
|
|
4
4
|
Summary: A library for interacting with the Datamint API, designed for efficient data management, processing and Deep Learning workflows.
|
|
5
5
|
Requires-Python: >=3.10
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -4,7 +4,7 @@ datamint/api/base_api.py,sha256=Iu9oJEZ8YlIF5xcbH_M0Lkb7t9ZDNFLzjJp9bPDHW1c,1662
|
|
|
4
4
|
datamint/api/client.py,sha256=qL6kW1lUma98LieDEkhRdJAGRcsEFlaBSg2oQ3ZePYY,3466
|
|
5
5
|
datamint/api/dto/__init__.py,sha256=KOSNl1axDDE5eBt68MmsgkyE0Ds_1DDzWUg73iyoWvc,281
|
|
6
6
|
datamint/api/endpoints/__init__.py,sha256=uN2EYxSL6T5O5poVmQs8CQpyy3_MZzHfNyniORcvKUc,454
|
|
7
|
-
datamint/api/endpoints/annotations_api.py,sha256=
|
|
7
|
+
datamint/api/endpoints/annotations_api.py,sha256=jhaWkLd01zKw-lVQYhBX288o9Ew2lQ-jmRP-0fz2fx0,48185
|
|
8
8
|
datamint/api/endpoints/channels_api.py,sha256=oQqxSw9DJzAqtVQI7-tc1llTdnsm-URx8jwtXNXnhio,867
|
|
9
9
|
datamint/api/endpoints/datasetsinfo_api.py,sha256=WdzrUzK63w9gvAP6U--P65FbD-3X-jm9TPCcYnRNjas,597
|
|
10
10
|
datamint/api/endpoints/models_api.py,sha256=tbVuajc-mCsIp5AKSCoq3uQRDWgKnJaIA6tf_ck8-XY,1502
|
|
@@ -32,7 +32,7 @@ datamint/entities/annotation.py,sha256=ochAEh_JqxAe_FyYTNUfPT47KiIAG7CkBTim52bu7
|
|
|
32
32
|
datamint/entities/base_entity.py,sha256=DniakCgJ-gV7Hz8VKQA_dRYTp4DU5rcjLBVOuD1aZuA,1902
|
|
33
33
|
datamint/entities/channel.py,sha256=9fl22eSx_ng98NosfQGs18cdaRdbeC3wXL61KhSg4Zo,1601
|
|
34
34
|
datamint/entities/datasetinfo.py,sha256=O73Aq0tLflQomFzseful8a_cXqKdO9w2yP0p3zBcA-s,489
|
|
35
|
-
datamint/entities/project.py,sha256=
|
|
35
|
+
datamint/entities/project.py,sha256=FNweb1Q0ZQkWfbyijoV-UyqUXthzookdcyO-ophAl0U,2676
|
|
36
36
|
datamint/entities/resource.py,sha256=7YCVihswd-bH-2AH4aMPIddt5ejwRqRFQAszI_sTWaU,4882
|
|
37
37
|
datamint/entities/user.py,sha256=MREHDOsV9NOBEbXqiQ2ww6DmetN07CELId-ZQVpZCb8,620
|
|
38
38
|
datamint/examples/__init__.py,sha256=zcYnd5nLVme9GCTPYH-1JpGo8xXK2WEYvhzcy_2alZc,39
|
|
@@ -45,7 +45,7 @@ datamint/logging.yaml,sha256=tOMxtc2UmwlIMTK6ljtnBwTco1PNrPeq3mx2iMuSbiw,482
|
|
|
45
45
|
datamint/utils/logging_utils.py,sha256=9pRoaPrWu2jOdDCiAoUsjEdP5ZwaealWL3hjUqFvx9g,4022
|
|
46
46
|
datamint/utils/torchmetrics.py,sha256=lwU0nOtsSWfebyp7dvjlAggaqXtj5ohSEUXOg3L0hJE,2837
|
|
47
47
|
datamint/utils/visualization.py,sha256=yaUVAOHar59VrGUjpAWv5eVvQSfztFG0eP9p5Vt3l-M,4470
|
|
48
|
-
datamint-2.3.
|
|
49
|
-
datamint-2.3.
|
|
50
|
-
datamint-2.3.
|
|
51
|
-
datamint-2.3.
|
|
48
|
+
datamint-2.3.1.dist-info/METADATA,sha256=m77em4ywu5yOsk2pZV6dqnNo21UsxSaadPQPo2tNLSY,4203
|
|
49
|
+
datamint-2.3.1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
50
|
+
datamint-2.3.1.dist-info/entry_points.txt,sha256=mn5H6jPjO-rY0W0CAZ6Z_KKWhMLvyVaSpoqk77jlTI4,145
|
|
51
|
+
datamint-2.3.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|