Skip to content

Commit

Permalink
Use fnmatch for SOMA pattern matching (#690)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgillies authored Dec 16, 2024
1 parent 35cc625 commit 8304a1b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tiledb/cloud/soma/ingest.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fnmatch
import logging
import os.path
import pathlib
import re
import warnings
from typing import Any, ContextManager, Dict, Mapping, Optional
from unittest import mock
Expand Down Expand Up @@ -117,9 +117,9 @@ def run_ingest_workflow_udf(
)

# Subdirectories/subfolders can't be ingested.
# Use the pattern ".h5ad" to select only .h5ad files.
# Use the pattern "*.h5ad" to select only .h5ad files.
if not vfs.is_dir(input_item) and (
not pattern or re.search(pattern, input_item)
not pattern or fnmatch.fnmatch(input_item, pattern)
):
logger.debug("Identified input file: input_item=%r", input_item)
input_files.append(input_item)
Expand Down

0 comments on commit 8304a1b

Please sign in to comment.