ChimeraX uses git for source code management.
Here are a minimal set of commands to get started using git:
Git associates a user name and email address with all check-ins. The defaults are based on your
USERNAMEand your computer’s hostname. The email address is usually wrong. To explicitly set those values:git config --global user.name "Your Name" git config --global user.email email@example.com
Make local copy of repository (currently we only use the develop branch):git clone --depth 1 --single-branch --branch develop plato.cgl.ucsf.edu:/usr/local/projects/chimerax/git/chimerax.git
To update repository to latest version:git pull
Add current state of file to the repository:git add "filename(s)"
Commit all changes to repository (added files and changes to those added files):git commit -a
Copy local repository changes to master repository:git push
Diff from previous to current revision of file (ignores additions):git whatchanged -n 1 -p <file>
Diff to previous commit of file:git diff HEAD^ <file>
ChimeraX uses Python 3.
Python code should follow the Python Style Guide: PEP 8.
From <http://wiki.python.org/moin/Vim>: All python files should have the following modeline at the top:
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4:
But modelines are a security risk, so put:
au FileType python setlocal tabstop=8 expandtab shiftwidth=4 softtabstop=4
in your .vimrc as well.