Using tox with Django projects

Today I was adding tox and Travis-CI support to a Django project, and I ran into a problem: our project doesn’t have a setup.py. Of course I could have added one, but since by convention we don’t package our Django projects (Django applications are a different story) – instead we use virtualenv and pip requirements files – I wanted to see if I could make tox work without changing our project.

Turns out it is quite easy: just add the following three directives to your tox.ini.

In your [tox] section tell tox not to run setup.py:

skipsdist = True

In your [testenv] section make tox install your requirements (see here for more details):

deps = -r{toxinidir}/dev-requirements.txt

Finally, also in your [testenv] section, tell tox how to run your tests:

commands = python manage.py test

Now you can run tox, and your tests should run!

For reference, here is a the complete (albeit minimal) tox.ini file I used:

[tox]
envlist = py27
skipsdist = True

[testenv]
deps = -r{toxinidir}/dev-requirements.txt
setenv =
    PYTHONPATH = {toxinidir}:{toxinidir}
commands = python manage.py test

How GitHub communicates

Zach Holman writes about how GitHub communicates:

here’s a look at most of the communication that happened at GitHub on one random recent day: February 4, 2014

The expected methods are all there: chat (Campfire in their case), email, and – of course – GitHub itself.

One thing that piqued my interest was their internal-only social network “Team” which seems very reminiscent of how Automattic use WordPress & P2. Since I learned how Automattic use P2, I’ve been wondering if we could do something similar at Canonical. Perhaps we could use Google+  for this as we already use it for internal HangoutsUbuntu Developer Summit, and to power Ubuntu On-Air. There are ways to limit Google+ communities to members of your Google Apps domain.

(Side note: I hate having two Google+ accounts!)

I really need to finish coalescing my thoughts and put them into their own post…

The other point I noted was that their use of email was both minimal and individual – Team and GitHub itself are their primary ways of disseminating information.

It always interesting to see how others do achieve similar goals to yourself.

The 30-second review

An interesting “life hack” from Robyn Scott on Medium:

Immediately after every lecture, meeting, or any significant experience, take 30 seconds — no more, no less — to write down the most important points. If you always do just this, said his grandfather, and even if you only do this, with no other revision, you will be okay.

As she says, this is no replacement for note-taking, but I can see it being a useful habit to help you distil what is important or needs action.

Lifestyle business

This post by Hunter Walk is oh-so-quotable:

Venture capital isn’t the only way to fund your business and for many at the earliest stages of their startup, it’s one of the worst choices.

The profitable seventeen person company with an enterprise value of $20 million, 90% owned by its founder? That’s awesome even if you’ll never read about them in TechCrunch.

So RIP calling anything not venture-backed a “lifestyle business.” Go build your business the way you want.