PTools: an opensource molecular docking library
- bazaar (also called bzr) is a Distributed Version Control Systems (DVCS) that allows to share and improve PTools code.
- bazaar is more powerful and easy to use than subversion. The latter will not be used any more in the PTools project.
- launchpad is a code repository sponsored by Canonical, the company that releases the Linux distribution Ubuntu. Launchpad supports the DVCS bazaar (since launchpad developers also coded bazaar).
- launchpad access if free of charge providing the software is opensource.
- PTools main branch is now on launchpad.
- sourceforge is an other code repository. Ptools code will not be hosted here but PTools website, files, screenshot and wiki (as this one) will be there since launchpad does not provide such services. So, as a reminder:
- launchpad: code of PTools main branch
- sourceforge: webpage, files (tutorial and source code), screenshot (nice pictures required) and the wiki (this page).
Setup for a first time with bazaar @ launchpad
- Install bazaar. For a debian/ubuntu Linux distribution, the command is:
aptitude -y install bzr
- First connection to launchpad
- Create an account on launchpad https://launchpad.net/+login
- Register your ssh public key in launchpad
- If not done already, create a public key
ssh-keygen -t rsa -C "my public key"
- Print your public key with cat ~/.ssh/id_rsa.pub . You should have something similar to this:
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAoWqhn/67inz//RN4Po5jkG5wfg4SUuXY/B/odneuob /bXq7an8EjPU+4UdpyvzywngX/E2QBC3qjWBS+OLldikH3gR/c3jl8v/oObsiHeY2yo4gzm6nQzp90 /z6LjyrunKiU1pnk2k4+4Fa3r9m3pg7yPClW0cx+KaYmgaPudHyuQ9ffLIbsxmnnjtKuIbDYxPdPvB ikyRBKasGoCS7Yob28QImzCsjLaIFwpqHO6lXfQgfFEShoqiSJE67DI494Y49cFdhQ== my public key
- Register (copy) this key into your launchpad page https://launchpad.net/~your_login/+editsshkeys
- Identification within launchpad https://wiki.kubuntu.org/Bzr
bzr launchpad-login your_launchpad_login
- Define your full name and mail address
bzr whoami "Your real name <email@example.com>"
If you use several computers, be sure to define the same real name and mail address with whoami.
Everyday life of PTools developpemnt
- Download the main branch (trunk) of PTools from launchpad in your local directory, do it only once
bzr branch lp:ptools my_dir
The my_dir directory is then created and contains all PTools files.
- Do your own modifications / improvements of the code. Correct bugs, improve code as much as you can. Do not forget that
- brz add toto will add the file toto to the version system.
- brz remove --force toto will delete the file toto both on the disk and in the version system.
- brz remove --keep toto will keep the file toto on the disk but remove it from the version system.
- Commit (locally) your modifications
bzr commit -m "a message explaining what you did"
If you fixed a bug, please precise the bug number XXXXXX you can found at https://bugs.launchpad.net/ptools
bzr commit --fixes=lp:XXXXXX -m "a message explaining what you did"
- Send your modifications to your own branch on launchpad
bzr push lp:~login/ptools/branch_name
- ~login is your login on launchpad
- /ptools/ is the name of the project your are working for (PTools ?)
- branch_name is the name of your branch. You can create as many branches as you want. Usually, one branch corrects one bug or adds one new functionality.
- If you believe your really improved PTools, propose your branch to be merged with the PTools main branch
Do so, go to your branch webpage on launchpad: https://code.launchpad.net/~login/ptools/branch_name. Your improvements will be reviewed by the PTools dev team (so far composed of Pierre and Adrien) and will be accepted in the main branch if everything is OK.
- Get the latest version of the PTools main branch from lauchpad in your local branch. Beware, it can rise conflicts.
Good practices to work with bazaar
Downloading the full tree of the PTools project for each of your branch (bzr branch lp:ptools my_dir) could take some time. To speed up the process, you could (should) work with "shared repositories". The overall process is the following.
- Initialize a bazaar repository
mkdir ptools.lp bzr init-repo ptools.lp cd ptools.lp
- Download PTools main branch (trunk)
bzr branch lp:ptools trunk
- Create as many branches as you want
bzr branch trunk fix_this bzr branch trunk fix_that bzr branch trunk new_cool_feature
Your new branches are created from your local version of PTools main branch (trunk).
- Finally, modify, commit and push your branches to the lauchpad server.
- Before created a new branch, update the PTools main branch (trunk) with the command
in your trunk directory.
- If you already had created a branch but you want to update it with the latest main branch (trunk) version, do
bzr merge lp:ptools
in your branch directory.
Consult the User's Guide for information on using the wiki software.