Skip to content

Commit

Permalink
Merge pull request #73 from rg3515/patch-1
Browse files Browse the repository at this point in the history
Fix library.py: function parse_file_name
  • Loading branch information
laszewsk authored Nov 28, 2023
2 parents 048b552 + ea09579 commit 4aa36db
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions benchmarks/cloudmask/target/greene_v0.5/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def __init__(self, file_name):
self.file_info = self.parse_file_name()

def parse_file_name(self):
components = self.file_name.split('_')
components = [obj for obj in self.file_name.split('_') if obj!='']

return {
"filename": self.file_name,
Expand All @@ -21,10 +21,10 @@ def parse_file_name(self):
"start_time": datetime.strptime(components[4], "%Y%m%dT%H%M%S"),
"stop_time": datetime.strptime(components[5], "%Y%m%dT%H%M%S"),
"creation_date": datetime.strptime(components[6], "%Y%m%dT%H%M%S"),
"instance_id": components[7],
"center_id": components[8],
"class_id": components[9].split('.')[0],
"file_extension": components[9].split('.')[1]
"instance_id": components[7]+'_'+components[8]+'_'+components[9]+'_'+components[10],
"center_id": components[11],
"class_id": components[12]+'_'+components[13]+'_'+components[14].split('.')[0],
"file_extension": components[14].split('.')[1]
}

def get_file_info(self):
Expand Down

0 comments on commit 4aa36db

Please sign in to comment.