Closed jyn514 closed 6 years ago
This should not be merged yet; if you update a file, make will not remake the dependencies, which defeats the point of testing. I need to update the makefile to depend on the sources as well as intermediary data files.
This is ready to go. Some notes: although this runs in a different worktree from gradeforge
, it uses the same intermediaries, so it shouldn't remake the same database twice.
TODO: only run tests on files that have changed (i.e. pytest git diff --cached --name-only
), but without the git dependency in case you want to test things before commiting
Ignoring the failed build - this idea won't work. Every time you check out a different branch, git will touch your files, making all the dependencies out of date, including the downloads. Going to switch to make clean && make test
instead
Now it just remakes the whole thing every time. Going to add this to a TODO, but it'd be hard to implement: you'd need to checkout the data as well as the source in order not to break the build.
This ensures that commits are atomic. Although it is possible to skip verification (
git commit --no-verify
), this should only be used in edge cases such as updating the readme.This cannot be turned on by default because git refuses to populate
.git/hooks
from any pull. To enable it, runln -s ../../scripts/pre-commit .git/hooks
.