sul-dlss-deprecated / ld4p-tracer-bullets

A place to keep functional specs and documents for Stanford's ld4p tracer bullets
Other
0 stars 1 forks source link

Build Status Coverage Status Stories in Ready

LD4P Tracer Bullets

Background

https://consul.stanford.edu/display/LD4P/Linked+Data+for+Production

Code repository to create software that will reify the goals of the initial LD4P Tracer Bullet pathways:

Pathway 1:

Pathway 2:

Technical Implementation

Shell scripts and generation of MARC records to be converted

All files are moved to the Archive/.. folder for future reference.

Executing the pipeline scripts

The scripts that create the MARC files for conversion are located in the sul-dlss/ld4p-tracer-bullet-scripts repository. The instructions in that repository can be followed to run those scripts.

LD4L projects with similar goals

The initial LD4L project created some tools that could be useful in this project:

Development

Dependencies

The Oracle JDBC maven artifacts require a license, follow the instructions at:

Once the Oracle sign-up/sign-in and licence agreement is accepted, add the sign-in credentials to maven settings. Follow maven instructions to encrypt the passwords, see

Compiling and Executing Conversions

There are convenient wrapper scripts available from the sul-dlss/ld4p-tracer-bullet-scripts project. To use those scripts, the artifacts of this project need to be downloaded or built from source. To build this project, the Apache Maven build tools must be available.

To build and package the maven project (assuming maven is installed already):

git clone https://github.com/sul-dlss/ld4p-tracer-bullets.git
cd ld4p-tracer-bullets
mvn package

The packaged JAR includes all dependencies, so it should work outside of this project. The packaged JAR can be copied to a convenient location and used on the CLASSPATH or the command line, e.g.

$ cp conversiontracerbullet/target/conversion-tracer-bullet-jar-with-dependencies.jar ~/lib/ld4p_conversion.jar
$ LD4P_JAR=~/lib/ld4p_conversion.jar
$ java -cp ${LD4P_JAR} org.stanford.MarcToXML -h
usage: org.stanford.MarcToXML
 -h,--help               help message
 -i,--inputFile <arg>    MARC input file (binary .mrc file expected;
                         required)
 -l,--logFile <arg>      Log file output (default: log/MarcToXML.log)
 -o,--outputPath <arg>   MARC XML output path (default:
                         ENV["LD4P_MARCXML"])
 -r,--replace            Replace existing XML files (default: false)

Code Coverage Reports

To run the tests and view a coverage report from the command line:

mvn clean cobertura:cobertura
ls -l target/site/cobertura/
firefox target/site/cobertura/index.html

The Travis CI builds run tests and submit a coverage report to Coveralls. To update Coveralls from the command line, try:

mvn clean test cobertura:cobertura coveralls:report -DrepoToken=yourcoverallsprojectrepositorytoken