Labs/Ubiquity/Ubiquity 0.1 Development Tutorial: Difference between revisions

From MozillaWiki
< Labs‎ | Ubiquity
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
If you just want to write new commands for Ubiquity, you should read [https://wiki.mozilla.org/Labs/Ubiquity/Ubiquity_0.1_Author_Tutorial the Command Author Tutorial] instead.  This page is about how to do development on the Ubiquity core.
If you just want to write new commands for Ubiquity, you should read [https://wiki.mozilla.org/Labs/Ubiquity/Ubiquity_0.1_Author_Tutorial the Command Author Tutorial] instead.  This page is about how to do development on the Ubiquity core.
= Getting Set Up =


== Getting the Source ==
== Getting the Source ==
To get the source code for Ubiquity and develop for it, you'll first have to install [http://www.selenic.com/mercurial/wiki/ Mercurial] and [http://python.org/ Python] if they're not already on your system.  Then, from the command line, enter:
  hg clone http://hg.toolness.com/ubiquity-firefox
Now enter the newly-created <code>ubiquity-firefox</code> directory and read the <code>README</code> file contained in it for further instructions (an online version can be found [http://hg.toolness.com/ubiquity-firefox/raw-file/tip/README here]).
== Getting Involved ==


It is pretty easy to get involved with the development of Ubiquity. Start off by introducing yourself on the irc channel #ubiquity on [[irc.mozilla.org]].
It is pretty easy to get involved with the development of Ubiquity. Start off by introducing yourself on the irc channel #ubiquity on [[irc.mozilla.org]].
Line 20: Line 14:


   hg clone http://hg.toolness.com/ubiquity-firefox
   hg clone http://hg.toolness.com/ubiquity-firefox
== Installing the Source Version of the Extension ==


Uninstall your current version of Ubiquity from your Firefox Addons and then run:
Uninstall your current version of Ubiquity from your Firefox Addons and then run:
Line 25: Line 21:
   python manage.py install
   python manage.py install


This will generate a new build of the Ubiquity extension from the source checkout and install it with your local Firefox instance. Now you are all set to become a pro Ubiquity hacker!
This will generate a new build of the Ubiquity extension from the source checkout and install it with your local Firefox instance.
 
If you have a separate profile that you'd prefer to install the
extension under, such as 'testing', you can add that as an optional
parameter:
 
  python manage.py install testing
 
Now you are all set to become a pro Ubiquity hacker!
 
= Development =
== Digging Into the Code ==


The heart of the code can be found in the subdirectory:
The heart of the code can be found in the subdirectory:


   ubiquity/chrome/content/
   ubiquity/chrome/content/
We use this Wiki [http://wiki.mozilla.org/index.php?Ubiquity] and Getsatisfaction [http://getsatisfaction.com/mozilla/products/mozilla_ubiquity] as places to get feature requests and bug reports. These feed into an internal Trac-based ticketing system [http://labs.toolness.com/trac/report/1].
Login to the Trac [http://labs.toolness.com/trac/report/1] using an OpenID account. Check out what needs to be done, add things appropriately, choose unassigned tickets and start hacking!


Make sure you run the test suite before committing your changes:
Make sure you run the test suite before committing your changes:


     python manage.py test
     python manage.py test


Note: There is no need for you to keep on rebuilding your Extension after the first time. The changes to the manage.py built Extension are updated whenever you save updates to the source files and restart Firefox.
Note: There is no need for you to keep on rebuilding your Extension after the first time. The changes to the manage.py built Extension are updated whenever you save updates to the source files and restart Firefox.


Welcome to Ubiquity.


== Keeping Up to Date ==
== Keeping Up to Date ==
Line 51: Line 54:


You can also view the latest changes to the central repository on the web at [http://hg.toolness.com/ubiquity-firefox/ hg.toolness.com].
You can also view the latest changes to the central repository on the web at [http://hg.toolness.com/ubiquity-firefox/ hg.toolness.com].
== Finding Something to Work On ==
We use this Wiki [http://wiki.mozilla.org/index.php?Ubiquity] and Getsatisfaction [http://getsatisfaction.com/mozilla/products/mozilla_ubiquity] as places to get feature requests and bug reports. These feed into an internal Trac-based ticketing system [http://labs.toolness.com/trac/report/1].
Login to the Trac [http://labs.toolness.com/trac/report/1] using an OpenID account. Check out what needs to be done, add things appropriately, choose unassigned tickets and start hacking!


== Submitting Patches ==
== Submitting Patches ==

Revision as of 23:26, 29 August 2008

If you just want to write new commands for Ubiquity, you should read the Command Author Tutorial instead. This page is about how to do development on the Ubiquity core.

Getting Set Up

Getting the Source

It is pretty easy to get involved with the development of Ubiquity. Start off by introducing yourself on the irc channel #ubiquity on irc.mozilla.org.

We use Mercurial [1] for version control. It is very easy to install if you've got Python 2.5 with setuptools. Just type:

 easy_install Mercurial

Once installed, you will be able to checkout the current source using the command:

 hg clone http://hg.toolness.com/ubiquity-firefox

Installing the Source Version of the Extension

Uninstall your current version of Ubiquity from your Firefox Addons and then run:

 python manage.py install

This will generate a new build of the Ubiquity extension from the source checkout and install it with your local Firefox instance.

If you have a separate profile that you'd prefer to install the extension under, such as 'testing', you can add that as an optional parameter:

 python manage.py install testing

Now you are all set to become a pro Ubiquity hacker!

Development

Digging Into the Code

The heart of the code can be found in the subdirectory:

  ubiquity/chrome/content/

Make sure you run the test suite before committing your changes:

   python manage.py test


Note: There is no need for you to keep on rebuilding your Extension after the first time. The changes to the manage.py built Extension are updated whenever you save updates to the source files and restart Firefox.


Keeping Up to Date

I recommend that you frequently update your repository to get the latest changes from the central repository. In case you're not familiar with using Mercurial, pulling the code is a two-step process:

hg pull
hg update

You can also view the latest changes to the central repository on the web at hg.toolness.com.

Finding Something to Work On

We use this Wiki [2] and Getsatisfaction [3] as places to get feature requests and bug reports. These feed into an internal Trac-based ticketing system [4].

Login to the Trac [5] using an OpenID account. Check out what needs to be done, add things appropriately, choose unassigned tickets and start hacking!


Submitting Patches