From bb48b5f65abdb383b728a7a1836c6b28062440c7 Mon Sep 17 00:00:00 2001 From: erexer <13180883+erexer@users.noreply.github.com> Date: Wed, 15 Dec 2021 10:30:20 -0800 Subject: [PATCH] make paths relative to the root dir, switch to fully qualified import of bil_to_parquet functions --- mosartwmpy/utilities/bil_to_parquet.py | 8 +++----- mosartwmpy/utilities/test_bil_to_parquet.py | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/mosartwmpy/utilities/bil_to_parquet.py b/mosartwmpy/utilities/bil_to_parquet.py index 0dc5eb9..701571d 100644 --- a/mosartwmpy/utilities/bil_to_parquet.py +++ b/mosartwmpy/utilities/bil_to_parquet.py @@ -12,7 +12,7 @@ @click.command() @click.option( '--grid-path', - default='../../input/domains/mosart.nc', + default='input/domains/mosart.nc', type=click.Path( file_okay=True, dir_okay=False, @@ -24,9 +24,7 @@ ) @click.option( '--bil-elevation-path', - default=['../../input/elevation/na_dem_30s_bil/na_dem_30s.bil', '../../input/elevation/ca_dem_30s_bil/ca_dem_30s.bil'], - # default=['../../input/elevation/ca_dem_30s_bil/ca_dem_30s.bil'], - # default=['../../input/elevation/na_dem_30s_bil/na_dem_30s.bil'], + default=['input/elevation/na_dem_30s_bil/na_dem_30s.bil', 'input/elevation/ca_dem_30s_bil/ca_dem_30s.bil'], multiple=True, type=click.Path( file_okay=True, @@ -39,7 +37,7 @@ ) @click.option( '--parquet-elevation-path', - default='../../input/elevation/na_dem_30s.parquet', + default='input/elevation/na_dem_30s.parquet', type=click.Path( file_okay=True, dir_okay=False, diff --git a/mosartwmpy/utilities/test_bil_to_parquet.py b/mosartwmpy/utilities/test_bil_to_parquet.py index 3470973..5b4ef55 100644 --- a/mosartwmpy/utilities/test_bil_to_parquet.py +++ b/mosartwmpy/utilities/test_bil_to_parquet.py @@ -1,6 +1,6 @@ from affine import Affine from dataclasses import dataclass -from bil_to_parquet import avg_resample, crop_to_domain, return_in_memory +from mosartwmpy.utilities.bil_to_parquet import avg_resample, crop_to_domain, return_in_memory import numpy as np from rasterio.crs import CRS from shapely.geometry import box