This project contains metadata for working with all the Cytoscape core subprojects, each of which have their own Git repository. Most people won't need to clone this repository. Keep reading below to learn about how to work with Cytoscape's source code.
If you are interested in building Cytoscape apps, you don't need to build Cytoscape from source. You can follow the guide here:
http://wiki.cytoscape.org/Cytoscape_3/AppDeveloper
You need the following tools to build Cytoscape 3:
- JDK 6 or later
- Maven 3.0.x series
- The latest version of maven is 3.1.0, but we have not tested the build system with 3.1 as of 9/11/2013
- Git
- git-flow
- cy - Utility script for Cytoscape developers
- Install JDK, maven, git, and git-flow.
- Download latest version of cy script and unzip it to your local disk.
- cy command is a shell script. You need to change permission to execute it.
- Execute the following command:
cy init
cy -r init
This clones read-only repository from github.
Now you can find a new directory named cytoscape. It should contains the following:
- README.md
- api
- app-developer
- gui-distribution
- headless-distribution
- impl
- parent
- pom.xml
- support
Switching branches is easy with cy script. Simply go to the top level directory and type:
cy switch BRANCH_NAME
where BRANCH_NAME is the name of the branch you want to switch. All Cytoscape sub-projects are following git-flow style branching scheme. Master is used only for releases, and develop is the latest development branch.
From the top directory, type:
mvn -fae clean install
The option -fae is short for "fail at end", which allows the build to continue even if unit tests fail. When Maven
is done, you can find the application in gui-distribution/assembly/target/cytoscape.
Windows implementations of Git and other tools differ slightly from the above.
-
The Windows Git installer creates two application shortcuts: Git Bash and Git GUI. You should use Git Bash for command line operations.
-
When executing the
cy initscript, be user that your current path contains no blanks. Thecyscript's path parser does not understand blanks. -
You can follow the Git SSH instructions to create your SSH key, but when you start the SSH agent, use
eval $(ssh-agent)instead ofeval 'ssh-agent' -s. -
When running
cy init, if you get "flags: FATAL unable to determine getopt version" somewhere in the output, you must be sure to putgetoptin your PATH. The default location forgetoptisC:\Program Files (x86)\GnuWin32\bin.
-
Note that the
cy initscript accepts a path as a parameter. The path specifies where Cytoscape projects should be installed. Omitting the path reverts to the current working directory. -
Be sure you have installed Java JDK, not Java JRE.
-
If you are developing on a virtual machine, be sure to configure around 8GB RAM and 50GB disk.
-
To create a Cytoscape project in Eclipse (once you have run
cy init), select File | Import, and then select Maven | Existing Maven Projects. Browse to the Cytoscape directory created bycy init, and note that all pom.xml files are found. To finish the import, wait for all projects to be created and compiled. This may take several minutes. -
To debug Cytoscape, follow this video: http://opentutorials.cgl.ucsf.edu/index.php/Tutorial:Remote_Execution_for_Debugging. To add all Cytoscape sources, use the Source tab in the Debug Configurations dialog, click the Add button, choose the Java Project container, and select all projects.
-
To edit-compile-run, make your changes in the project you're working in. From Eclipse, you can Run As ... Maven Install. Eclipse will build the .class files automatically, so Maven's job is to create the .jar and promote it to private Maven repository. An unresolved compile issue will show in the Cytoscape console window when you run ... Maven doesn't complain, and Eclipse complains visually. Alternative: in Git Bash, set pwd to project directory (e.g., welcome-impl) and do
mvn clean install. -
Valuable additional information: http://wiki.cytoscape.org/Cytoscape_3/CoreDevelopment