diff --git a/disdrodb/api/info.py b/disdrodb/api/info.py index 4924e105..e62e1ce3 100644 --- a/disdrodb/api/info.py +++ b/disdrodb/api/info.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- import os import re @@ -72,7 +71,7 @@ def get_key_from_filepaths(fpaths, key): def _get_version_from_filepath(filepath, integer=False): version = get_key_from_filepath(filepath, key="version") if integer: - version = int(re.findall("\d+", version)[0]) + version = int(re.findall("\\d+", version)[0]) return version diff --git a/disdrodb/api/io.py b/disdrodb/api/io.py index c18700fe..71bb9e56 100644 --- a/disdrodb/api/io.py +++ b/disdrodb/api/io.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers @@ -201,7 +200,7 @@ def _get_metadata_fpath(disdrodb_dir, product_level, data_source, campaign_name, def get_metadata_dict(disdrodb_dir, product_level, data_source, campaign_name, station_name): """Get metadata of a given station.""" metadata_fpath = _get_metadata_fpath(disdrodb_dir, product_level, data_source, campaign_name, station_name) - with open(metadata_fpath, "r") as f: + with open(metadata_fpath) as f: metadata_dict = yaml.safe_load(f) return metadata_dict diff --git a/disdrodb/api/metadata.py b/disdrodb/api/metadata.py index d1d87fc7..61c9ecb1 100644 --- a/disdrodb/api/metadata.py +++ b/disdrodb/api/metadata.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers @@ -27,7 +26,7 @@ def _read_yaml_file(fpath): """Read a YAML file into dictionary.""" - with open(fpath, "r") as f: + with open(fpath) as f: dictionary = yaml.safe_load(f) return dictionary @@ -57,7 +56,7 @@ def read_station_metadata(disdrodb_dir, product_level, data_source, campaign_nam raise ValueError(f"The metadata file for {station_name} at {fpath} does not exists.") # Read the metadata file - with open(fpath, "r") as f: + with open(fpath) as f: dictionary = yaml.safe_load(f) return dictionary diff --git a/disdrodb/l0/check_configs.py b/disdrodb/l0/check_configs.py index dd095eb6..48aa3479 100644 --- a/disdrodb/l0/check_configs.py +++ b/disdrodb/l0/check_configs.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- import glob import os from typing import List, Optional, Union diff --git a/disdrodb/l0/check_metadata.py b/disdrodb/l0/check_metadata.py index 89012b08..9bb0d0a3 100644 --- a/disdrodb/l0/check_metadata.py +++ b/disdrodb/l0/check_metadata.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- import os from typing import Union @@ -38,7 +37,7 @@ def read_yaml(fpath: str) -> dict: dict Attributes read from the YAML file. """ - with open(fpath, "r") as f: + with open(fpath) as f: attrs = yaml.safe_load(f) return attrs diff --git a/disdrodb/l0/check_standards.py b/disdrodb/l0/check_standards.py index 582f56fe..35cf4d7e 100644 --- a/disdrodb/l0/check_standards.py +++ b/disdrodb/l0/check_standards.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/io.py b/disdrodb/l0/io.py index 026acecc..8cae23c7 100644 --- a/disdrodb/l0/io.py +++ b/disdrodb/l0/io.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers @@ -592,11 +591,11 @@ def _parse_fpath(fpath: str) -> str: if not isinstance(fpath, str): raise TypeError("'_parse_fpath' expects a directory/filepath string.") if fpath[-1] == "/": - print("{} should not end with /.".format(fpath)) + print(f"{fpath} should not end with /.") fpath = fpath[:-1] elif fpath[-1] == "\\": - print("{} should not end with /.".format(fpath)) + print(f"{fpath} should not end with /.") fpath = fpath[:-1] return fpath @@ -610,25 +609,25 @@ def _check_raw_dir_input(raw_dir): if not isinstance(raw_dir, str): raise TypeError("Provide 'raw_dir' as a string'.") if not os.path.exists(raw_dir): - raise ValueError("'raw_dir' {} directory does not exist.".format(raw_dir)) + raise ValueError(f"'raw_dir' {raw_dir} directory does not exist.") if not os.path.isdir(raw_dir): - raise ValueError("'raw_dir' {} is not a directory.".format(raw_dir)) + raise ValueError(f"'raw_dir' {raw_dir} is not a directory.") def _check_raw_dir_data_subfolders(raw_dir): """Check `data` directory in raw dir.""" list_subfolders = os.listdir(raw_dir) if len(list_subfolders) == 0: - raise ValueError("There are not subfolders in {}".format(raw_dir)) + raise ValueError(f"There are not subfolders in {raw_dir}") if "data" not in list_subfolders: - raise ValueError("'raw_dir' {} should have the /data subfolder.".format(raw_dir)) + raise ValueError(f"'raw_dir' {raw_dir} should have the /data subfolder.") # -------------------------------------------------------------------------. #### Check there are subfolders corresponding to station to process raw_data_dir = os.path.join(raw_dir, "data") list_data_station_name = os.listdir(raw_data_dir) if len(list_data_station_name) == 0: - raise ValueError("No station directories within {}".format(raw_data_dir)) + raise ValueError(f"No station directories within {raw_data_dir}") # -------------------------------------------------------------------------. #### Check there are data files in each list_data_station_name @@ -637,7 +636,7 @@ def _check_raw_dir_data_subfolders(raw_dir): idx_0_files = np.where(np.array(list_nfiles_per_station) == 0)[0] if len(idx_0_files) > 0: empty_station_dir = [list_raw_data_station_dir[idx] for idx in idx_0_files] - raise ValueError("The following data directories are empty: {}".format(empty_station_dir)) + raise ValueError(f"The following data directories are empty: {empty_station_dir}") def _check_raw_dir_metadata(raw_dir, verbose=True): @@ -660,7 +659,7 @@ def _check_raw_dir_metadata(raw_dir, verbose=True): os.path.join(metadata_dir, station_name + ".yml") for station_name in list_data_station_name ] _ = [write_default_metadata(fpath) for fpath in list_metadata_fpath] - msg = "'raw_dir' {} should have the /metadata subfolder. ".format(raw_dir) + msg = f"'raw_dir' {raw_dir} should have the /metadata subfolder. " msg1 = "It has been now created with also empty metadata files to be filled for each station." raise ValueError(msg + msg1) @@ -679,14 +678,14 @@ def _check_raw_dir_metadata(raw_dir, verbose=True): os.path.join(metadata_dir, station_name + ".yml") for station_name in list_missing_station_name ] _ = [write_default_metadata(fpath) for fpath in list_missing_metadata_fpath] - msg = "The metadata files for the following station_name were missing: {}".format(list_missing_station_name) + msg = f"The metadata files for the following station_name were missing: {list_missing_station_name}" raise ValueError(msg + " Now have been created to be filled.") # - Check not excess metadata compared to present stations idx_excess_metadata_station = np.where(np.isin(list_metadata_station_name, list_data_station_name, invert=True))[0] if len(idx_excess_metadata_station) > 0: list_excess_station_name = [list_metadata_station_name[idx] for idx in idx_excess_metadata_station] - print("There are the following metadata files without corresponding data: {}".format(list_excess_station_name)) + print(f"There are the following metadata files without corresponding data: {list_excess_station_name}") # -------------------------------------------------------------------------. #### Check metadata compliance @@ -739,7 +738,7 @@ def _check_raw_dir_issue(raw_dir, verbose=True): os.path.join(issue_dir, station_name + ".yml") for station_name in list_missing_station_name ] _ = [write_default_issue(fpath) for fpath in list_missing_issue_fpath] - msg = "The issue files for the following station_name were missing: {}".format(list_missing_station_name) + msg = f"The issue files for the following station_name were missing: {list_missing_station_name}" log_warning(logger, msg, verbose) # - Check not excess issue compared to present stations @@ -808,7 +807,7 @@ def _check_is_processed_dir(processed_dir): # Check is the processed_dir if processed_dir.find("DISDRODB/Processed") == -1 and processed_dir.find("DISDRODB\\Processed") == -1: - msg = "Expecting 'processed_dir' to contain the pattern */DISDRODB/Processed/*. or *\DISDRODB\Processed\*." + msg = "Expecting 'processed_dir' to contain the pattern */DISDRODB/Processed/*. or *\\DISDRODB\\Processed\\*." logger.error(msg) raise ValueError(msg) diff --git a/disdrodb/l0/issue.py b/disdrodb/l0/issue.py index 92a6f699..eea0c071 100644 --- a/disdrodb/l0/issue.py +++ b/disdrodb/l0/issue.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers @@ -372,7 +371,7 @@ def remove_implicit_resolver(cls, tag_to_remove): def load_yaml_without_date_parsing(filepath): "Read a YAML file without converting automatically date string to datetime." NoDatesSafeLoader.remove_implicit_resolver("tag:yaml.org,2002:timestamp") - with open(filepath, "r") as f: + with open(filepath) as f: dictionary = yaml.load(f, Loader=NoDatesSafeLoader) # Return empty dictionary if nothing to be read in the file if isinstance(dictionary, type(None)): diff --git a/disdrodb/l0/l0_reader.py b/disdrodb/l0/l0_reader.py index f96f74f6..133bf9c9 100644 --- a/disdrodb/l0/l0_reader.py +++ b/disdrodb/l0/l0_reader.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers diff --git a/disdrodb/l0/l0a_processing.py b/disdrodb/l0/l0a_processing.py index b638a9d0..61d958f0 100644 --- a/disdrodb/l0/l0a_processing.py +++ b/disdrodb/l0/l0a_processing.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers diff --git a/disdrodb/l0/l0b_concat.py b/disdrodb/l0/l0b_concat.py index 0b749e22..122da187 100644 --- a/disdrodb/l0/l0b_concat.py +++ b/disdrodb/l0/l0b_concat.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/l0b_processing.py b/disdrodb/l0/l0b_processing.py index 1ec2009a..6e4e8c69 100644 --- a/disdrodb/l0/l0b_processing.py +++ b/disdrodb/l0/l0b_processing.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers diff --git a/disdrodb/l0/metadata.py b/disdrodb/l0/metadata.py index b1bf064e..ab020fc8 100644 --- a/disdrodb/l0/metadata.py +++ b/disdrodb/l0/metadata.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers diff --git a/disdrodb/l0/readers/ARM/ARM_LD.py b/disdrodb/l0/readers/ARM/ARM_LD.py index f1d7b9c7..5fa85e38 100644 --- a/disdrodb/l0/readers/ARM/ARM_LD.py +++ b/disdrodb/l0/readers/ARM/ARM_LD.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/ARM/ARM_LPM.py b/disdrodb/l0/readers/ARM/ARM_LPM.py index 4d935ef1..03399ece 100644 --- a/disdrodb/l0/readers/ARM/ARM_LPM.py +++ b/disdrodb/l0/readers/ARM/ARM_LPM.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/AUSTRALIA/MELBOURNE_2007_OTT.py b/disdrodb/l0/readers/AUSTRALIA/MELBOURNE_2007_OTT.py index 8ac9f433..604d4888 100644 --- a/disdrodb/l0/readers/AUSTRALIA/MELBOURNE_2007_OTT.py +++ b/disdrodb/l0/readers/AUSTRALIA/MELBOURNE_2007_OTT.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/AUSTRALIA/MELBOURNE_2007_THIES.py b/disdrodb/l0/readers/AUSTRALIA/MELBOURNE_2007_THIES.py index 06833544..965d6f17 100644 --- a/disdrodb/l0/readers/AUSTRALIA/MELBOURNE_2007_THIES.py +++ b/disdrodb/l0/readers/AUSTRALIA/MELBOURNE_2007_THIES.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/BRAZIL/CHUVA_LPM.py b/disdrodb/l0/readers/BRAZIL/CHUVA_LPM.py index bd4d6b61..e801d279 100644 --- a/disdrodb/l0/readers/BRAZIL/CHUVA_LPM.py +++ b/disdrodb/l0/readers/BRAZIL/CHUVA_LPM.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/BRAZIL/CHUVA_OTT.py b/disdrodb/l0/readers/BRAZIL/CHUVA_OTT.py index 93043cad..f1635108 100644 --- a/disdrodb/l0/readers/BRAZIL/CHUVA_OTT.py +++ b/disdrodb/l0/readers/BRAZIL/CHUVA_OTT.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/BRAZIL/GOAMAZON_LPM.py b/disdrodb/l0/readers/BRAZIL/GOAMAZON_LPM.py index 25e0f990..885e9b6b 100644 --- a/disdrodb/l0/readers/BRAZIL/GOAMAZON_LPM.py +++ b/disdrodb/l0/readers/BRAZIL/GOAMAZON_LPM.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/BRAZIL/GOAMAZON_OTT.py b/disdrodb/l0/readers/BRAZIL/GOAMAZON_OTT.py index f7325aa1..04f6153e 100644 --- a/disdrodb/l0/readers/BRAZIL/GOAMAZON_OTT.py +++ b/disdrodb/l0/readers/BRAZIL/GOAMAZON_OTT.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/CHINA/CHONGQING.py b/disdrodb/l0/readers/CHINA/CHONGQING.py index 3c7d7a9e..0c991b45 100644 --- a/disdrodb/l0/readers/CHINA/CHONGQING.py +++ b/disdrodb/l0/readers/CHINA/CHONGQING.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers diff --git a/disdrodb/l0/readers/DENMARK/EROSION_nc.py b/disdrodb/l0/readers/DENMARK/EROSION_nc.py index 5b8b795f..06509323 100644 --- a/disdrodb/l0/readers/DENMARK/EROSION_nc.py +++ b/disdrodb/l0/readers/DENMARK/EROSION_nc.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/EPFL/ARCTIC_2021.py b/disdrodb/l0/readers/EPFL/ARCTIC_2021.py index 9021cde3..60ffa9e4 100644 --- a/disdrodb/l0/readers/EPFL/ARCTIC_2021.py +++ b/disdrodb/l0/readers/EPFL/ARCTIC_2021.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/EPFL/COMMON_2011.py b/disdrodb/l0/readers/EPFL/COMMON_2011.py index b625e394..3d66115f 100644 --- a/disdrodb/l0/readers/EPFL/COMMON_2011.py +++ b/disdrodb/l0/readers/EPFL/COMMON_2011.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/EPFL/DAVOS_2009_2011.py b/disdrodb/l0/readers/EPFL/DAVOS_2009_2011.py index 45f57493..212a4810 100644 --- a/disdrodb/l0/readers/EPFL/DAVOS_2009_2011.py +++ b/disdrodb/l0/readers/EPFL/DAVOS_2009_2011.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/EPFL/EPFL_2009.py b/disdrodb/l0/readers/EPFL/EPFL_2009.py index 7ead4883..803ff980 100644 --- a/disdrodb/l0/readers/EPFL/EPFL_2009.py +++ b/disdrodb/l0/readers/EPFL/EPFL_2009.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/EPFL/EPFL_ROOF_2008.py b/disdrodb/l0/readers/EPFL/EPFL_ROOF_2008.py index e0511c70..41cd9d93 100644 --- a/disdrodb/l0/readers/EPFL/EPFL_ROOF_2008.py +++ b/disdrodb/l0/readers/EPFL/EPFL_ROOF_2008.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/EPFL/EPFL_ROOF_2010.py b/disdrodb/l0/readers/EPFL/EPFL_ROOF_2010.py index 231d341f..723fec34 100644 --- a/disdrodb/l0/readers/EPFL/EPFL_ROOF_2010.py +++ b/disdrodb/l0/readers/EPFL/EPFL_ROOF_2010.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/EPFL/EPFL_ROOF_2011.py b/disdrodb/l0/readers/EPFL/EPFL_ROOF_2011.py index 2861db06..04b01e45 100644 --- a/disdrodb/l0/readers/EPFL/EPFL_ROOF_2011.py +++ b/disdrodb/l0/readers/EPFL/EPFL_ROOF_2011.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/EPFL/EPFL_ROOF_2012.py b/disdrodb/l0/readers/EPFL/EPFL_ROOF_2012.py index f882fbd6..7af75bb5 100644 --- a/disdrodb/l0/readers/EPFL/EPFL_ROOF_2012.py +++ b/disdrodb/l0/readers/EPFL/EPFL_ROOF_2012.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/EPFL/GENEPI_2007.py b/disdrodb/l0/readers/EPFL/GENEPI_2007.py index 93f235b7..babfec53 100644 --- a/disdrodb/l0/readers/EPFL/GENEPI_2007.py +++ b/disdrodb/l0/readers/EPFL/GENEPI_2007.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/EPFL/GRAND_ST_BERNARD_2007.py b/disdrodb/l0/readers/EPFL/GRAND_ST_BERNARD_2007.py index 1bc08c21..bae1bbff 100644 --- a/disdrodb/l0/readers/EPFL/GRAND_ST_BERNARD_2007.py +++ b/disdrodb/l0/readers/EPFL/GRAND_ST_BERNARD_2007.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. diff --git a/disdrodb/l0/readers/EPFL/GRAND_ST_BERNARD_2007_2.py b/disdrodb/l0/readers/EPFL/GRAND_ST_BERNARD_2007_2.py index f085b2d3..97a4d059 100644 --- a/disdrodb/l0/readers/EPFL/GRAND_ST_BERNARD_2007_2.py +++ b/disdrodb/l0/readers/EPFL/GRAND_ST_BERNARD_2007_2.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. diff --git a/disdrodb/l0/readers/EPFL/HPICONET_2010.py b/disdrodb/l0/readers/EPFL/HPICONET_2010.py index f6857969..4cd2249f 100644 --- a/disdrodb/l0/readers/EPFL/HPICONET_2010.py +++ b/disdrodb/l0/readers/EPFL/HPICONET_2010.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/EPFL/HYMEX_LTE_SOP2.py b/disdrodb/l0/readers/EPFL/HYMEX_LTE_SOP2.py index 145540ab..b471c3a7 100644 --- a/disdrodb/l0/readers/EPFL/HYMEX_LTE_SOP2.py +++ b/disdrodb/l0/readers/EPFL/HYMEX_LTE_SOP2.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/EPFL/HYMEX_LTE_SOP3.py b/disdrodb/l0/readers/EPFL/HYMEX_LTE_SOP3.py index 278ac290..4a0961c4 100644 --- a/disdrodb/l0/readers/EPFL/HYMEX_LTE_SOP3.py +++ b/disdrodb/l0/readers/EPFL/HYMEX_LTE_SOP3.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/EPFL/HYMEX_LTE_SOP4.py b/disdrodb/l0/readers/EPFL/HYMEX_LTE_SOP4.py index 080dca65..a04f685c 100644 --- a/disdrodb/l0/readers/EPFL/HYMEX_LTE_SOP4.py +++ b/disdrodb/l0/readers/EPFL/HYMEX_LTE_SOP4.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/EPFL/PARADISO_2014.py b/disdrodb/l0/readers/EPFL/PARADISO_2014.py index c5bfbaae..0231e414 100644 --- a/disdrodb/l0/readers/EPFL/PARADISO_2014.py +++ b/disdrodb/l0/readers/EPFL/PARADISO_2014.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/EPFL/PARSIVEL_2007.py b/disdrodb/l0/readers/EPFL/PARSIVEL_2007.py index 0d6a2b9b..c78b2c7d 100644 --- a/disdrodb/l0/readers/EPFL/PARSIVEL_2007.py +++ b/disdrodb/l0/readers/EPFL/PARSIVEL_2007.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/EPFL/PLATO_2019.py b/disdrodb/l0/readers/EPFL/PLATO_2019.py index a22386fe..d455f953 100644 --- a/disdrodb/l0/readers/EPFL/PLATO_2019.py +++ b/disdrodb/l0/readers/EPFL/PLATO_2019.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/EPFL/RACLETS_2019.py b/disdrodb/l0/readers/EPFL/RACLETS_2019.py index 563a5f8b..d1160039 100644 --- a/disdrodb/l0/readers/EPFL/RACLETS_2019.py +++ b/disdrodb/l0/readers/EPFL/RACLETS_2019.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/EPFL/RACLETS_2019_WJF.py b/disdrodb/l0/readers/EPFL/RACLETS_2019_WJF.py index cab88be0..580c6a55 100644 --- a/disdrodb/l0/readers/EPFL/RACLETS_2019_WJF.py +++ b/disdrodb/l0/readers/EPFL/RACLETS_2019_WJF.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/EPFL/RIETHOLZBACH_2011.py b/disdrodb/l0/readers/EPFL/RIETHOLZBACH_2011.py index fb3a8b27..3c7ca287 100644 --- a/disdrodb/l0/readers/EPFL/RIETHOLZBACH_2011.py +++ b/disdrodb/l0/readers/EPFL/RIETHOLZBACH_2011.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/EPFL/SAMOYLOV_2017.py b/disdrodb/l0/readers/EPFL/SAMOYLOV_2017.py index da7b28d3..c821ae2d 100644 --- a/disdrodb/l0/readers/EPFL/SAMOYLOV_2017.py +++ b/disdrodb/l0/readers/EPFL/SAMOYLOV_2017.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/EPFL/SAMOYLOV_2019.py b/disdrodb/l0/readers/EPFL/SAMOYLOV_2019.py index be5dcc6c..4b4b18d3 100644 --- a/disdrodb/l0/readers/EPFL/SAMOYLOV_2019.py +++ b/disdrodb/l0/readers/EPFL/SAMOYLOV_2019.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/EPFL/UNIL_2022.py b/disdrodb/l0/readers/EPFL/UNIL_2022.py index d0a11f09..34ebb5c8 100644 --- a/disdrodb/l0/readers/EPFL/UNIL_2022.py +++ b/disdrodb/l0/readers/EPFL/UNIL_2022.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/FRANCE/SIRTA_OTT2.py b/disdrodb/l0/readers/FRANCE/SIRTA_OTT2.py index e51dbd4f..e7a51ccf 100644 --- a/disdrodb/l0/readers/FRANCE/SIRTA_OTT2.py +++ b/disdrodb/l0/readers/FRANCE/SIRTA_OTT2.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers diff --git a/disdrodb/l0/readers/GPM/GCPEX.py b/disdrodb/l0/readers/GPM/GCPEX.py index 470dc983..63359880 100644 --- a/disdrodb/l0/readers/GPM/GCPEX.py +++ b/disdrodb/l0/readers/GPM/GCPEX.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/GPM/IFLOODS.py b/disdrodb/l0/readers/GPM/IFLOODS.py index 1768bbd7..357c7eca 100644 --- a/disdrodb/l0/readers/GPM/IFLOODS.py +++ b/disdrodb/l0/readers/GPM/IFLOODS.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/GPM/LPVEX.py b/disdrodb/l0/readers/GPM/LPVEX.py index d491796e..35d83afd 100644 --- a/disdrodb/l0/readers/GPM/LPVEX.py +++ b/disdrodb/l0/readers/GPM/LPVEX.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/GPM/MC3E.py b/disdrodb/l0/readers/GPM/MC3E.py index 30c2d23a..f80fe6b1 100644 --- a/disdrodb/l0/readers/GPM/MC3E.py +++ b/disdrodb/l0/readers/GPM/MC3E.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/GPM/NSSTC.py b/disdrodb/l0/readers/GPM/NSSTC.py index d270e35f..e86e812f 100644 --- a/disdrodb/l0/readers/GPM/NSSTC.py +++ b/disdrodb/l0/readers/GPM/NSSTC.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/ITALY/GID.py b/disdrodb/l0/readers/ITALY/GID.py index cb61dec0..da181595 100644 --- a/disdrodb/l0/readers/ITALY/GID.py +++ b/disdrodb/l0/readers/ITALY/GID.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/MEXICO/OH_IIUNAM_nc.py b/disdrodb/l0/readers/MEXICO/OH_IIUNAM_nc.py index 61ba93fa..76977447 100644 --- a/disdrodb/l0/readers/MEXICO/OH_IIUNAM_nc.py +++ b/disdrodb/l0/readers/MEXICO/OH_IIUNAM_nc.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/NCAR/CCOPE_2015.py b/disdrodb/l0/readers/NCAR/CCOPE_2015.py index f59bc0af..c71f52d6 100644 --- a/disdrodb/l0/readers/NCAR/CCOPE_2015.py +++ b/disdrodb/l0/readers/NCAR/CCOPE_2015.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/NCAR/OWLES_MIPS.py b/disdrodb/l0/readers/NCAR/OWLES_MIPS.py index 052cebc4..2edc7b06 100644 --- a/disdrodb/l0/readers/NCAR/OWLES_MIPS.py +++ b/disdrodb/l0/readers/NCAR/OWLES_MIPS.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/NCAR/PECAN_FP3.py b/disdrodb/l0/readers/NCAR/PECAN_FP3.py index cc9cd5ac..7a6e3bc6 100644 --- a/disdrodb/l0/readers/NCAR/PECAN_FP3.py +++ b/disdrodb/l0/readers/NCAR/PECAN_FP3.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/NCAR/PECAN_MIPS.py b/disdrodb/l0/readers/NCAR/PECAN_MIPS.py index 32e83c49..02405f7a 100644 --- a/disdrodb/l0/readers/NCAR/PECAN_MIPS.py +++ b/disdrodb/l0/readers/NCAR/PECAN_MIPS.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/NCAR/PECAN_MOBILE.py b/disdrodb/l0/readers/NCAR/PECAN_MOBILE.py index 3004674d..65ba03b4 100644 --- a/disdrodb/l0/readers/NCAR/PECAN_MOBILE.py +++ b/disdrodb/l0/readers/NCAR/PECAN_MOBILE.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/NCAR/PLOWS_MIPS.py b/disdrodb/l0/readers/NCAR/PLOWS_MIPS.py index 64c9d30e..2eec2b9d 100644 --- a/disdrodb/l0/readers/NCAR/PLOWS_MIPS.py +++ b/disdrodb/l0/readers/NCAR/PLOWS_MIPS.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/NCAR/RELAMPAGO_OTT.py b/disdrodb/l0/readers/NCAR/RELAMPAGO_OTT.py index cf6271d0..fe31c350 100644 --- a/disdrodb/l0/readers/NCAR/RELAMPAGO_OTT.py +++ b/disdrodb/l0/readers/NCAR/RELAMPAGO_OTT.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/NCAR/SNOWIE_PJ.py b/disdrodb/l0/readers/NCAR/SNOWIE_PJ.py index 94266bef..23d9abcd 100644 --- a/disdrodb/l0/readers/NCAR/SNOWIE_PJ.py +++ b/disdrodb/l0/readers/NCAR/SNOWIE_PJ.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/NCAR/SNOWIE_SB.py b/disdrodb/l0/readers/NCAR/SNOWIE_SB.py index 04107bd2..aa94c29c 100644 --- a/disdrodb/l0/readers/NCAR/SNOWIE_SB.py +++ b/disdrodb/l0/readers/NCAR/SNOWIE_SB.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- """ Created on Fri Feb 17 19:08:17 2023 diff --git a/disdrodb/l0/readers/NCAR/VORTEX2_2009.py b/disdrodb/l0/readers/NCAR/VORTEX2_2009.py index 27584084..8a642d0b 100644 --- a/disdrodb/l0/readers/NCAR/VORTEX2_2009.py +++ b/disdrodb/l0/readers/NCAR/VORTEX2_2009.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/NCAR/VORTEX2_2010.py b/disdrodb/l0/readers/NCAR/VORTEX2_2010.py index 99e7a097..f1ccfc64 100644 --- a/disdrodb/l0/readers/NCAR/VORTEX2_2010.py +++ b/disdrodb/l0/readers/NCAR/VORTEX2_2010.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers diff --git a/disdrodb/l0/readers/NCAR/VORTEX2_2010_UF.py b/disdrodb/l0/readers/NCAR/VORTEX2_2010_UF.py index 7f7b91d1..9f210e5e 100644 --- a/disdrodb/l0/readers/NCAR/VORTEX2_2010_UF.py +++ b/disdrodb/l0/readers/NCAR/VORTEX2_2010_UF.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers diff --git a/disdrodb/l0/readers/NCAR/VORTEX_SE_2016_P1.py b/disdrodb/l0/readers/NCAR/VORTEX_SE_2016_P1.py index 5c4021ac..763259a2 100644 --- a/disdrodb/l0/readers/NCAR/VORTEX_SE_2016_P1.py +++ b/disdrodb/l0/readers/NCAR/VORTEX_SE_2016_P1.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- """ Created on Fri Feb 17 20:47:10 2023 diff --git a/disdrodb/l0/readers/NCAR/VORTEX_SE_2016_P2.py b/disdrodb/l0/readers/NCAR/VORTEX_SE_2016_P2.py index 0ffc6dc7..b5fef839 100644 --- a/disdrodb/l0/readers/NCAR/VORTEX_SE_2016_P2.py +++ b/disdrodb/l0/readers/NCAR/VORTEX_SE_2016_P2.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/NCAR/VORTEX_SE_2016_PIPS.py b/disdrodb/l0/readers/NCAR/VORTEX_SE_2016_PIPS.py index 747251ca..1f5e038d 100644 --- a/disdrodb/l0/readers/NCAR/VORTEX_SE_2016_PIPS.py +++ b/disdrodb/l0/readers/NCAR/VORTEX_SE_2016_PIPS.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/NETHERLANDS/DELFT.py b/disdrodb/l0/readers/NETHERLANDS/DELFT.py index 8134ae7a..3be77b8a 100644 --- a/disdrodb/l0/readers/NETHERLANDS/DELFT.py +++ b/disdrodb/l0/readers/NETHERLANDS/DELFT.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/SPAIN/SBEGUERIA.py b/disdrodb/l0/readers/SPAIN/SBEGUERIA.py index b397b528..9e758bed 100644 --- a/disdrodb/l0/readers/SPAIN/SBEGUERIA.py +++ b/disdrodb/l0/readers/SPAIN/SBEGUERIA.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/readers/UK/DIVEN.py b/disdrodb/l0/readers/UK/DIVEN.py index bf28fa72..345816dc 100644 --- a/disdrodb/l0/readers/UK/DIVEN.py +++ b/disdrodb/l0/readers/UK/DIVEN.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/scripts/run_disdrodb_l0a.py b/disdrodb/l0/scripts/run_disdrodb_l0a.py index 0a4f1d93..a1a6ddcf 100644 --- a/disdrodb/l0/scripts/run_disdrodb_l0a.py +++ b/disdrodb/l0/scripts/run_disdrodb_l0a.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/scripts/run_disdrodb_l0b.py b/disdrodb/l0/scripts/run_disdrodb_l0b.py index d0719fd4..60d70203 100644 --- a/disdrodb/l0/scripts/run_disdrodb_l0b.py +++ b/disdrodb/l0/scripts/run_disdrodb_l0b.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/disdrodb/l0/standards.py b/disdrodb/l0/standards.py index edd60f8d..bc44d52a 100644 --- a/disdrodb/l0/standards.py +++ b/disdrodb/l0/standards.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers @@ -67,7 +66,7 @@ def read_config_yml(sensor_name: str, filename: str) -> dict: logger.exception(msg) raise ValueError(msg) # Open dictionary - with open(fpath, "r") as f: + with open(fpath) as f: d = yaml.safe_load(f) return d diff --git a/disdrodb/l0/summary.py b/disdrodb/l0/summary.py index 09690edc..07fe0588 100644 --- a/disdrodb/l0/summary.py +++ b/disdrodb/l0/summary.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- import os diff --git a/disdrodb/l0/template_tools.py b/disdrodb/l0/template_tools.py index b8fcdf3e..3e42de3c 100644 --- a/disdrodb/l0/template_tools.py +++ b/disdrodb/l0/template_tools.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- from typing import Union @@ -145,9 +144,9 @@ def print_valid_L0_column_names(sensor_name: str) -> None: def _check_valid_column_index(column_idx, n_columns): if column_idx > (n_columns - 1): - raise ValueError("'column_idx' must be between 0 and {}".format(n_columns - 1)) + raise ValueError(f"'column_idx' must be between 0 and {n_columns - 1}") if column_idx < 0: - raise ValueError("'column_idx' must be between 0 and {}".format(n_columns - 1)) + raise ValueError(f"'column_idx' must be between 0 and {n_columns - 1}") def _check_columns_indices(column_indices, n_columns): diff --git a/disdrodb/l1/utils.py b/disdrodb/l1/utils.py index b0253040..415bed32 100644 --- a/disdrodb/l1/utils.py +++ b/disdrodb/l1/utils.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- import pandas as pd import xarray as xr diff --git a/disdrodb/tests/test_config_files.py b/disdrodb/tests/test_config_files.py index cbc652c3..e9e03951 100644 --- a/disdrodb/tests/test_config_files.py +++ b/disdrodb/tests/test_config_files.py @@ -70,7 +70,7 @@ def read_yaml_file(path_file: str) -> Dict: Dict Content of the yaml file """ - with open(path_file, "r") as f: + with open(path_file) as f: try: data = yaml.safe_load(f) except: diff --git a/disdrodb/tests/test_issue.py b/disdrodb/tests/test_issue.py index a3f064aa..0765bbc9 100644 --- a/disdrodb/tests/test_issue.py +++ b/disdrodb/tests/test_issue.py @@ -239,7 +239,7 @@ def test_write_issue(tmpdir): issue._write_issue(fpath, timesteps=timesteps, time_periods=time_periods) # Load YAML file - with open(fpath, "r") as f: + with open(fpath) as f: issue_dict = yaml.load(f, Loader=yaml.FullLoader) # Check the issue dictionary diff --git a/disdrodb/tests/test_metadata.py b/disdrodb/tests/test_metadata.py index ebab3d9f..9e3f8094 100644 --- a/disdrodb/tests/test_metadata.py +++ b/disdrodb/tests/test_metadata.py @@ -75,7 +75,7 @@ def test_write_default_metadata(tmp_path): assert os.path.exists(fpath) # open it - with open(str(fpath), "r") as f: + with open(str(fpath)) as f: dictionary = yaml.safe_load(f) # check is the expected dictionary diff --git a/disdrodb/utils/logger.py b/disdrodb/utils/logger.py index 4578ff6b..69d68ec9 100644 --- a/disdrodb/utils/logger.py +++ b/disdrodb/utils/logger.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers diff --git a/disdrodb/utils/netcdf.py b/disdrodb/utils/netcdf.py index 18ad4509..62fa2c94 100644 --- a/disdrodb/utils/netcdf.py +++ b/disdrodb/utils/netcdf.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers diff --git a/disdrodb/utils/scripts.py b/disdrodb/utils/scripts.py index aec3e6f4..3344cc15 100644 --- a/disdrodb/utils/scripts.py +++ b/disdrodb/utils/scripts.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # -----------------------------------------------------------------------------. # Copyright (c) 2021-2022 DISDRODB developers # diff --git a/pyproject.toml b/pyproject.toml index 706a3cbb..bb977e10 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,9 +76,9 @@ upload_disdrodb_archive="disdrodb.data_transfer.scripts.upload_disdrodb_archive: select = ["F", "E", "I", - # "Q", - # "W", - # "UP", + "Q", + "W", + "UP", # "SIM", # "PTH", # "RET",