daft-dev / daft

Render probabilistic graphical models using matplotlib
https://docs.daft-pgm.org
MIT License
675 stars 118 forks source link

Typing & Refactoring #205

Open dsfulf opened 3 months ago

dsfulf commented 3 months ago

This is now fully typed. This is especially helpful with the param dicts which were being passed as kwargs to matplotlib, but were also being modified within daft prior to being passed on.

In addition, I've refactored the PGM, Node, Edge, and Plate into separate files, and resolved circular dependencies resulting from exports. Some of the names from the recent refactor were changed to conform to more common Python style.

Lastly, one of the tests was in error, testing wordy.png twice. I've fixed this.