Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/data_designer/config/datastore.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,10 @@ def _fetch_seed_dataset_column_names_from_local_file(dataset_path: str | Path) -

def _validate_dataset_path(dataset_path: Union[str, Path], allow_glob_pattern: bool = False) -> Path:
if allow_glob_pattern and "*" in str(dataset_path):
validate_path_contains_files_of_type(dataset_path, str(dataset_path).split(".")[-1])
parts = str(dataset_path).split("*.")
file_path = parts[0]
file_extension = parts[-1]
validate_path_contains_files_of_type(file_path, file_extension)
return Path(dataset_path)
if not Path(dataset_path).is_file():
raise InvalidFilePathError("🛑 To upload a dataset to the datastore, you must provide a valid file path.")
Expand Down