kizniche / Mycodo

An environmental monitoring and regulation system
http://kylegabriel.com/projects/
GNU General Public License v3.0
2.98k stars 495 forks source link

Software Tests: unit, integration, functional, etc #112

Closed etiology closed 8 years ago

etiology commented 8 years ago
I really like the layout of this repo and the code reads well.

I noticed that there doesn't appear to be any software tests. The tests directory has manual utilities for evaluating actual hardware, but I was expecting unit tests or functional tests.

Would this be valuable to have? It would greatly improve the code base and offer stability with future commits. What do you think?

kizniche commented 8 years ago

Thanks! I've tried to put a good effort to make it more digestible and comment where I think things need explaining.

This is my largest software project and it kind of got out of hand for a while (pre-v4.0) because it lacked a logical structure and there were virtually no comments. I could understand why no one wanted to touch it. Luckily, @Cabalist came along and contributed a bunch to a new database framework and guided me in understanding good coding practices a little better.

There are still areas that could use improvement. Unfortunately, I'm pretty much a one man show at the moment. As things continue to grow because of new features, it's difficult to know if I'm going in the right direction. I haven't been formally educated in programming, so a lot of this is a learning experience in Python and general software architecture.

There are quite a few active installs around the world that are in control of keeping animals alive, growing plants/mushrooms, aging foods and other products, etc. so what you suggest would be rather valuable in preventing loss and headaches. I just have little experience in the area of the kind of testing you mention. Mainly, if my systems don't crash, or my limited testing of new features don't bugger out, I consider it good and push the update for everyone's system to use... Until I see an issue pop up here from someone that had their system break from the update. Definitely not ideal, but it's all I've known.

There's also my Biology PhD defense coming up in November, so what time I do devote to coding I try to keep small and simple, as to not get too caught up in something that could distract me from putting the effort I should into graduation and planning for after. Speaking of which, I need to return to preparing for a seminar I'll be presenting at this afternoon.