[three]Bean
Are my Fedora packages handled by Upstream Release Monitoring?
May 02, 2012 | categories: python, fedora View CommentsI just recently started packaging up a bunch of stuff for Fedora 17 and have had to learn the ins-and-outs of package review. The final step in the how-to-get-your-package-into-Fedora story is to enable upstream release monitoring for your package.
I'd forgotten to do this a few times. Oop! So I wrote the following little script to ask pkgdb for all my packages, compare them against the list of monitored packages, and print the result. Maybe you'll find it useful:
#!/usr/bin/env python """ List the Fedora packages I own by their status in Upstream Release Monitoring. Requires python-fedora:: $ sudo yum install python-fedora """ import fedora.client import requests from kitchen.text.converters import to_unicode import os URL = "http://fedoraproject.org/wiki/Upstream_release_monitoring" symbols = { False: ' - ', True: ' + ', } if __name__ == '__main__': pkgdb = fedora.client.PackageDB() username = os.environ.get("BODHI_USER") print "* Packages for FAS user %r" % username pkgs = pkgdb.user_packages(username).pkgs # Bypass varnish cache -> http://bit.ly/XF4YBy headers = {'Cookie': 'this-is-not-a-cookie'} page = requests.get(URL, headers=headers).text for pkg in pkgs: print symbols[pkg.name in page], pkg.name
Teaching Open Source, Web-Based, Game Programming at RIT
Mar 06, 2012 | categories: python, teachingopensource, openshift, turbogears View CommentsThis last quarter at RIT I taught (for the first time) a course on open source, web-based, game programming. The quarter just came to an end and I really want to brag on my students. But before I do that, here's a glimmer of what we covered:
- How to use bash and vim
- How to use git and github
- How to submit patches to projects you know nothing about
- What makes a good, casual game
- How to make games with HTML5
- How to program in JavaScript, CoffeeScript, and Python
- Serverside programming with Turbogears2
- How to get your code running on Red Hat's Openshift cloud.
- How to give a lightning talk(!)
Really cool stuff was built into the class; it was about making open source software, so we open sourced the syllabus! Really cool stuff happened along the way; we hit ugly problems with openshift, so we patched the quickstarter script!
You can endure my self-indulgent drivel yes, but you get the best picture from reading the students' blog posts themselves. Enough of this! Les projets de cours!
#1 - Lazorz teamed up with the Boston Museum of Science to make "[An] educational game about the physics of light. In it's current incarnation it helps demonstrate the concepts of reflection and color filtering. The development team has plans to include other concepts such as refraction and prisms in future releases."
They got a nasty front-end built, by hand, with javascript and HTML5 that works on every mobile device we could test it on. It is intuitive and fun. They have almost-working Facebook auth and they have an almost-working Turbogears2 backed JSON store. (really, this close to completion!)
#2 - Gold Rush is visually and game-ly amazing. If I had to pick which of the three project was going to make one million dollars, it'd be this one.
The front-end is built in Unity (closed source, but compiles to a ton of platforms) and the back-end JSON store is built in TurboGears2. These guys completely flew through development, mastering skills they'd never heard of in a day. Its 3D with a moving camera and an incredibly fun game. The original game idea belongs to team member Eric Heaney. It's fun to play as a normal old card game (I've played it at a number of parties since he pitched it to the class).
#3 -- WebBotWar (the python web robot fighting game) wins the prize for master hack. They:
- Forked pybotwar, ripped it's UI off and made it export JSON.
- Reimplemented the front-end with jCanvas (and cooked up all their own art assets!).
- Wrote a TurboGears2 app that spins up serverside instances of their pybotwar fork.
- Those instances dump their state into mongodb (or memcached, long story).
- Their javascript client polls the TG2 app for the game state and voilà.
They have (awesome) plans to:
- Allow you to upload your own scripts (they have it working, just not secured).
- Make a built-in script editor.
- Tighter facebook integration (challenge your friends!)
BTW, it works on android and iPad. It even works on Epiphany (wat?) They also want you to know that python box2d is a pain in the ass.
Scheduling meetings for the Fedora Messaging SIG
Mar 05, 2012 | categories: zeromq, fedmsg, fedora, moksha View CommentsSo I'm spinning up the Fedora Messaging SIG. It's been sitting idle for years; this time we're really going to do it. We're going to put 0mq messaging hooks into bodhi, koji, pkgdb, fas, you name it.
I'm building a python module called fedmsg to wrap it all and it comes with a proposal-in-development. And if you're not excited yet, we've already 0mq enabled the Moksha Hub and achieved a ~100 times speedup over AMQP/qpid.
The point of this post is to ask about times for an IRC meeting of the Messaging SIG. Right now I'm thinking Tuesdays at 16:00-17:00 UTC in #fedora-meeting. If you're interested in helping with the effort but that's a bad time for you, let me know and we'll work it out.
I'll be out at PyCon until next Wednesday; so the first meeting won't be until March 20th at the earliest.
ToscaWidgets2 Bugsprint Report
Mar 04, 2012 | categories: python, toscawidgets, pyramid, turbogears View CommentsHere's the rundown of the pre-PyCon tw2 bugsprint. The unstoppable Greg Jurman and I coordinated in google+ and IRC (with lots of ad-hoc visitors in both) and did all the damage we could do to the bug list. Our goal was to close enough that we could justify a solid 2.0 non-beta release but we didn't quite get there. We settled on 2.0 release candidate 1.
tl;dr - Big progress. We'll seal the deal on 2.0 at PyCon US next week.
Infrastructure:
- tw2 sourcecode is spread out in repos all over the place. We centralized everything at http://github.com/toscawidgets.
- We're using git-flow to manage team development and releases.
- We setup a http://cia.vc bot in #toscawidgets/IRC, which is awesome.
- We're in the continuous integration queue with Shining Panda.
Tickets closed:
- Duplicated TW Encoders
- Graceful degradation when JS disabled for tw2.dynforms
- HTML5 Prompt Text
- Configurable 'location' for resources
- Disable resource injection on a per-resource basis
- Document middleware configuration values
- Handling SCRIPT_NAME
- Internationalization
- Inline templates
- Refactor resources for better compatibility with tw0.9
- Automatic 'modname' for resources
- Shortcuts for controller registration / Tidy up tutorial
Tickets worked on, but not complete:
Tickets created:
Listing all my tw2 github repositories
Mar 03, 2012 | categories: python, toscawidgets, github View CommentsJust starting out on the tw2 bugsprint this morning. I'm working on adding CompoundValidator support and Greg Jurman is working on resolving the duplicate JS encoders. That later one is a real pain. There are tons of widget libraries out that that use one set of JS objects, and plenty that use the others. To find out what uses what (so we can refactor with less pain) I had to ping my github account to find out the full list of tw2 libraries I've written.
Here it is! Using github2 to get a list of every repo (so I can clone and $ grep -nr JSFuncCall tw2.*):
#!/usr/bin/env python import github2.client ghc = github2.client.Github() # This was the trick. I have too many repos! all_repos, page = [], 0 while True: new_repos = ghc.repos.list('ralphbean', page) if not new_repos: break all_repos.extend(new_repos) page += 1 for repo in all_repos: if 'tw2' in repo.name: print repo.name
« Previous Page -- Next Page »