Skip to content

Commit

Permalink
try another way of creating the dir beforehand
Browse files Browse the repository at this point in the history
  • Loading branch information
zain-sohail committed Jan 16, 2024
1 parent 5be3cbf commit 7ed5c23
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sed/loader/fel/config_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ class DataPaths(BaseModel):
data_raw_dir: DirectoryPath
data_parquet_dir: DirectoryPath

@field_validator("data_parquet_dir", mode="before")
@classmethod
def check_and_create_parquet_dir(cls, v):
v = Path(v)
if not v.is_dir():
v.mkdir(parents=True, exist_ok=True)
return v

@classmethod
def from_beamtime_dir(
cls,
Expand Down
Empty file.
Empty file.

0 comments on commit 7ed5c23

Please sign in to comment.