Ew! Snippy-NG has Bugs!

󰃭 2025-06-04

Snippy’s father (tseemann) is a notorious GitHub bug hunter. He has over 1.8K closed and about 500 open issues on GitHub. In the spirit of Torsten’s contributions to the open source community, we are making it easy for anyone to report bugs in Snippy-NG.

Reporting Bugs

In the latest version of Snippy-NG (v1.0.0), we have added a new flag snippy-ng --bug that allows users to report bugs directly from the command line. This command will open a new issue on the Snippy-NG GitHub repository with a bug report template and some pre-filled labels.

Automatic Bug Catching

In addition to the --bug flag, we have also added a new BugCatcher feature that automatically catches runtime bugs in Snippy-NG. If there is an unhandled exception in Snippy-NG, it will automatically generate a bug report with prefilled information like the version of Snippy-NG and user’s operating system. Users can click a link to open the bug report in their browser, where they can add more details and submit it.

Here’s an example of a real bug report generated by Snippy-NG:

https://github.com/centre-pathogen-genomics/snippy-ng/issues/32

Bonus

We also added new formatting for the logs that makes it easier to read and understand which stages are running.

-------------------------------------------------------------------
                         Running Snippy-NG                         
-------------------------------------------------------------------
[17:30:29 - INFO] Version: 1.0.0
[17:30:29 - INFO] Stages:
[17:30:29 - INFO]   1. PrepareReference
[17:30:29 - INFO]   2. PreAlignedReads
[17:30:29 - INFO]   3. FreebayesCaller
---------------------- CHECKING DEPENDENCIES ----------------------
[17:30:29 - INFO] Checking dependencies for PrepareReference...
[17:30:29 - INFO] Found biopython v1.85
[17:30:29 - INFO] Checking dependencies for PreAlignedReads...
[17:30:29 - INFO] Found samtools v1.20
[17:30:29 - INFO] Found samclip v0.4.0
[17:30:29 - INFO] Checking dependencies for FreebayesCaller...
[17:30:29 - INFO] Found freebayes v1.3.9
[17:30:29 - INFO] Found vt v0.5772
[17:30:29 - INFO] Found bcftools v1.21
[17:30:29 - INFO] Dependencies look good!
-------------------------------------------------------------------
[17:30:29 - INFO] Setting working directory to 'out'
------------------------ PrepareReference -------------------------
[17:30:29 - INFO] cpus=1 ram=8 outdir=PosixPath('out') tmpdir=Po...