v1.2.0 Release: Polishing the Edges
2023-06-29Welcome to our latest production, the v1.2.0 release! We've been busy squashing some bugs and fine-tuning the gears beneath the surface.
A minor misstep led us to inadvertently christen one of the internal tweaks as a new feature, thus birthing the latest minor version, instead of 1.1.1. Just a slip on the dance floor, nothing to lose sleep over.
Here's the latest playbill:
Automated Tests
Your trusted assistant, SuCoS, is now harnessing the power of automated tests, acting upon every commit and release. With an eye for both the everyday and the peculiar, these tests aim to scour every nook and cranny of the code.
Although we're just dipping our toes in the world of testing, we're already executing around 60 tests, covering roughly 30% of SuCoS's labyrinthine code. We've christened this proportion of the code eventually executed during testing as Coverage.
Our ambitions soar to:
- A legion of hundreds, billions of tests
- Ensuring at least 75% of the code is under the protective umbrella of Coverage
- Embracing the Test-Driven Development ethos
TDD
TDD or Test-Driven Development, is a fine art of code crafting. It's akin to crafting a treasure map, where the tests that the new feature must conquer are delineated before even a single line of actual code is written.
Although, it's not always the star of the show during early stages due to the dynamic dance of prototyping. And I must confess, this method and I have an ongoing love-hate relationship.
Lazy Pages List
A pivotal shift occurred in the site and page .Pages list in the previous versions - they morphed into a dictionary indexed by URL. This evolutionary step wielded a significant edge during site parsing as it could quickly summon a given content using its permalink.
However, the flip side of using dictionaries within the Liquid template presented a hefty challenge, leading us to use the dictionary covertly and only conjure a list when the situation calls for it. This tactical switch ensured a swift process while preserving the simplicity of use.
Code Reorganization
Once upon a time, we had a factory class (BaseGeneratorCommand
) for creating Site and Front Matter that had a bit of a growth spurt. When the Automated Tests spotlight hit this class, it was clear: it was juggling too many roles.
Our fix? We moved parts of Site
and FrontMatter
creation into their own hands. This meant a slight growth spurt for these classes, the BaseGeneratorCommand
class underwent a pleasing slimming-down procedure.
Our next act? More tests and a return to the wonderland of new features!