-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
305 lines (224 loc) · 9.13 KB
/
Makefile
File metadata and controls
305 lines (224 loc) · 9.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
# Grading
# Change codes UGRD/2171/02/BIOLOGY/101187
# Maybe
# 2019 Feb 22 (Fri) REJECT current submodule structure
# This seems to have no cost (except a flabby history I guess)
### Hooks for the editor to set the default target
current: target
-include target.mk
##################################################################
# make files
Sources = Makefile README.md LICENSE.md
ms = makestuff
-include $(ms)/perl.def
##################################################################
## Content
## dropdir has "disk" subdirectories, for disks, and sensitive products in the main directory
## It would be fun to have a rule that does mkdir when appropriate, but we don't
## mkdir /home/dushoff/Dropbox/courses/3SS/2019/final_disk ##
## /bin/cp -r /media/dushoff/*/*/* dropdir/final_disk/ ##
Sources += $(wildcard *.R *.pl)
Ignore += dropdir
dropdir: dir = /home/dushoff/Dropbox/courses/3SS/2019
dropdir:
$(linkdirname)
dropdir/%:
$(MAKE) dropdir
######################################################################
## merge notes
## I mostly merge on idnum. Strategy is to make it numeric as often
## as seems necessary while merging. Then pad it right before avenue
## or mosaic. Current code in avenueMerge.R
## Spreadsheets with TA marks from HWs and SAs
## How did we make original spreadsheet from Avenue?
## Import TA marks (manual) and change empties to zeroes
## Use named versions of marks.tsv (no revision control in Dropbox)
## Need to update in Apr 2019
## downcall dropdir/marks5.tsv ##
Ignore += marks.tsv
marks.tsv: dropdir/marks5.tsv zero.pl ##
$(PUSH)
## Parse out TAmarks, drop students we think have dropped
## Used Avenue import info; this could be improved by starting from that
## Pull a subset of just student info
Sources += nodrops.csv
dropdir/drops.csv:
$(CP) nodrops.csv $@
TAmarks.Rout: marks.tsv dropdir/drops.csv TAmarks.R
######################################################################
## Polls
## Get PollEverywhere data:
## https://www.polleverywhere.com/reports / Create reports
## Participant response history
## Select groups for this year
## Download csv (lower right)
## To repeat:
## Reports / select report you want / Update reports (next to Current Run at top)
## downcall dropdir/polls.csv ##
## Mosaic:
## downcall dropdir/roster.xls
######################################################################
# Read the polls into a big csv without most of the useless information
polls.Rout: dropdir/polls.csv polls.R
# Parse the big csv in some way. Tags things that couldn't be matched to Mac address with UNKNOWN
# Treat the question that matches "macid" as a fake (if present)
# and use it to help with ID
parsePolls.Rout: polls.Rout parsePolls.R
# Calculate a pollScore and combine with the extraScore made by hand
# The csv is where to look for orphan lines and try to figure out if people are missing points they should get
# Then loop back to the manual part of the .ssv
pollScore.Rout: dropdir/extraPolls.ssv parsePolls.Rout pollScore.R
pollScore.Rout.csv:
# Ask people to answer a fake question with "macid" in it
# in all the ways that they answered the polls
# Then save people manually in column 3 of .ssv
# Merge to save people who repeatedly use student number
## Why not working? 2019 Apr 29 (Mon)
## Patched, but not doing anything. Because people know what macid is now? remove?
pollScorePlus.Rout: pollScore.Rout TAmarks.Rout pollScorePlus.R
## Make an avenue file; should work with any number of fields ending in _score (in a variable called scores)
## along with a field for macid, idnum or both
## No, scores for input should have only macid, I guess
## https://avenue.cllmcmaster.ca/d2l/lms/grades/admin/enter/user_list_view.d2l?ou=273939
## import
pollScorePlus.avenue.Rout: avenueMerge.R
pollScorePlus.avenue.Rout.csv: avenueMerge.R
pollScorePlus.avenue.csv: avenueNA.pl
######################################################################
pardirs += Tests
Ignore += $(pardirs)
## Chaining (works now? 2019 Feb 23 (Sat))
## Problem: $(MAKE) can lead to looping
## Dependencies can lead to make never being finished
## This works fine if Tests exists
## A broader pardirs rule might just work!
Tests/%:
$(MAKE) Tests
hotdirs += $(pardirs)
## Files from media office
Sources += media.md
######################################################################
## Pipeline to mark and validate a set of scantrons
## Sometimes sheets really don't scan!
## So we need to be able to add manual rows to the .tsv file
## Also use this for deferred finals if you don't want to bother with
## scanning
dropdir/%.manual.tsv:
$(touch)
## Sort out dropdir
##
## Student itemized responses
## Script reads manual version first, ignores repeats
## Necessitated by Daniel Park!
Ignore += *.responses.tsv
## final.responses.tsv: rmerge.pl
%.responses.tsv: dropdir/%.manual.tsv dropdir/%_disk/BIOLOGY*.dlm rmerge.pl
$(PUSH)
## Scantron-office scores
Ignore += *.office.csv
## final.office.csv:
%.office.csv: dropdir/%_disk/StudentScoresWebCT.csv
perl -ne 'print if /^[a-z0-9]*@/' $< > $@
## Our scores
Ignore += $(wildcard *.scoring.csv)
### Formatted key sheet (made from scantron.csv)
## make Tests/final.scantron.csv ## to stop making forever ##
## final.scoring.csv:
%.scoring.csv: Tests/%.scantron.csv scoring.pl
$(PUSH)
## Score the students
## How many have weird bubble versions? How many have best ≠ bubble?
## midterm2.scores.Rout: midterm2.responses.tsv midterm2.scoring.csv scores.R
## final.scores.Rout: final.responses.tsv final.scoring.csv scores.R
%.scores.Rout: %.responses.tsv %.scoring.csv scores.R
$(run-R)
## Compare
## final.scorecomp.Rout: final.office.csv final.scores.Rout scorecomp.R
## 2019 Apr 24 (Wed) Only non-best is because of non-existent version 5
%.scorecomp.Rout: %.office.csv %.scores.Rout scorecomp.R
$(run-R)
######################################################################
## Merging test with scoresheet
## Patch IDs if necessary,
## then make them numeric (for robust matching with TAs)
## Later: pad them for Avenue/mosaic
Sources += idpatch.csv
%.patch.Rout: %.scores.Rout idpatch.csv idpatch.R
$(run-R)
## final.patch.Rout: idpatch.R
## Merge SAs (from TA sheet) with patched scores (calculated from scantrons)
## Set numeric to merge here. Pad somewhere downstream
## Check anomalies from print out
## Empty scores will be set to 0. Add MSAF to sheet (as NA?)
## midterm2.merge.Rout: midMerge.R
midterm%.merge.Rout: midterm%.patch.Rout TAmarks.Rout midMerge.R
$(run-R)
######################################################################
## avenueMerge
## Still developing
## Code that takes a whole spreadsheet to Avenue still in Tests/
## Put the final marking thing in a form that avenueMerge will understand
## midterms but not final merged with TAmarks for above this step
## FRAGILE (need to check quality checks)
## midterm2.grade.avenue.csv:
midterm%.grade.Rout: midterm%.merge.Rout finalscore.R
$(run-R)
## Edit finalscore to match names for Avenue output
final.grade.Rout: final.patch.Rout finalscore.R
$(run-R)
## final.grade.avenue.Rout: avenueMerge.R
Ignore += *.avenue.Rout.csv
%.avenue.Rout: %.Rout TAmarks.Rout avenueMerge.R
$(run-R)
## avenueNA takes NA -> -. avenue treats these incorrectly as zeroes
## final.grade.avenue.csv: avenueNA.pl
Ignore += *.avenue.csv
%.avenue.csv: %.avenue.Rout.csv avenueNA.pl
$(PUSH)
######################################################################
## Combined course grading
## Score merging
## Read stuff from different sources into a complete table
tests.Rout: TAmarks.Rout midterm1.merge.Rout.envir midterm2.merge.Rout.envir final.patch.Rout.envir tests.R
## Check weightings, number of assignments, components, etc.
## course.Rout.csv: course.R
course.Rout: gradeFuns.Rout tests.Rout pollScorePlus.Rout TAmarks.Rout course.R
## Mosaic
## Go to course through faculty center
## You can download as EXCEL (upper right of roster display)
## and upload as CSV
## downcall dropdir/mosaic.xls ## Insanity! This is an html file that cannot be read by R AFAICT, even though it opens fine in Libre ##
## downcall dropdir/mosaic.csv
## Check class number
## Check dropCandidates in Rout
## mosaic_grade.Rout.csv: mosaic_grade.R
mosaic_grade.Rout: dropdir/mosaic.csv course.Rout mosaic_grade.R
## Upload this .csv to mosaic
## Faculty center, online grading tab
## ~/Downloads/grade_guide.pdf
## There is no guidance about students with incomplete marks; let's see what happens
## Copy grades to dropdir for diffing:
#### cp mosaic_grade.Rout.csv dropdir ##
Ignore += grade.diff
grade.diff: mosaic_grade.Rout.csv dropdir/mosaic_grade.Rout.csv
$(diff)
######################################################################
## Older stuff, currently unsuppressing
## Analysis stuff may still be suppressed here
Sources += grades.mk
######################################################################
### Makestuff
Sources += Makefile
## Sources += content.mk
## include content.mk
Ignore += makestuff
msrepo = https://github.com/dushoff
Makefile: makestuff/Makefile
makestuff/Makefile:
git clone $(msrepo)/makestuff
ls $@
-include makestuff/os.mk
-include makestuff/wrapR.mk
-include makestuff/git.mk
-include makestuff/visual.mk
-include makestuff/projdir.mk