Skip to content

Commit 133983c

Browse files
authored
Merge pull request #13 from sstucker/main
0.5.2 remove Excel-style carriage return from TSV export and add utf-8 print to test
2 parents 6dce199 + 6dba96e commit 133983c

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

snirf2bids/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# __version__.py
2-
__VERSION__ = (0, 5, 1)
2+
__VERSION__ = (0, 5, 2)
33
__version__ = '.'.join(map(str, __VERSION__))

snirf2bids/snirf2bids.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ def save_to_tsv(self, info, fpath):
596596

597597
# TSV FILE WRITING
598598
with open(filedir, 'w', newline='') as tsvfile:
599-
writer = csv.writer(tsvfile, delimiter='\t', newline='\n') # writer setup in tsv format
599+
writer = csv.writer(tsvfile, delimiter='\t', newline='') # writer setup in tsv format
600600
writer.writerow(fieldnames) # write fieldnames
601601
writer.writerows(valfiltered) # write rows
602602

tests/test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ def test_gen_from_all(self):
3737
print(json.dumps(json.loads(s[fname]), indent=2))
3838
elif fname.endswith('.tsv'):
3939
rows = csv.reader(io.StringIO(s[fname]), delimiter='\t')
40+
print('UTF-8:')
41+
print(s[fname].encode('utf-8'))
42+
print('Formatted:')
4043
print(tabulate.tabulate(rows))
4144
print('__________________________________________________')
4245

0 commit comments

Comments
 (0)