brando90 / MathNet-large-scale-Mathematics-Dataset-for-Machine-Learning

1 stars 0 forks source link

people are required to write authorship for question answer at the top #38

Open brando90 opened 7 years ago

brando90 commented 7 years ago

maybe format is a comment with full name and email.

brando90 commented 7 years ago

note git also tracks via git username too.

brando90 commented 7 years ago

is there a way to enforce this?

hairuoguo commented 7 years ago

See #39

brando90 commented 7 years ago

@hairuoguo but @qianli wants there to be an actual typed string per question python file (beyond git keeping track). For example when u download the code or not using git one doesn't know the authorship.

hairuoguo commented 7 years ago

It looks like this is possible using git pre-commit hooks: https://stackoverflow.com/questions/7291186/git-warn-before-committing-if-string-appears-in-source-or-diff

hairuoguo commented 7 years ago

So it looks like it won't be possible to set up a client-set hook that rejects invalid commits using Github (it is only possible if we set up a remote master on our own server that lets us run our own checks on pushes). I'm writing a hook that will run client-side (to fail commits if the authorship information is not there) and which we can install via an install.sh file, but ultimately there is no way to prevent people from removing that hook and committing their code anyway. Maybe we can have this first as a temporary fix (when only MIT students are involved with question creation), and then set up a server-side hook once this project involves public submissions?

brando90 commented 7 years ago

I don't know what a good solution would be. I didn't even consider rejecting commits. I thought we could just do pull requests and have it humans check it or something. Maybe we can think about this after the more important/main features of the framework are up.