Skip to content

Commit

Permalink
Added space compatibility with CV, FL, CF regex
Browse files Browse the repository at this point in the history
  • Loading branch information
manjavacas committed Oct 24, 2023
1 parent 13e63f9 commit 428bb9a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions melkit/toolkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,19 @@ def _read_cvs(self) -> List[CV]:
'''
Looks for CVs in the input file and returns them as a list of CV objects.
'''
return self._read_object(r'\bCV\d{3}00\b')
return self._read_object(r'\b\s*CV\d{3}00\b')

def _read_fls(self) -> List[FL]:
'''
Looks for FLs in the input file and returns them as a list of FL objects.
'''
return self._read_object(r'\bFL\d{3}00\b')
return self._read_object(r'\b\s*FL\d{3}00\b')

def _read_cfs(self) -> List[CF]:
'''
Looks for CFs in the input file and returns them as a list of CF objects.
'''
return self._read_object(r'\bCF\d{3,8}00\b')
return self._read_object(r'\b\s*CF\d{3,8}00\b')

def get_cv(self, cv_id: str) -> CV:
'''
Expand Down Expand Up @@ -343,7 +343,7 @@ def get_edf_vars(self) -> List[str]:
keys = ['TIME']
with open(self._filename, 'r') as file:
for line in file:
if match(r'\bEDF\d{3}[A-Z][A-Z0-9]', line):
if match(r'\b\s*EDF\d{3}[A-Z][A-Z0-9]', line):
keys.append(line.split()[1])
return keys

Expand Down
2 changes: 1 addition & 1 deletion melkit/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2
0.3

0 comments on commit 428bb9a

Please sign in to comment.