rawloader icon indicating copy to clipboard operation
rawloader copied to clipboard

Fix clippy warnings

Open schoenenberg opened this issue 4 years ago • 4 comments

Hi Pedro,

I would like to fix some clippy-warnings in the code, if this is ok for you.

Best regards, Maximilian

schoenenberg avatar Apr 14 '20 10:04 schoenenberg

There are a few rustc warnings now that should definitely be fixed. I don't know what kinds of things clippy suggests be changed but I assume those are fine too.

One thing I haven't done yet that would be useful for those kinds of refactorings is getting an automated regression testing setup by making sure the output stays exactly the same over the test set in https://raw.pixls.us/. But feel free to suggest some changes. I'll review them manually if needed.

pedrocr avatar Apr 14 '20 14:04 pedrocr

Regression tests would be great for a library like this. I found this library and will check it out: retest

schoenenberg avatar Apr 15 '20 08:04 schoenenberg

My plan for this was actually quite simple:

  1. Write a very simple program that takes in a file, processes it with the library and prints out all the metadata and a hash of the output data
  2. Run that program over the test set and save the output files into the repository
  3. Write a simple script that compares the output of the program with the saved files and shows any differences as test failures

Since doing the raw processing without the image pipeline is very fast, it should be a pretty fast test run that can be used on every PR/commit. The only problem is that it requires having quite a few GB of test images locally. I don't know if that means I can't do that test in travis for automation and need to set it up in my own server and integrate with GitHub.

pedrocr avatar Apr 15 '20 09:04 pedrocr

I will definitely do this before I create a PR for the Clippy-Warnings. I'm just really busy right now. That's why it may take a while.

schoenenberg avatar Apr 21 '20 07:04 schoenenberg