"Thanks to DeepSource, all our code quality practices are now automated. The DeepSource checks are working well for us. Along with using it for Python, we are planning to integrate it with some of our upcoming Go projects."
— Joy Lal Chattaraj, Member of Technical Staff
Qubole has one or two developers from each team working on qds-sdk-py, bringing it to 15-20 developers overall. According to Joy Lal Chattaraj, a member of the technical staff at Qubole, to maintain the project's health, they relied on unit test coverage, and de-facto standards like PEP8, compact function definitions, etc. for any new code added. All of these conventions were enforced manually during code reviews.
With multiple developers from different teams working on the project, they faced the following challenges:
- Manual reviews started consuming a lot more time, slowing down the releases
- Chances of missing code flaws increased considering the time constraints
- Enforcing code standards amongst the developers got trickier
Joy realized that automating code reviews would be a win-win for everyone. In August 2019, he implemented DeepSource to run static code analysis. The straightforward configuration required zero technical support, and the analysis was up and running in a few minutes. The team's onboarding followed shortly after.
Automating the code review process
Automation proved to be a savior for Qubole's developers. DeepSource scans run with every pull request and flag the issues directly in GitHub checks within seconds.
Shorter feedback loop
The developers conducted the first round of code review themselves and fixed the flaws detected before involving the reviewer, saving both the developer and reviewer a lot of time.
Recalling one such instance, Joy says:
One of the developers had added a new feature which had a few uninitialized variables, PEP8 standards violations, and a few more irregularities. DeepSource automatically highlighted those issues, and the developer had fixed them even before someone reviewed the code manually, saving a lot of the reviewer's time.
Faster releases with minimal flaws
With DeepSource, Qubole's review time has decreased 3-fold, the feature release cycle has picked up pace, and the scope for missing flaws — be it an obvious error or an elusive one, has reduced considerably.
Mandatory checks on GitHub pull requests
Seeing the accuracy of issues reported and the low false positives, Joy and his team also saw evident improvement in the quality metrics of the codebase. That's when he decided to make the checks mandatory, which means unless all the issues flagged by DeepSource are not resolved, neither the developer nor the reviewer can merge the code. It has been helpful for Qubole in blocking the pull requests that do not comply with the project's coding standards.
Tracking test coverage, continuously
At Qubole, the team aims to have 100% unit test coverage for all the incoming code and above 80% for the project overall, which is tracked regularly. Having a tool in place already which tracks test coverage without any overhead, became a bonus.
DeepSoure reports/updates the test coverage status after every run. It helps the developers ensure that the defined threshold is maintained in every pull request that is merged to master.
Test coverage is the check I like the most, and the ability to integrate it with pull requests is icing on the cake.
Shift left, enterprise-grade.
Start building with the most sophisticated static analysis platform for your workflow and prevent bugs before they end up in production.
Deploy on-premise to have absolute control of your data
Onboard thousands of repositories in minutes, not months
Save over 4 hours on average per developer every week