We use Jira where I work and I find it helpful to include the Jira issue/ticket number pre-populated within the commit message. This only works if the branch I’m working on starts with the Jira issue number. Otherwise it doesn’t input anything. Here’s the snippet that does so:
I read this blog post about converting function/method arguments into what their type annotations mentioned they would be. You can read more from that link, but pretty much I got an idea that someone should be able to create fixtures from type annotations. Anyways, here’s a proof of concept just using the basic built-in types in Python.
I’m currently using the unittest framework for writing tests. One thing I miss is being able to use the @pytest.mark.parametrize decorator to test out different inputs. If you know about this feature, then you know why it’s so useful. Luckily, unittest has a similar feature that starting working since Python 3.4, it’s called subtests.
If you ever need certain packages to be installed by default when creating a virtualenv through virtualenvwrapper, then this post might help you out. Now there’s a couple of ways of doing what I’m about to show but this approach is the one I like the best.
When working with Google Cloud Endpoints Frameworks(CEF) there was an unexpected issue that I kept running into. The Google Cloud docs don’t mention (or at least I didn’t find it) about configuring your app.yaml file for GCE v2 usage.