Skip to content

Commit e01b776

Browse files
committed
More log info
1 parent 6af69cc commit e01b776

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

superannotate/analytics/common.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,9 +304,12 @@ def __get_user_metadata(annotation):
304304
logger.warning(
305305
"No annotations found in project export root %s", project_root
306306
)
307-
type_postfix = "___objects.json" if len(
308-
list(Path(project_root).rglob("*___objects.json"))
309-
) > 0 else "___pixel.json"
307+
if len(list(Path(project_root).rglob("*___objects.json"))) > 0:
308+
type_postfix = "___objects.json"
309+
logger.info("Found Vector project")
310+
else:
311+
type_postfix = "___pixel.json"
312+
logger.info("Found Pixel project")
310313
for annotation_path in annotations_paths:
311314
annotation_json = json.load(open(annotation_path))
312315
parts = annotation_path.name.split(type_postfix)

tests/test_cli.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ def test_cli_image_upload_project_export(tmpdir):
8888
shell=True
8989
)
9090

91-
assert len(list(test_dir3.glob("*.json"))) == 1
91+
assert len(list(test_dir3.glob("*.json"))) == 0
9292
assert len(list(test_dir3.glob("*.jpg"))) == 0
9393
assert len(list(test_dir3.glob("*.png"))) == 0
94+
95+
assert len(list((test_dir3 / "folder1").glob("*.json"))) == 1
96+
assert len(list((test_dir3 / "folder1").glob("*.jpg"))) == 0
97+
assert len(list((test_dir3 / "folder1").glob("*.png"))) == 0

0 commit comments

Comments
 (0)