covid19za icon indicating copy to clipboard operation
covid19za copied to clipboard

[Feature] Add test to check format and totals of CSV files on pull-requests

Open dmackie opened this issue 4 years ago • 1 comments

Is your feature request related to a problem? Please describe. It is pretty easy to accidentally commit a CSV that breaks where a comma may be left off or one of the values have a transposed digit.

Describe the solution you'd like An automatic test is run on pull requests that confirms the CSV is formatted correctly, and that all the values add up to the total as a checksum.

Describe alternatives you've considered Users should be checking their own and others work when it is submitted but a line of numbers if very easy to miss a small mistake like a transposed figure, or when you have read off the wrong number of the original source.

Additional context Points to my recent mistake of committing CSV file with over 1.6 Million confirmed cases and not picking up that this number was way too big. It was tests number I kept misreading off the image.

dmackie avatar Jul 01 '20 20:07 dmackie

@dmackie do you have any dummy code we can try out or a dummy process?

So what happens, a pull request comes through, what tests run and what gets added to the pull request to show things are okay?

Is this possible in Github with actions?

vukosim avatar Jul 02 '20 05:07 vukosim