Universal tox tests (from just about any CI)

Posted on Sun 17 October 2021 in hints-and-kinks • Tagged with CI, Python, GitLab, GitHub, Zuul • 5 min read

I like tox. A lot. I use it all the time. This is a quick summary on how to use it in such a way that it becomes a central anchor point that you can use from all your CI systems.

Continue reading

What I now know about HAproxied Django database connections, and wish I'd known sooner

Posted on Tue 08 September 2020 in presentations • Tagged with Conference, Python • 1 min read

My talk from PyConline AU 2020.

Continue reading

Celery to Chew On

Posted on Wed 06 May 2020 in hints-and-kinks • Tagged with Django, MySQL, HAProxy, Celery, Python • 7 min read

Asynchronous Celery tasks that manipulate a MySQL/Galera database from a Django application can produce very interesting behavior when HAProxy is involved.

Continue reading

Configuring CLI output verbosity with logging and argparse

Posted on Wed 01 May 2019 in hints-and-kinks • Tagged with Python • 4 min read

Command-line interfaces frequently produce output whose verbosity your users may want to be able to tweak. Here’s a nifty way to do that.

Continue reading

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