Skip to content

Commit

Permalink
Add some logging when adding run-items
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelzwiers committed Jul 13, 2024
1 parent e2b49f1 commit a112d29
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bidscoin/bidseditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,9 @@ def show_contextmenu(self, pos):
run = bids.get_run(self.template_bidsmap, datatype, 0, datasource)
run['properties']['filepath'] = datasource.properties('filepath') # Make the added run a strict match (i.e. an exception)
run['properties']['filename'] = datasource.properties('filename') # Make the added run a strict match (i.e. an exception)
LOGGER.verbose(f"Expert usage: User adds run-item {dataformat}[{datatype}]: {filename}")
if Path(filename) in bids.dir_bidsmap(self.output_bidsmap, dataformat):
LOGGER.warning(f"Added run-item {dataformat}[{datatype}]: {filename} already exists")
bids.insert_run(self.output_bidsmap, run, 0) # Put the run at the front (so it gets matching priority)
if dataformat not in self.ordered_file_index:
self.ordered_file_index[dataformat] = {datasource.path: 0}
Expand Down

0 comments on commit a112d29

Please sign in to comment.