Skip to content

Commit 7d5d85a

Browse files
github-actions[bot]github-actionsHNicolasNicolas Hervé
authored
chore: merge release/2.153.0 into main (#1671)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions <[email protected]> Co-authored-by: Nicolas Hervé <[email protected]> Co-authored-by: Nicolas Hervé <[email protected]>
1 parent be9e06b commit 7d5d85a

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = ["setuptools", "wheel"]
33

44
[project]
55
name = "kili"
6-
version = "2.152.0"
6+
version = "2.153.0"
77
description = "Python client for Kili Technology labeling tool"
88
readme = "README.md"
99
authors = [{ name = "Kili Technology", email = "[email protected]" }]

src/kili/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Kili Python SDK."""
22

3-
__version__ = "2.152.0"
3+
__version__ = "2.153.0"

src/kili/use_cases/cloud_storage/azure.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def get_blob_paths_azure_data_connection_with_service_credentials(
2626
connection_url=data_integration["azureConnectionURL"],
2727
).get_blob_paths_azure_data_connection_with_service_credentials(
2828
input_type=input_type,
29+
selected_folders=data_connection.get("selectedFolders"),
2930
prefix=data_connection.get("prefix"),
3031
include=data_connection.get("include"),
3132
exclude=data_connection.get("exclude"),
@@ -98,7 +99,8 @@ def _generate_regex_pattern(pattern: str) -> str:
9899
def get_blob_paths_azure_data_connection_with_service_credentials(
99100
self,
100101
input_type: InputType,
101-
prefix: Optional[str] = "",
102+
selected_folders: Optional[List[str]] = None,
103+
prefix: Optional[str] = None,
102104
include: Optional[List[str]] = None,
103105
exclude: Optional[List[str]] = None,
104106
) -> Tuple[List[str], List[str], List[str]]:
@@ -112,6 +114,15 @@ def get_blob_paths_azure_data_connection_with_service_credentials(
112114
if not hasattr(blob, "name") or not isinstance(blob.name, str):
113115
continue
114116

117+
if (
118+
prefix is None
119+
and isinstance(selected_folders, List)
120+
and not any(
121+
blob.name.startswith(selected_folder) for selected_folder in selected_folders
122+
)
123+
):
124+
continue
125+
115126
if len(include) > 0 and not any(re.match(pattern, blob.name) for pattern in include):
116127
continue
117128

0 commit comments

Comments
 (0)