Hacking on Mnemosyne

We use Launchpad to coordinate the development. It's good to first take the tour of Launchpad (on its front page) to get a feel for how this works.

When you've picked a project you want to work on, post a message on the developer mailing list. Next, install the bazaar version control tool, get familiar with it, and create your own local copy of the Mnemosyne code by typing:
bzr branch lp:mnemosyne-proj
This will check out the main line of development. You will only need to do this once. (It's best not do this from your home directory, but using a subdirectory, otherwise you'll mislead a feature making it easier to run Mnemosyne from an USB key.) For an overview of the different other branches, see our Launchpad code page.

Then, start hacking on the code to your heart's content, occasionally saving your progress by doing a bzr commit.

If you want to pull in the updates other developers make, the command to use is bzr pull.

It is important to also publish your changes to the world, so that you can get feedback on your work. To do this, sign up for an account on Launchpad, register your SSH key there, and type
bzr push bzr+ssh://john.doe@bazaar.launchpad.net/~john.doe/mnemosyne-proj/mybranchname
replacing john.doe with your own Launchpad username, and mybranchname with the name of the branch you are working on. To keep your published version up to date, you can at later times suffice with the shorter version
bzr push

It is also important to periodically pull in the changes that the other developers make on the trunk (use bzr merge lp:mnemosyne-proj), so that it becomes easier to merge your work later.

Once you think your work is ready for merging into the mainline, a developer will review your code, and if it's approved it will be merged.

To get an overview of how all the different bits of the library fit together, see the documentation in the code at mnemosyne/mnemosyne/libmnemosyne/docs/build/html/index.html

In order to keep the code looking uniform, please following the standard Python style guides PEP8 and PEP257.

To start working on Mnemosyne, you need the following software: easyinstall, virtualenv, APSW, Qt4.4 or later, PyQt4.4 or later, matplotlib, cherrypy 3.2 or later, sphinx, webob including their dependencies. All of these can be located by a simple Google search. (On Ubuntu, you also need to install the following development packages: python-cherrypy3 python-apsw python-setuptools python-virtualenv python-qt4-dev python-sip python-sip-dev pyqt4-dev-tools qt4-designer libqt4-sql python-qt4-sql libqt4-sql-sqlite python-matplotlib python-qt4-phonon python-sphinx python-webob). Mnemosyne uses Python 2.x, not 3.x

The top level makefile contains some machinery to make it easier to test Mnemosyne while keeping your current install intact. The first time, type make setup to set up a virtual environment in which to install Mnemosyne. After that, typing make will generate the needed auxiliary files, install Mnemosyne into the virtual environment, and start it using a separate datadir.

A separate page with more info to set up a development environment under Windows can be found here.