kliment / Printrun

Pronterface, Pronsole, and Printcore - Pure Python 3d printing host software
GNU General Public License v3.0
2.36k stars 995 forks source link

Add documentation and unit tests for printcore #1334

Closed rockstorm101 closed 1 year ago

rockstorm101 commented 1 year ago

At first this PR tries to add more documentation and some unit tests to printrun/printcore.py. As a collateral, the functionality of printrun/printereventhandler.py is also tested.

This testing highlighted some issues with the current printcore.py code which I've tried to address as well on separate commits.

This PR does not break (as far a I know) the current API. However, a thorough review would be more than welcome. I hope the testing logic is not too obfuscated.

This is also a first step in preparation for a printcore code refactoring. I'll submit that once we are happy with this PR.

As always, any comments/suggestions are appreciated and I'll be happy to address them.

rockstorm101 commented 1 year ago

If no one argues against it I will merge this PR along with #1333 next week :)

volconst commented 1 year ago

@rockstorm101 which AI generated this?

rockstorm101 commented 1 year ago

@rockstorm101 which AI generated this?

Hahahaha, I wish I could say it was done by an AI and it only took 5 minutes but I'm afraid it was me who wrote this and it took me ages :P (hence why this might introduce some regression bugs)