wiki:DeveloperGuide

Peregrine for Developers

This article explains how to set up Peregrine development environment.

Prerequisites

Peregrine is developed in Java. We use Maven to build the project. The project needs at least Java version 7 and Maven 3. Java and Maven can be found here:

Checking out and building the project

  • Register at NBIC Trac and submit registration information to Peregrine administrators using the project admin mailing list.
  • Once you get access, you can get the latest development code
 svn checkout --username yourdevelopername https://trac.nbic.nl/svn/data-mining/trunk peregrine
  • Now you should have a directory peregrine with four directories in it:
Directory Description
3rd-party Contains projects for 3rd party code that has not been published as maven artifacts on Maven central
acceptance-test Contains a project for the acceptance tests for a new Peregrine release
data-mining Contains the main project
reference-test Contains a project for the tests used to establish a base line for the performance of the original peregrine code
  • First you need to build the artifacts in the 3rd-party directory (currently only LVG). From each directory within the 3rd-party directory run the following command:
mvn install
  • After that you should be able to build the main project. From within the data-mining directory run the following command:
mvn install

NOTE

To run the acceptance-test or the reference-test you need to have access to the test data-sets, which contain non-public data. The DTL Jenkins CI server is setup to run these projects, it is not necessary to run them yourself.

Loading the project in your IDE

Netbeans

Netbeans natively supports Maven projects. You can open your project normally within Netbeans.

Eclipse

  • Go to your data-mining project directory and execute mvn eclipse:eclipse to download all necessary artefact's.
  • Now you can load the project into Eclipse
    • Define a classpath variable M2_REPO in Eclipse, which should point to your local maven repository (<homepath>\.m2\repository).
    • Switch your Eclipse to "Working Sets" top-level elements and create new working set Peregrine.
    • Go to File -> Import and select General -> Existing projects into workspace, press Next and import all projects into Peregrine workspace.

Running the acceptance tests

To run the Peregrine acceptance tests you will need to have access to the test files. Unfortunately these files do not have a license that allows us to publish them. If you have a UMLS license you can request the UMLS Homologene ontology by sending an e-mail to David van Enckevort.

Useful pointers

  • Spring framework is used to manage the project. Please refer to the Spring documents for more details.
  • Making sense of logs: Configuring the tomcat logs to make stack traces more readable]

Switching SVN credentials

It might happen, that you would like to change authentication information for SVN access. Subclipse running over SVNKit stores authentication information in configuration\org.eclipse.core.runtime\.keyring (see here and here for more information).

Code formatting agreement

The code of Peregrine follows well-defined standards. Please use the SUN Java code formatting rules. Formatting of source code is obligatory, if you don't follow it, you will be asked to re-commit with code appropriately formatted. You can check adherence to these rules by running the checkstyle target:

mvn checkstyle:checkstyle

This will create an XML file in the target directory listing all the issues. This check is also run on the CI server and you can see detailed reports there.

LVG2013 normalizer

Peregrine uses lvg2013 library for normalization of words. It has to be downloaded separately from http://lexsrv3.nlm.nih.gov/LexSysGroup/Projects/lvg/2013/.

You need to unpack lvg2006lite.tgz and set the correct value for "LVG_DIR" in lvg2013lite/data/config/lvg.properties.

To let Peregrine know the location of LVG normalizer, you then need to set "normalizer.lvg.properties=/path/to/lvg2013lite/data/config/lvg.properties". Refer to normalizer.context.xml.

We are in the process to make setup LVG by itself.

Last modified 5 years ago Last modified on Jun 26, 2015, 4:20:15 PM

Attachments (1)

Download all attachments as: .zip