Skip to content

Commit 3522462

Browse files
authored
Merge pull request #762 from superannotateai/FRIDAY_3583
Added JSONL option for prepare_export
2 parents a6e0382 + 080494b commit 3522462

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

src/superannotate/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import sys
44

55

6-
__version__ = "4.4.32"
6+
__version__ = "4.4.32dev3"
7+
78

89
os.environ.update({"sa_version": __version__})
910
sys.path.append(os.path.split(os.path.realpath(__file__))[0])

src/superannotate/lib/app/interface/sdk_interface.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1677,7 +1677,8 @@ def prepare_export(
16771677
16781678
- integration_name: The name of the integration within the platform that is being used.
16791679
- format: The format in which the data will be exported in multimodal projects.
1680-
It can be either CSV or JSON. If None, the data will be exported in the default JSON format.
1680+
The data can be exported in CSV, JSON, or JSONL format. If None, the data will be exported
1681+
in the default JSON format.
16811682
:return: metadata object of the prepared export
16821683
:rtype: dict
16831684
@@ -1715,6 +1716,8 @@ def prepare_export(
17151716
export_type = export_type.lower()
17161717
if export_type == "csv":
17171718
_export_type = 3
1719+
elif export_type == "jsonl":
1720+
_export_type = 4
17181721
response = self.controller.prepare_export(
17191722
project_name=project_name,
17201723
folder_names=folders,

src/superannotate/lib/infrastructure/annotation_adapter.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ def get_component_value(self, component_id: str):
4444
return None
4545

4646
def set_component_value(self, component_id: str, value: Any):
47-
self.annotation.setdefault("data", {}).setdefault(component_id, {})["value"] = value
47+
self.annotation.setdefault("data", {}).setdefault(component_id, {})[
48+
"value"
49+
] = value
4850
return self
4951

5052

0 commit comments

Comments
 (0)