Skip to content

Commit

Permalink
black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
bdestombe committed Aug 4, 2023
1 parent ab12189 commit b58afef
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
7 changes: 4 additions & 3 deletions src/dtscalibration/datastore.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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.
Expand Down
16 changes: 13 additions & 3 deletions src/dtscalibration/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand All @@ -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"}
Expand Down
6 changes: 5 additions & 1 deletion tests/test_dtscalibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit b58afef

Please sign in to comment.