jyn514 / GradeForge

Courses available from my.sc.edu
GNU General Public License v3.0
1 stars 0 forks source link

abort if csv files are empty #35

Open jyn514 opened 6 years ago

jyn514 commented 6 years ago

just had to throw in this emergency patch due to a regression in pandas. This would have been much easier to solve if I'd known which file was empty to start. The makefile should abort if an output file is empty.

jyn514 commented 6 years ago

this will be hard to do in an extensible way. what I would like to do is have this be the default somehow, the same way that .DELETE_ON_ERROR is currently the default. Unfortunately, there doesn't seem to be a built-in way to do this.

It'd be trivial to make a check_not_empty function which takes a file as input, but that just shifts the onus from the end user to the developer; you would still need to $(call check_not_empty,$@) for every recipe individually.