dtlpy 1.104.14__py3-none-any.whl → 1.106.5__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.
- dtlpy/__init__.py +0 -8
- dtlpy/__version__.py +1 -1
- dtlpy/entities/annotation.py +11 -0
- dtlpy/entities/annotation_definitions/box.py +5 -62
- dtlpy/entities/compute.py +1 -0
- dtlpy/entities/dataset.py +43 -11
- dtlpy/entities/item.py +16 -3
- dtlpy/entities/ontology.py +4 -1
- dtlpy/entities/prompt_item.py +9 -0
- dtlpy/entities/service.py +0 -6
- dtlpy/new_instance.py +0 -3
- dtlpy/repositories/annotations.py +26 -0
- dtlpy/repositories/computes.py +10 -4
- dtlpy/repositories/datasets.py +45 -9
- dtlpy/repositories/downloader.py +10 -3
- dtlpy/repositories/integrations.py +115 -27
- dtlpy/repositories/items.py +40 -2
- dtlpy/repositories/projects.py +0 -8
- dtlpy/repositories/settings.py +0 -13
- dtlpy/repositories/tasks.py +33 -0
- dtlpy/services/api_client.py +0 -53
- dtlpy/services/check_sdk.py +0 -26
- {dtlpy-1.104.14.dist-info → dtlpy-1.106.5.dist-info}/METADATA +1 -1
- {dtlpy-1.104.14.dist-info → dtlpy-1.106.5.dist-info}/RECORD +32 -32
- tests/features/environment.py +34 -0
- {dtlpy-1.104.14.data → dtlpy-1.106.5.data}/scripts/dlp +0 -0
- {dtlpy-1.104.14.data → dtlpy-1.106.5.data}/scripts/dlp.bat +0 -0
- {dtlpy-1.104.14.data → dtlpy-1.106.5.data}/scripts/dlp.py +0 -0
- {dtlpy-1.104.14.dist-info → dtlpy-1.106.5.dist-info}/LICENSE +0 -0
- {dtlpy-1.104.14.dist-info → dtlpy-1.106.5.dist-info}/WHEEL +0 -0
- {dtlpy-1.104.14.dist-info → dtlpy-1.106.5.dist-info}/entry_points.txt +0 -0
- {dtlpy-1.104.14.dist-info → dtlpy-1.106.5.dist-info}/top_level.txt +0 -0
tests/features/environment.py
CHANGED
|
@@ -282,6 +282,11 @@ def after_tag(context, tag):
|
|
|
282
282
|
use_fixture(restore_json_file, context)
|
|
283
283
|
except Exception:
|
|
284
284
|
logging.exception('Failed to restore json file')
|
|
285
|
+
elif tag == 'compute_serviceDriver.delete':
|
|
286
|
+
try:
|
|
287
|
+
use_fixture(delete_compute_servicedriver, context)
|
|
288
|
+
except Exception:
|
|
289
|
+
logging.exception('Failed to delete service')
|
|
285
290
|
elif tag == 'frozen_dataset':
|
|
286
291
|
pass
|
|
287
292
|
elif 'testrail-C' in tag:
|
|
@@ -504,7 +509,36 @@ def models_delete(context):
|
|
|
504
509
|
assert all_deleted
|
|
505
510
|
|
|
506
511
|
|
|
512
|
+
def delete_compute_servicedriver(context):
|
|
513
|
+
if not hasattr(context, 'to_delete_computes_ids') and not hasattr(context, 'to_delete_service_drivers_ids'):
|
|
514
|
+
return
|
|
515
|
+
|
|
516
|
+
all_deleted = True
|
|
517
|
+
for service_driver_id in context.to_delete_service_drivers_ids:
|
|
518
|
+
try:
|
|
519
|
+
context.dl.service_drivers.delete(service_driver_id=service_driver_id)
|
|
520
|
+
except context.dl.exceptions.NotFound:
|
|
521
|
+
pass
|
|
522
|
+
except:
|
|
523
|
+
all_deleted = False
|
|
524
|
+
logging.exception('Failed deleting serviceDriver: {}'.format(service_driver_id))
|
|
525
|
+
assert all_deleted
|
|
526
|
+
|
|
527
|
+
all_deleted = True
|
|
528
|
+
for compute_id in context.to_delete_computes_ids:
|
|
529
|
+
try:
|
|
530
|
+
context.dl.computes.delete(compute_id=compute_id)
|
|
531
|
+
except context.dl.exceptions.NotFound:
|
|
532
|
+
pass
|
|
533
|
+
except:
|
|
534
|
+
all_deleted = False
|
|
535
|
+
logging.exception('Failed deleting compute: {}'.format(compute_id))
|
|
536
|
+
assert all_deleted
|
|
537
|
+
|
|
538
|
+
|
|
507
539
|
def restore_json_file(context):
|
|
540
|
+
if not hasattr(context.feature, 'dataloop_feature_project'):
|
|
541
|
+
return
|
|
508
542
|
if not hasattr(context, 'backup_path') or not hasattr(context, 'original_path'):
|
|
509
543
|
assert False, 'Please make sure to set the original_path and backup_path in the context'
|
|
510
544
|
# Restore the file from the backup
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|