1. test functions should be in the test folder. 2. perhaps using pycall to test against scikit-learn is a better option, although some of the stuff there is buggy as well. 3. I would implement a core concept module and have other modules extend functions from this module.