Project scheduling software (scriptable, cross-platform, and open source)
GanttPV Home
Why GanttPV? Help Scripts Server Developer Object Role Modeling
Forum

Source code

The current source for GanttPV Scripts and Server is available via Subversion on the Internet. The subversion repository's address is: svn://pureviolet.net/air/trunk/ (Note the "svn:" prefix. Not "http:". You cannot access the repository by using a web browser.)

Submitting changes

Please feel free to experiment with the scripts and server. If you have changes (or new scripts) that you would like to share, please send them to us. You can contact us with questions or comments at: Brian@PureViolet.net. Once you have some experience making changes you may wish to request developer access to the GanttPV Subversion repository.

Requirements to develop scripts

What do you need to develop scripts?
  • GanttPV, of course
  • A basic knowledge of Python programming.
  • Some familiarity with the organization of data in GanttPV
  • Some knowledge of wxPython (if you wish the script to open a window).

Macintosh users have an advantage in script development. Informative script error messages are written to the Console log. This makes it easier to revise and test script changes.

Windows users: If the script fails due to a syntax or processing error the error message is written to the GanttPV.exe.log file.

Requirements to develop GanttPV Server

To make change and test scripts the following are useful:
  • GanttPV (version 0.5 or later for work with the Server)
  • A basic knowledge of Python programming.
  • Some familiarity with the organization of data in GanttPV
  • Some knowledge of wxPython (if you wish the script to open a window).

Notes on the tools

Python is a powerful scripting language. The best introduction to the language is the Python Tutorial (tut.pdf) that comes with Python. Python documentation is surprisingly good and beautifully formatted. The Python Library Reference (lib.pdf) is especially useful. But the best book to keep in hand is the Python Pocket Reference by Mark Lutz from O'Reilly. (If only their other pocket books were as good.)

wxPython is a Python interface to the wxWidgets GUI development library. The library is near wonderful (if rough around the edges), but the documentation is poor. wxPython is only usable because of an excellent set of demo programs (full of working examples of key features) and an active developers mailing list.

Subversion is gaining popularity as a tool for managing changes to open source software. Learning enough about Subversion to be productive isn't too hard. Start with the documentation provided below. After you have become familiar with these commands you may wish to read Version Control with Subversion which is available on the internet at http://svnbook.red-bean.com/.

Using Subversion

These are the main, one-time start up tasks:

  • Install a Subversion client program. (Brian uses the command line version of Subversion that he compiled from the source. He downloaded it from: subversion.tigris.org.)
  • Install Python. (Only if you will be working with GanttPV Server. The developers are currently Python version 2.7)
  • Contact Brian@PureViolet.net about gaining developer access to GanttPV Scripts.
  • Create a directory to use for development where you will keep your working copy of the GanttPV source. (For example: "cd; mkdir version")
  • Check out a work copy of GanttPV Scripts. (Described below; creates a directory named "Scripts")

The typical work flow goes something like this:

  • Decide what you would like to change about GanttPV Scripts.
  • Discuss the changes to determine how to best approach them. (Either post a message on the GanttPV Forum or contact Brian@PureViolet.net)
  • If the feature you would like to add can be done as a script, try that first. Most new features should be developed as scripts first.
  • Update your working copy to reflect the most current version.
  • Make and test your changes.
  • Send the changes to Brian@PureViolet.net for review.
  • Make sure the changes don't conflict with other updates.
  • Submit the changes to the Subversion repository.

The following are the most essential Subversion commands.

The commands user "anzai" would use to checkout a work copy of GanttPV:

  • cd ~/version
  • svn checkout svn://pureviolet.net/air/trunk/ganttpv ganttpv
  • svn checkout svn://pureviolet.net/air/trunk/scripts Scripts

The commands used to update the work copy to include changes submitted by others:

  • cd ~/version/ganttpv
  • svn update
  • - or -
  • cd ~/version/Scripts
  • svn update

The commands to display the changes that you have made (in diff format):

  • cd ~/version/ganttpv
  • svn diff
  • - or -
  • cd ~/version/Scripts
  • svn diff

The commands used to submit changes when they are ready.

Email Commit - If you don't have developer access to the repository:

  • cd ~/version/Scripts
  • svn diff > source_changes.txt
  • - or -
  • cd ~/version/Scripts
  • svn diff > script_changes.txt

Then compress the file and send it in for review. Be sure to include a brief text that describes the change.

Direct Commit - If you have developer access:

  • cd ~/version/ganttpv
  • svn commit --username anzai -m "Change default font in grid report."
  • - or -
  • cd ~/version/Scripts
  • svn commit --username anzai -m "Assign colors to resource. Set plan bar colors for each row."

Use your user name. The message in quotes should describe the change.