Skip to content

Commit

Permalink
[FIX] Remove colons from log filename (#542)
Browse files Browse the repository at this point in the history
* Remove colons from log-file name.

* Update integration test regex for finding log files.
  • Loading branch information
tsalo authored Mar 12, 2020
1 parent a1f2f60 commit 3ff4572
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tedana/tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def check_integration_outputs(fname, outpath):

# Checks for log file
log_regex = ('^tedana_'
'[12][0-9]{3}-[0-9]{2}-[0-9]{2}T[0-9]{2}:'
'[0-9]{2}:[0-9]{2}.tsv$')
'[12][0-9]{3}-[0-9]{2}-[0-9]{2}T[0-9]{2}'
'[0-9]{2}[0-9]{2}.tsv$')
logfiles = [out for out in existing if re.match(log_regex, out)]
assert len(logfiles) == 1

Expand Down
4 changes: 2 additions & 2 deletions tedana/workflows/tedana.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,8 @@ def tedana_workflow(data, tes, out_dir='.', mask=None,
# create logfile name
basename = 'tedana_'
extension = 'tsv'
isotime = datetime.datetime.now().replace(microsecond=0).isoformat()
logname = op.join(out_dir, (basename + isotime + '.' + extension))
start_time = datetime.datetime.now().strftime('%Y-%m-%dT%H%M%S')
logname = op.join(out_dir, (basename + start_time + '.' + extension))

# set logging format
log_formatter = logging.Formatter(
Expand Down

0 comments on commit 3ff4572

Please sign in to comment.