Using coverage with multiple parallel GitLab CI jobs

Posted on Sun 10 March 2019 in hints-and-kinks • Tagged with Python, CI, GitLab • 2 min read

If you ever write unit tests in Python, you are probably familiar with Ned Batchelder’s coverage tool. This article explains how you can use coverage in combination with tox and a GitLab CI pipeline, for coverage reports in your Python code.

Continue reading

Building a nested CLI parser from a dictionary

Posted on Sat 09 March 2019 in hints-and-kinks • Tagged with Python • 2 min read

Here’s a nice way to initialize a CLI argument parser in Python, with arbitrary levels of subcommands.

Continue reading

A Python one-liner for pretty-printing radosgw utilization

Posted on Thu 17 December 2015 in hints-and-kinks • Tagged with Ceph, Python • 1 min read

In case you need a quick overview of how many radosgw objects live in your Ceph cluster, here‘s how you do that in one (slightly involved) line of Python.

Continue reading