This is a companion project for maketest which generates the source CSV file described below. The purpose is to take maketest output and allow it to be imported into the Canvas Gradebook
- I have a CSV file where one column has unique IDs (GitHub User IDs)
- I have a second CSV file which has different unique IDs (Canvas SIS Login IDs)
- I want to update a column of values from the first CSV file to the second, without relying on order of rows
- Make up a mapping file which maps GitHub IDs to SIS Login IDs, we can merge the data across CSV files, like a SQL join with foreign keys to different tables
- The result of that merge is a CSV file which can be imported into Canvas, reflecting the scoring results for Maketest without retyping them
- It's the usual golang stuff: be sure to have go set up
go get github.com/phpeterson-usf/csv-updatecdinto that directory, probably in~/go/src/github.com/phpeterson-usf/csv-updatego build
- Set up your Assignment Groups in Canvas, with an assignment within the group for test automation. This model of using Canvas ensures that there will be a column for automated grading in the exported CSV file. Canvas rubrics do not get a column in the exported file.
- Export a CSV file from your Canvas Gradebook
- Run
make testand copy$(PROJECT).csvinto where you usecsv-update(I runmaketeston a Raspberry Pi, but do Canvas import/export on a desktop computer) - Create a CSV file which maps GitHub ID to SIS Login ID
csv-updatetakes a-Coption to set a working directory. I put my CSV files on my desktop, so/Users/phil/Desktop- Run the merge
csv-update -C ~/Desktopcsv-updateasks you to choose the source file (the one with scores), the destination file (the one you exported from Canvas), and the mapping file. You also choose the column in the destination file where the scores should go - Output goes to a new file called
<destination>-updated.csvthat you can import back to Canvas