Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Melissa DeLucchi <[email protected]>
  • Loading branch information
troyraen and delucchi-cmu authored Jan 6, 2025
1 parent 6f815da commit 575d06e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/hats_import/verification/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ def output_file_path(self) -> UPath:
return file_io.append_paths_to_pointer(self.output_path, self.output_filename)

def __post_init__(self) -> None:
self.input_catalog_path = file_io.append_paths_to_pointer(self.input_catalog_path)
self.input_catalog_path = file_io.get_upath(self.input_catalog_path)
if not self.input_catalog_path.is_dir():
raise ValueError("input_catalog_path must be an existing directory")

self.output_path = file_io.append_paths_to_pointer(self.output_path)
self.output_path = file_io.get_upath(self.output_path)

if self.truth_schema is not None:
self.truth_schema = file_io.append_paths_to_pointer(self.truth_schema)
Expand Down
4 changes: 2 additions & 2 deletions src/hats_import/verification/run_verification.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import hats.io.paths
import hats.io.validation
import pandas as pd
import pyarrow.dataset
import pyarrow.dataset as pds
from hats.pixel_math.spatial_index import SPATIAL_INDEX_COLUMN

from hats_import.verification.arguments import VerificationArguments
Expand Down Expand Up @@ -117,7 +117,7 @@ def from_args(cls, args: VerificationArguments) -> "Verifier":

input_truth_schema = None
if args.truth_schema is not None:
input_truth_schema = pyarrow.dataset.parquet_dataset(args.truth_schema).schema
input_truth_schema = pds.parquet_dataset(args.truth_schema).schema
common_metadata_schema = pyarrow.dataset.parquet_dataset(
hats.io.paths.get_common_metadata_pointer(args.input_catalog_path)
).schema
Expand Down

0 comments on commit 575d06e

Please sign in to comment.