olehborysevych commented on code in PR #24751:
URL: https://github.com/apache/beam/pull/24751#discussion_r1056369056
##########
playground/infrastructure/models.py:
##########
@@ -113,24 +117,48 @@ def dataset_defined(cls, v, values, **kwargs):
f"Emulator topic {v.topic.id} has undefined dataset
{v.topic.source_dataset}"
)
- @validator('datasets')
+ @validator("datasets")
def dataset_file_name(cls, datasets):
for dataset_id, dataset in datasets.items():
dataset.file_name = f"{dataset_id}.{dataset.format}"
if dataset.location == DatasetLocation.LOCAL:
- dataset_path = os.path.join(RepoProps.REPO_DATASETS_PATH,
dataset.file_name)
+ dataset_path = os.path.join(
+ RepoProps.REPO_DATASETS_PATH, dataset.file_name
+ )
if not os.path.isfile(dataset_path):
- logging.error("File not found at the specified path: %s",
dataset_path)
+ logging.error(
+ "File not found at the specified path: %s",
dataset_path
+ )
raise FileNotFoundError
return datasets
-
@validator("categories", each_item=True)
def category_supported(cls, v, values, config, **kwargs):
if v not in config.supported_categories:
raise ValueError(f"Category {v} not in
{config.supported_categories}")
return v
+ @root_validator
+ def multifile_files(cls, values):
Review Comment:
@eantyshev When this is executed, we still have files where multifile is
true but with empty files tag
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]