Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 8, 2023
1 parent aec06fb commit 27c6a4f
Show file tree
Hide file tree
Showing 11 changed files with 4 additions and 8 deletions.
1 change: 0 additions & 1 deletion gpm_api/bucket/writers.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ def write_dataset_bucket(
xbin_name="lonbin",
ybin_name="latbin",
):

df = convert_ds_to_df(
ds=ds,
preprocessing_function=preprocessing_function,
Expand Down
1 change: 0 additions & 1 deletion gpm_api/dataset/crs.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,6 @@ def _add_proj_coords_attrs(ds, crs) -> xr.Dataset:

# If available, add attributes
if x_dim is not None and y_dim is not None:

# Retrieve existing coordinate attributes
src_x_coord_attrs = dict(ds[x_dim].attrs)
src_y_coord_attrs = dict(ds[y_dim].attrs)
Expand Down
1 change: 0 additions & 1 deletion gpm_api/io/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ def _download_files(
progress_bar=True,
verbose=False,
):

if transfer_tool == "curl":
list_cmd = [
curl_cmd(src_path, dst_path, username, username)
Expand Down
1 change: 0 additions & 1 deletion gpm_api/old_dataset/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ def _get_granule_info(filepath, scan_mode, variables, groups):
"""Retrieve coordinates, attributes and valid variables and groups from the HDF file."""
# Open HDF5 file
with h5py.File(filepath, "r", locking=False, swmr=SWMR) as hdf:

# Get coordinates
coords = get_coords(hdf, scan_mode)

Expand Down
1 change: 1 addition & 0 deletions gpm_api/scripts/download_gpm_daily_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
warnings.filterwarnings("ignore")
sys.tracebacklimit = 0 # avoid full traceback error if occur


# -------------------------------------------------------------------------.
# Click Command Line Interface decorator
@click.command()
Expand Down
1 change: 1 addition & 0 deletions gpm_api/scripts/download_gpm_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
warnings.filterwarnings("ignore")
sys.tracebacklimit = 0 # avoid full traceback error if occur


# -------------------------------------------------------------------------.
# Click Command Line Interface decorator
@click.command()
Expand Down
1 change: 1 addition & 0 deletions gpm_api/scripts/download_gpm_monthly_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
warnings.filterwarnings("ignore")
sys.tracebacklimit = 0 # avoid full traceback error if occur


# -------------------------------------------------------------------------.
# Click Command Line Interface decorator
@click.command()
Expand Down
2 changes: 0 additions & 2 deletions gpm_api/tests/0_tmp/dataset/0_create_test_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ def copy_attributes(original, copy):
def copy_datasets_recursive(original_group, subset_group, desired_size=10):
for name, item in original_group.items():
if isinstance(item, h5py.Dataset):

# Determine the subset shape (2 indices per dimension)
subset_shape = tuple(min(3, dim_size) for dim_size in item.shape)

Expand All @@ -38,7 +37,6 @@ def copy_datasets_recursive(original_group, subset_group, desired_size=10):
subset_dataset.compression_opts = item.compression_opts

elif isinstance(item, h5py.Group):

# If the item is a group, create a corresponding group in the subset file and copy its datasets recursively
subgroup = subset_group.create_group(name)
# Copy group attributes
Expand Down
1 change: 1 addition & 0 deletions gpm_api/utils/utils_HDF5.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ def h5dump(filepath, group="/", dataset_attrs=True, group_attrs=True):
# for item in x.keys():
# print_hdf5_shape(x[item])


# -----------------------------------------------------------------------------.
def hdf5_objects_names(hdf):
l_objs = []
Expand Down
1 change: 0 additions & 1 deletion gpm_api/visualization/orbit.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ def wrapper(*args, **kwargs):

# - Call the function over each slice
for i, slc in enumerate(list_slices):

# Retrieve contiguous data array
tmp_da = da.isel(along_track=slc)

Expand Down
1 change: 0 additions & 1 deletion gpm_api/visualization/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,6 @@ def plot_map(
cbar_kwargs={},
**plot_kwargs,
):

from gpm_api.checks import is_grid, is_orbit

from .grid import plot_grid_map
Expand Down

0 comments on commit 27c6a4f

Please sign in to comment.