Using GitHub with Eclipse (to update collective.developermanual)

Notes to self how to checkout and update Github projects with Eclipse EGit plug-in.

Delete the project if you have already the same project (collective.developermanual) imported Eclipse some other way.

Create a Github account (if you don’t have one) and put your SSH public key in the account settings.

Configure Eclipse to use your private Github SSH key in Settings -> General -> Network connections -> SSH2. Eclipse also offers a SSH key generation wizard.

Import collective.developermanual from GitHub using File -> Import -> Git and then use Clone button (not Add). collective.developermanual URL is git@github.com:collective/collective.developermanual.git Change protocol to SSH.

Click next next next until you see the project in your Eclipse workspace. Note that EGit puts projects to your home folder, not workspace (slight argh in this point).

Edit some files.

Right click the project to commit.

Then you can right-click to push. This is the tricky part. The dialogue looks like a USS Aircraft Carrier deck control panel. What you need to do is to

  • In Source ref drop down choose master [branch]
  • In Destination ref drop down choose master [branch]
  • Press Add spec button
  • Press Next
  • Press Finish

Then it pops up some dialogs which mean that the push was succesful.  Just keep clicking Ok to every window as you won’t understand them in any case.

 

 

\"\" Subscribe to RSS feed Follow me on Twitter Follow me on Facebook Follow me Google+

Testing mobile websites with Firefox Mobile for PC (Fennec desktop)

Firefox Mobile (Fennec) has also desktop builds. They are very useful for mobile web site testing as the browser is fast, has real keyboard and is only one mouse click away.

Here are instructions how to run Firefox Mobile on Ubuntu Linux (tested on 32-bit Ubuntu 10.10)

wget http://releases.mozilla.org/pub/mozilla.org/mobile/releases/latest/linux-i686/fennec-5.0.en-US.linux-i686.tar.bz2
tar -xjf fennec-5.0.en-US.linux-i686.tar.bz2
cd fennec
./fennec

.. and thats all you need. It works out of the box! 400x times faster than using Android emulator browser.

There are also OSX and Windows builds available.

\"\" Subscribe to RSS feed Follow me on Twitter Follow me on Facebook Follow me Google+

Generic Python validation frameworks?

All Python ORM and form frameworks love to define own field/schema model. This seems to lead to a situation where they define their own validation functions too.

Some examples:

Isn’t writing one’s own validation code a bit redundant and exactly “reinventing the wheel” what open source principles so hard try to avoid? Could validation be a low hanging fruit to share among fellow Python projects? As I see it, for the simple data validation, like email and URL, the core code could be easily shared and different Python projects. You basically want just method is_valid_phonenumber(str) and then framework specific way to raise the error to the user.

Do such frameworks already exist? At least I haven’t seen one being used in any big Python project yet 🙁

… or is validation so complex thing, so that validation functions must be tightly integrated with the parent framework and I am missing some big things (like locales, etc.) here?

 

\"\" Subscribe to RSS feed Follow me on Twitter Follow me on Facebook Follow me Google+