Skip to content
Snippets Groups Projects
Commit 329ad762 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Remove debug output and obsolete code

parent 65ae0557
No related branches found
No related tags found
No related merge requests found
...@@ -69,14 +69,11 @@ if last_wh_date is not None: ...@@ -69,14 +69,11 @@ if last_wh_date is not None:
print(f"Last date of WH calculations is {last_wh_date}. Start date = {start_date}") print(f"Last date of WH calculations is {last_wh_date}. Start date = {start_date}")
# TODO: let filename/pattern be configurable <== DONE??
weatherdata_files = glob.glob(f"{infile_path}{filename_pattern}") weatherdata_files = glob.glob(f"{infile_path}{filename_pattern}")
#print(f"{infile_path}{filename_pattern}") #print(f"{infile_path}{filename_pattern}")
#print("What are the weatherdata files?") #print("What are the weatherdata files?")
#print(weatherdata_files) #print(weatherdata_files)
for file_path in sorted(weatherdata_files): for file_path in sorted(weatherdata_files):
print("Examining %s" % file_path)
# TODO: When filename/pattern is configurable: make the string search adaptable # TODO: When filename/pattern is configurable: make the string search adaptable
file_name = os.path.basename(file_path) file_name = os.path.basename(file_path)
# Skip if we don't have a complete date, which could indicate that we are looking at a yearly file of daily data # Skip if we don't have a complete date, which could indicate that we are looking at a yearly file of daily data
...@@ -85,12 +82,7 @@ for file_path in sorted(weatherdata_files): ...@@ -85,12 +82,7 @@ for file_path in sorted(weatherdata_files):
except ValueError as e: except ValueError as e:
print(e) print(e)
continue continue
#file_date = file_name[file_name.index("nordic")+7:file_name.index("nordic")+17]
# Skip if we don't have a complete date (10 characters), which could indicate that we are looking at a yearly file of daily data
#if len(file_date) != 10:
# continue
#wh_sum_date = local_timezone.localize(datetime.strptime(f"{file_date}", "%Y-%m-%d"))
# Only process files from the three last days (if this is not a work from scratch) # Only process files from the three last days (if this is not a work from scratch)
if start_date is not None and wh_sum_date < start_date: if start_date is not None and wh_sum_date < start_date:
continue continue
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment