Skip to content

Commit e3ca3b1

Browse files
minor nits
1 parent cb6b473 commit e3ca3b1

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

weather_mv/loader_pipeline/bq.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def validate_arguments(cls, known_args: argparse.Namespace, pipeline_args: t.Lis
135135
# checking if the output table is in format (<project>.<dataset>.<table>).
136136
output_table_pattern = r'^[\w-]+\.[\w-]+\.[\w-]+$'
137137
if not bool(re.match(output_table_pattern, known_args.output_table)):
138-
raise RuntimeError("output_table is not in correct format.")
138+
raise RuntimeError("output_table is not in correct format (<project>.<dataset_id>.<table_id>). ")
139139

140140
if known_args.area:
141141
assert len(known_args.area) == 4, 'Must specify exactly 4 lat/long values for area: N, W, S, E boundaries.'
@@ -168,8 +168,8 @@ def __post_init__(self):
168168

169169
def create_bq_table(self, uri: str) -> str:
170170
"""Create a big query table for the first uri. After table is created, subsequent uris are returned."""
171+
# Skip table creation.
171172
if self.table:
172-
# Skip table creation.
173173
return uri
174174

175175
with open_dataset(uri, self.xarray_open_dataset_kwargs,

weather_mv/loader_pipeline/pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def pattern_to_uris(match_pattern: str, is_zarr: bool = False) -> t.Iterable[str
4747

4848
def pipeline(known_args: argparse.Namespace, pipeline_args: t.List[str]) -> None:
4949
all_uris = list(pattern_to_uris(known_args.uris, known_args.zarr))
50-
if not all_uris and "topic" not in known_args:
50+
if not all_uris and not known_args.topic:
5151
raise FileNotFoundError(f"File pattern '{known_args.uris}' matched no objects")
5252

5353
# First URI is useful to get an example data shard. It also can be a Zarr path.

0 commit comments

Comments
 (0)