
Practice what you Preach (or, what I preach)
During this year I have made seven feature releases and a bunch of smaller fixes to the Open Source project that I maintain. The project adds useful tooling support for Python Teams that develop things according to the Polylith Architecture. One new feature is the possibility to inspect the coupling between code. In Polylith, code is logically grouped into smaller reusable parts with clear boundaries between them. Those are called Bricks. In Python, a brick would be a package within the same repo.
The feature is about visualization and validation of the package interfaces across the repository. With a simple command, you will find out if code is bypassing the explicit interface of a package. In Python, the interface of a package can be defined in the __init__.py, but it is an optional feature.
There's benefits of having code that interacts via explicit interfaces: from an Architecture/Software Design point of view but also from a practical point of view. Such as refactoring: code will be very easy to move and rearrange when having the interface defined clearly. There’s also a lower risk of breaking things when changing the code within a package. Circular dependencies is another thing that might cause unwanted side-effects. It can be valid to have two packages depend on each other, if the imports are for different modules in the packages. But this is an indication that something might be wrong with the design.
When developing the visualization and validation of these things, I discovered that the Open Source tool itself bypassed the explicit interfaces in a couple of places and also had a package-level circular dependency. Better practice what you preach, right?
So I fixed that and wrote a short post about it:
https://davidvujic.blogspot.com/2026/07/practice-what-you-preach.html