t2d2-sdk 2.2.0__tar.gz → 2.2.2__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.
- {t2d2_sdk-2.2.0/src/t2d2_sdk.egg-info → t2d2_sdk-2.2.2}/PKG-INFO +1 -1
- {t2d2_sdk-2.2.0 → t2d2_sdk-2.2.2}/src/_version.py +2 -2
- {t2d2_sdk-2.2.0 → t2d2_sdk-2.2.2/src/t2d2_sdk.egg-info}/PKG-INFO +1 -1
- {t2d2_sdk-2.2.0 → t2d2_sdk-2.2.2}/src/t2d2_sdk.py +12 -13
- {t2d2_sdk-2.2.0 → t2d2_sdk-2.2.2}/.github/workflows/publish_pypi.yaml +0 -0
- {t2d2_sdk-2.2.0 → t2d2_sdk-2.2.2}/.github/workflows/sphinx.yml +0 -0
- {t2d2_sdk-2.2.0 → t2d2_sdk-2.2.2}/.gitignore +0 -0
- {t2d2_sdk-2.2.0 → t2d2_sdk-2.2.2}/LICENSE +0 -0
- {t2d2_sdk-2.2.0 → t2d2_sdk-2.2.2}/README.md +0 -0
- {t2d2_sdk-2.2.0 → t2d2_sdk-2.2.2}/docs/Makefile +0 -0
- {t2d2_sdk-2.2.0 → t2d2_sdk-2.2.2}/docs/make.bat +0 -0
- {t2d2_sdk-2.2.0 → t2d2_sdk-2.2.2}/docs/requirements.txt +0 -0
- {t2d2_sdk-2.2.0 → t2d2_sdk-2.2.2}/docs/source/conf.py +0 -0
- {t2d2_sdk-2.2.0 → t2d2_sdk-2.2.2}/docs/source/index.rst +0 -0
- {t2d2_sdk-2.2.0 → t2d2_sdk-2.2.2}/pyproject.toml +0 -0
- {t2d2_sdk-2.2.0 → t2d2_sdk-2.2.2}/setup.cfg +0 -0
- {t2d2_sdk-2.2.0 → t2d2_sdk-2.2.2}/src/t2d2_sdk.egg-info/SOURCES.txt +0 -0
- {t2d2_sdk-2.2.0 → t2d2_sdk-2.2.2}/src/t2d2_sdk.egg-info/dependency_links.txt +0 -0
- {t2d2_sdk-2.2.0 → t2d2_sdk-2.2.2}/src/t2d2_sdk.egg-info/requires.txt +0 -0
- {t2d2_sdk-2.2.0 → t2d2_sdk-2.2.2}/src/t2d2_sdk.egg-info/top_level.txt +0 -0
- {t2d2_sdk-2.2.0 → t2d2_sdk-2.2.2}/tests/t2d2_test.py +0 -0
|
@@ -982,28 +982,23 @@ class T2D2(object):
|
|
|
982
982
|
################################################################################################
|
|
983
983
|
def upload_reports(self, report_paths):
|
|
984
984
|
"""
|
|
985
|
-
|
|
985
|
+
Uploads reports into a project.
|
|
986
986
|
|
|
987
|
-
This method accepts a list of
|
|
987
|
+
This method accepts a list of string paths to locally available files (PDF or docx).
|
|
988
988
|
|
|
989
989
|
Args:
|
|
990
|
-
|
|
990
|
+
report_paths (list of str): A list of strings specifying local paths of files
|
|
991
991
|
|
|
992
992
|
Returns:
|
|
993
|
-
|
|
993
|
+
dict: response from API.
|
|
994
994
|
|
|
995
995
|
Raises:
|
|
996
|
-
ValueError: If `
|
|
996
|
+
ValueError: If `report_paths` is empty, not a list
|
|
997
997
|
ConnectionError: If there is a problem connecting to the T2D2 API to apply the updates.
|
|
998
998
|
|
|
999
999
|
Example:
|
|
1000
|
-
>>>
|
|
1001
|
-
|
|
1002
|
-
... {'id': 'model2_id', 'status': 'Processing'}
|
|
1003
|
-
... ]
|
|
1004
|
-
>>> updated_models = update_threed(threed_updates)
|
|
1005
|
-
>>> print(updated_models)
|
|
1006
|
-
[{'id': 'model1_id', 'name': 'updated_model1.obj', 'size': '3MB', 'status': 'Uploaded'}, ...]
|
|
1000
|
+
>>> report_path = "./reports/report_123.pdf"
|
|
1001
|
+
>>> t2d2.upload_reports([report_path])
|
|
1007
1002
|
"""
|
|
1008
1003
|
|
|
1009
1004
|
if not self.project:
|
|
@@ -1713,7 +1708,11 @@ class T2D2(object):
|
|
|
1713
1708
|
sublist = {}
|
|
1714
1709
|
for ann in annotations:
|
|
1715
1710
|
label = ann["annotation_class"]["annotation_class_name"]
|
|
1716
|
-
|
|
1711
|
+
condition = ann.get("condition", {})
|
|
1712
|
+
if isinstance(condition, dict):
|
|
1713
|
+
rating = condition.get("rating_name", "default")
|
|
1714
|
+
else:
|
|
1715
|
+
rating = "default"
|
|
1717
1716
|
area = ann["area"]
|
|
1718
1717
|
length = ann["length"]
|
|
1719
1718
|
ann_id = ann["id"]
|
|
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
|