From f7c6534178c2112a285b5786c9b9de82a6627def Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oriol=20Tint=C3=B3?= <oriol.tinto@lmu.de> Date: Thu, 22 Dec 2022 16:36:34 +0100 Subject: [PATCH] Update function name --- README.md | 4 +++- h5netcdfcompressor/__init__.py | 1 + h5netcdfcompressor/compressor.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4759565..75ec439 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ # Compressor that uses h5netcdf and hdf5plugin to compress files. +To use the compressor: + ```python from h5netcdfcompressor import transfer_file -transfer_file(origin, destination, compression) +compress_file(origin="original.nc", destination="compressed.nc", compression="lossy,sz,rel,1e-6") ``` diff --git a/h5netcdfcompressor/__init__.py b/h5netcdfcompressor/__init__.py index e69de29..7c68a7f 100644 --- a/h5netcdfcompressor/__init__.py +++ b/h5netcdfcompressor/__init__.py @@ -0,0 +1 @@ +from compressor import compress_file diff --git a/h5netcdfcompressor/compressor.py b/h5netcdfcompressor/compressor.py index 92da406..282b250 100644 --- a/h5netcdfcompressor/compressor.py +++ b/h5netcdfcompressor/compressor.py @@ -2,7 +2,7 @@ from pathlib import Path from typing import List -def transfer_file(origin: Path, +def compress_file(origin: Path, destination: Path, compression: str, variables_to_keep: List[str] = None, -- GitLab