Skip to content

Commit 327ea49

Browse files
authored
fix csv course data bundling
1 parent bde06ed commit 327ea49

3 files changed

Lines changed: 3 additions & 5 deletions

File tree

bin/github.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ fi
3939
git checkout --quiet -B "$PAGES_BRANCH" "$GITHUB_BRANCH" --no-track
4040

4141
# update bundled information for public consumption
42-
# python3 ../bundle.py --out-dir ../course-data --format json --format xml --format csv
43-
python3 ../bundle.py --out-dir ../course-data --format json --format xml
42+
python3 ../bundle.py --out-dir ../course-data --format json --format xml --format csv
4443
python3 ../bundle.py --legacy --out-dir ../course-data/legacy --format json
4544

4645
# remove the source files (quietly)

bin/run.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ fi
3030
git checkout -B gh-pages master --no-track
3131

3232
# update bundled information for public consumption
33-
# python3 ../bundle.py --out-dir ../course-data --format json --format xml --format csv
34-
python3 ../bundle.py --out-dir ../course-data --format json --format xml
33+
python3 ../bundle.py --out-dir ../course-data --format json --format xml --format csv
3534
python3 ../bundle.py --legacy --out-dir ../course-data/legacy --format json
3635

3736
# remove the source files (quietly)

lib/csvify.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def csvify(data):
1212
item.pop('revisions')
1313
for key in item:
1414
if type(item[key]) is list:
15-
item[key] = ';'.join(item[key])
15+
item[key] = ';'.join(str(x) if not isinstance(x, str) else x for x in item[key])
1616
if type(item[key]) is str:
1717
item[key] = item[key].replace('\n', '\\n')
1818
with io.StringIO() as outfile:

0 commit comments

Comments
 (0)