Seeing code flows and generating tests with Kolo
Episode Deep Dive
Guest
Will, a software developer who has been using Django since 2013, is the founder and creator of Simple Poll, a popular Slack app built on Django. He recently left his job at GitHub to focus full-time on Colo, an extension for Visual Studio Code that provides advanced insights into Python codebases, particularly for Django projects.
- Simple Poll: Will shared his experience developing Simple Poll, a Slack app built with Django, which started as a side project and eventually grew to become his full-time job. He discussed the challenges of monetizing the project and balancing it with his day job at GitHub.
- Colo: Colo is an extension for Visual Studio Code that offers advanced insights into Python codebases, specifically designed for Django projects but can be adapted for other frameworks. Key features include:
- Visualization of code flow (sun chart) to understand how data passes through functions and classes.
- Generation of integration tests based on captured traces, which can save time and effort in writing manual tests.
- Trace Inversion: Colo's test generation capability works by inverting the recorded trace of a request, extracting function calls, inputs, outputs, SQL queries, and other relevant data to create an integration test. This process helps developers understand their code better and generate high-quality tests with minimal effort.
- Test Generation: Colo's test generation is algorithmic and rule-based at the moment but has potential for improvement using Large Language Models (LLMs) or a conversational interface for generating more advanced test cases.
- Future Developments:
- Expanding support to other Python web frameworks like Flask, FastAPI, and scientific Python stack by generalizing Colo's configuration system.
- Investigating the use of Colo traces in production environments for debugging niche issues without modifying code or adding excessive logging.
- Business Model: Colo is not entirely open-source at present but aims to have a sustainable business model with possible open-core or partially open-source future developments, contingent on better understanding the product's value and potential market fit.
Overall Takeaway
Colo is an innovative extension for Visual Studio Code that provides valuable insights into Python codebases, particularly Django projects. Its test generation feature significantly reduces manual effort required to write integration tests while promoting a deeper understanding of code flow. With plans for expanding support to other frameworks and exploring production use cases, Colo has the potential to become an essential tool for Python developers looking to optimize their testing processes and enhance overall code comprehension.
Links from the show
Kolo: kolo.app
Kolo's info repo: github.com
Kolo Playground: play.kolo.app
Generating tests with Kolo: kolo.app
Watch this episode on YouTube: youtube.com
Episode transcripts: talkpython.fm
--- Stay in touch with us ---
Subscribe to Talk Python on YouTube: youtube.com
Talk Python on Bluesky: @talkpython.fm at bsky.app
Talk Python on Mastodon: talkpython
Michael on Bluesky: @mkennedy.codes at bsky.app
Michael on Mastodon: mkennedy