Other articles


  1. Updating your setup.py files to the newer format - 2020 May 11

    One of the not so nice things about legacy installable python packages is the executable nature of setup.py files. This means amongst other things that you can't reliably determine the contents of some setup.py files without arbitrary code execution. This is what led to PEP 518 which specified a declarative metadata format that can be stored in easy to parse file. Updating is a pain though, but thankfully there's some tooling that makes this easier as I found out recently.


    read more
  2. Finding the versions of imported modules in Python code - 2019 December 12

    In many situations you want to be able to find the version of a package that has been imported from your code. This isn't anywhere near as straightforward as it would seem, here's a few options to do this.


    read more
  3. Running pip as a Python module - 2019 November 03

    Since Python 3.4 you have been able to run pip as though it were a Python module, this actually prevents a variety of annoying issues from occurring.


    read more
  4. Getting Altair to render inline in Jupyter - 2019 April 11

    Run into the issue where Altair won't plot inline in your Jupyter notebooks? Here's a reason why it happens and how to fix it.


    read more
  5. TIL: Install options for pip in requirements.txt - 2018 February 14

    Some things I learned about pip installs from requirements.txt


    read more