Monday, February 6, 2012

Yolk development

I released 0.4.3 last night because 0.4.2 was missing some documentation and license files. I may release a 0.4.4 this week. This release will contain some user-submitted patches.

Today in yolk development:
  • Tox for testing yolk with Python 2.6, 2.7 and 3.2.
  • py.test for unit tests
  • Jenkins for continuous integration (using Tox and py.test)
  • git-flow for managing it all
I'm still configuring Jenkins to do everything I want, but it's been working great with Tox + py.test, so far. [Edit: Jenkins is up at http://cakebread.info/jenkins]

The current code base will become 1.0 soon. This branch will support Python <=2.5 and may or may not get new features from the upcoming 2.0 branch.

The 2.0 branch (origin/develop on github) will work with both Python 2 and Python 3.

Sunday, February 5, 2012

I've released yolk 0.4.2!



yolk 0.4.2 is a bug fix release in preparation for supporting both Python 2 and 3.  Yes, it's time to get yolk off of the Python3 Wall of Shame.


I'm using gitflow to manage yolk's release and it is working great, so far.

Two bug fixes:
  •  --entry-map patch from Jesus Rivero (Neurogeek)
  • Fix for -C if you don't supply an integer
I've also switched to the BSD license from the GPL-2.

I'm working my way through some old bug reports and should have 0.4.3 out shortly.

The 'develop' branch on github is going to be used for the Python2/3 version.

Tuesday, January 17, 2012

twerp - Command-line tool for Twilio hackers

I released twerp 0.0.4 today. Here's what you can do with twerp from the command-line today:


  •  Send and receive SMS text messages
  • Make voice calls and conference calls
  • List all calls in progress, ringing or queued
  • Enter interactive mode after initiating call and controlling call flow live
  • Tail your Twilio API error log from the command-line!
  • List all your Twilio phone numbers and detailed info about each
  • Show log entries for given SID
I'm going to make a screencast showing how to use twerp to start a phone call, go into interactive mode and control the flow of the call by issuing commands. 

Here's an example:

twerp --dial +12135551212 --say "Hi, this is twerp calling. How are you?" --interactive
 twerp (CA3j...043) >> forward +18005551212
twerp (CA3j...043) >> url http://server.com/some_twiml.xml
twerp (...)  >> list
Ringing: CAaaec865YADAYADA68c4a864ec
twerp (CA209...9ec) >> hangup
Call hung up.

There's not much point in making a TODO now, because twerp has barely covered a fraction of the Twilio API. That said, it's already very useful for hacking on Twilio, understanding how call flow works with TwiML, checking your Twilio logs etc.


In the near future:


  • Put your TwiML in ~/.twerp/twiml/ and you can execute it without uploading it to a server (it simply uses the Twimlet for echoing TwiML).
  • Easier conference calling with interactive control from the command-line or via touchpad
  • Distribute-based plugin system using entry points so you can make your own command-line applications based on twerp, installable with pip.

Friday, January 6, 2012

Guided by Tones - a Guided by Voices Useless Invention

Guided by Tones is a little project I made to celebrate the release of the new Guided by Voices album with the original line-up.

Some of the sound clips are from Robert Pollard's "Relaxation of the Asshole" album.

+1 877-860-0GBV or +1 877-860-0428


Thursday, January 5, 2012

twerp a Twilio command-line client for 2012

twerp is my Twilio command-line client written in Python. I'm releasing it early, but have a ton of features in the works. This is my Twilio hacker DOer tool for 2012, so I may be entering it in their contest. Or, as I guess they'd say, I'm drawing fucking owls!

Current features in 0.0.1:
  • Send and receive SMS text messages on the command line
  • List your Twilio phone numbers with details about each (ACCOUNT_SID, various URLs etc.)
  • Check your logs by message ID to see if it sent successfully
Feature plans in the works:

  • Initiate calls from the command line and directing them to TWIML (due later today!)
  • Full featured text messaging GUI using urwid curses library on the command line
  • Generate TWIML on the command-line and launch a Flask app for quick testing and prototyping
  • Python Distribute based plugin system so you can extend twerp with separate Python pacakges

Thursday, December 1, 2011

Moving yolk to github

Today I moved yolk to github. I've committed a few long overdue patches and hope to make a quick 0.4.2 release soon.

History


In 2006 I added a setuptools ebuild to Gentoo Linux. This amazing new tool allowed us to install Python packages and their dependencies right from the Python Package Index. And make a mess of your system if you use easy_install instead of your distribution's package manager to install Python pacakges. But I had a plan.

As a Gentoo developer and Python package maintainer, I'm responsible for watching bugzilla for Python package bugs. I wanted to add this amazing new tool to Gentoo as an official ebuild, but I had a feeling it may be used by people who didn't want to write an ebuild or wait for a 'version bump' of a package.

Trying to determine which Python packages were installed via a Linux distribution's package manager and which were installed with easy_install became an early goal of yolk. I learned about entry points from reading nose's source and made yolk plugin-based. The first plugin showed which packages were installed via Gentoo's portage system and which were installed via setuptool's easy_install.

After adding basic functions like showing you which Python packages were installed locally, I added XML-RPC support to query the Python Package Index at pypi.python.org. This let me check if newer versions of packages were available. I was also able to start another project, g-pypi, a tool for creating ebuilds from any Python package in the Python Package Index. This worked great and g-pypi later became a Google Summer of Code project.


I learned a lot from writing yolk. It was one of my first Test Driven Design projects in Python and I really enjoyed learning to code with that technique. I have no doubt the relatively small number of bugs discovered after the earlier releases was due to using TDD.

Now


I've moved yolk to github, grab a fork and dig in.

Future


I'm going to be thinking in terms of how to make yolk more useful with virtualenv. For instance, virtualenv's 'lssitepackages' is like 'yolk -l', but only for that specific virtualenv. I may try to make yolk more virtualenv-aware so you can see which packages in a specific virtualenv have upgrades available, for instance. There's a few things I'd have done differently. All of the lower case commands in yolk query your local Python packages on your system. All of the upper case commands query The Python Package Index. This should have been two separate libraries and a command-line tool. The name 'yolk' doesn't make a lot of sense these days with all the non-egg things yolk does and the decline of the egg package format.