Skip to content

Commit

Permalink
Underscores before suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
TheChymera committed Apr 25, 2024
1 parent ab5f260 commit a293360
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nwb2bids/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def reposit(in_dir, out_dir):
for var in ("contacts", "probes", "channels"):
var_metadata = metadata[var]
var_metadata = drop_false_keys(var_metadata)
var_metadata_file_path = os.path.join(out_dir, subject_id, session_id, "ephys", subject_id + var + ".tsv")
var_metadata_file_path = os.path.join(out_dir, subject_id, session_id, "ephys", subject_id + "_" + var + ".tsv")

This comment has been minimized.

Copy link
@yarikoptic

yarikoptic Apr 25, 2024

Member

Overall I would recommend to use f-strings more since they make it more readable IMHO, e.g. here would be

            var_metadata_file_path = os.path.join(out_dir, subject_id, session_id, "ephys", f"{subject_id}_{var}.tsv")

This comment has been minimized.

Copy link
@TheChymera

TheChymera Apr 25, 2024

Author Collaborator
write_tsv(var_metadata, var_metadata_file_path)

bids_path = f"{out_dir}/{metadata['subject']['subject_id']}/{metadata['session']['session_id']}/ephys/{metadata['subject']['subject_id']}_{metadata['session']['session_id']}_ephys.nwb"
Expand Down

0 comments on commit a293360

Please sign in to comment.