faceswap icon indicating copy to clipboard operation
faceswap copied to clipboard

Unit Tests Before Merging to master

Open Jack29913 opened this issue 8 years ago • 3 comments

Lately i see lots of issue post caused by merges https://github.com/deepfakes/faceswap/issues/268 , https://github.com/deepfakes/faceswap/issues/274 , https://github.com/deepfakes/faceswap/issues/276 People here quickly address these issues and have them fixed but in future we will encounter these nonetheless. I think running a script doing basic sanity checks (extract, train, convert) would be useful considering there are now lots of people contributing to the repo.

Jack29913 avatar Mar 11 '18 14:03 Jack29913

Related #222

Clorr avatar Mar 11 '18 17:03 Clorr

I agree that unit tests would be invaluable. The difficulty is in how we verify some of the result data, since much of our data is non-deterministic. We could at least ensure that each command runs correctly. We may be able to try loading/saving a model without processing it to ensure it's not changed (but models may be changed with random data on load). No unit testing would be perfect, even with known models due to how the system works.

I do think we would benefit from a dev branch to test pulls/new features before they're promoted to master. This would have at least stopped my recent error (fixed in #280 ) where I accidentally corrupted data during load from making it to the master branch.

I think #222 is different, since it's more a matter of cleaning our style and things like removing whitespace at the end of the line or turning tabs into spaces for consistent format. I'm not arguing against it, just saying it's a different type of effort.

Various "best practices" could be used, but I think we need a dev willing to dedicate themselves to doing it, since poor unit tests are worse than no tests at all.

bryanlyon avatar Mar 12 '18 05:03 bryanlyon

Even a basic test that the program can just start one of the extract/train/convert processes is good (those issues listed above would've been caught with this simple test).

oatssss avatar Mar 12 '18 16:03 oatssss