From b58afef3386b34994317db47707630152ab72d41 Mon Sep 17 00:00:00 2001 From: Bas des Tombe Date: Fri, 4 Aug 2023 17:50:28 +0200 Subject: [PATCH] black formatting --- src/dtscalibration/datastore.py | 7 ++++--- src/dtscalibration/io.py | 16 +++++++++++++--- tests/test_dtscalibration.py | 6 +++++- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/dtscalibration/datastore.py b/src/dtscalibration/datastore.py index bad8c89b..dc59e634 100644 --- a/src/dtscalibration/datastore.py +++ b/src/dtscalibration/datastore.py @@ -5417,8 +5417,7 @@ def func(a): return out def resample_datastore(*args, **kwargs): - raise "ds.resample_datastore() is deprecated. Use from dtscalibration import DataStore; " \ - "DataStore(ds.resample()) instead. See example notebook 2." + raise "ds.resample_datastore() is deprecated. Use from dtscalibration import DataStore; " "DataStore(ds.resample()) instead. See example notebook 2." class ParameterIndexDoubleEnded: @@ -6032,7 +6031,9 @@ def read_silixa_files( return ds -def read_sensortran_files(directory, timezone_input_files="UTC", timezone_netcdf="UTC", silent=False, **kwargs): +def read_sensortran_files( + directory, timezone_input_files="UTC", timezone_netcdf="UTC", silent=False, **kwargs +): """Read a folder with measurement files from a device of the Sensortran brand. Each measurement file contains values for a single timestep. Remember to check which timezone you are working in. diff --git a/src/dtscalibration/io.py b/src/dtscalibration/io.py index 8f9b4738..e880a6ca 100644 --- a/src/dtscalibration/io.py +++ b/src/dtscalibration/io.py @@ -1201,7 +1201,11 @@ def metakey(meta, dict_to_parse, prefix): def read_sensortran_files_routine( - filepathlist_dts, filepathlist_temp, timezone_input_files="UTC", timezone_netcdf="UTC", silent=False + filepathlist_dts, + filepathlist_temp, + timezone_input_files="UTC", + timezone_netcdf="UTC", + silent=False, ): """ Internal routine that reads sensortran files. @@ -1419,7 +1423,11 @@ def read_sensortran_single(fname): def read_apsensing_files_routine( - filepathlist, timezone_input_files="UTC", timezone_netcdf="UTC", silent=False, load_in_memory="auto" + filepathlist, + timezone_input_files="UTC", + timezone_netcdf="UTC", + silent=False, + load_in_memory="auto", ): """ Internal routine that reads AP Sensing files. @@ -1443,7 +1451,9 @@ def read_apsensing_files_routine( import dask - assert timezone_input_files == "UTC" and timezone_netcdf == "UTC", "Only UTC timezones supported" + assert ( + timezone_input_files == "UTC" and timezone_netcdf == "UTC" + ), "Only UTC timezones supported" # translate names tld = {"ST": "st", "AST": "ast", "REV-ST": "rst", "REV-AST": "rast", "TEMP": "tmp"} diff --git a/tests/test_dtscalibration.py b/tests/test_dtscalibration.py index 11830b77..2b86aa2d 100644 --- a/tests/test_dtscalibration.py +++ b/tests/test_dtscalibration.py @@ -825,7 +825,11 @@ def test_variance_of_stokes_linear_synthetic(): resid, var_fun, ) = ds.variance_stokes_linear( - "c_lin_var_through_zero", sections=sections, nbin=10, through_zero=True, plot_fit=False + "c_lin_var_through_zero", + sections=sections, + nbin=10, + through_zero=True, + plot_fit=False, ) assert_almost_equal_verbose(slope, var_slope, decimal=3)