Skip to content

Commit

Permalink
v2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ashpreetbedi committed Dec 14, 2023
1 parent 3febf07 commit 54ffc3c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion phi/file/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


class File(BaseModel):
name: str
name: Optional[str] = None
description: Optional[str] = None
columns: Optional[List[str]] = None
path: Optional[str] = None
Expand Down
5 changes: 5 additions & 0 deletions phi/file/local/csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ class CsvFile(File):
type: str = "CSV"

def get_metadata(self) -> dict[str, Any]:
if self.name is None:
from pathlib import Path

self.name = Path(self.path).name

if self.columns is None:
try:
# Get the columns from the file
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "phidata"
version = "2.1.0"
version = "2.1.1"
description = "AI Toolkit for Engineers"
requires-python = ">=3.7"
readme = "README.md"
Expand Down

0 comments on commit 54ffc3c

Please sign in to comment.