Skip to content

Repository files navigation

UniProt Store

UniProt Store is a Java 17 multi-module Maven project for building and using UniProt search indexes, Solr collection configuration, Spark indexing jobs, and Voldemort-backed data-store clients.

Modules

Module Purpose
index-config Assembles Solr collection configuration artifacts.
uniprot-config Search-field and return-field configuration JSON and schema support.
uniprot-search Shared search model, field mapping, and Solr-related search utilities.
common-job Shared Spring Batch job infrastructure used by indexer jobs.
indexer Spring Boot/Spring Batch indexer for Solr-backed UniProt collections.
spark-indexer Apache Spark jobs for building, validating, and writing index documents.
uniprot-datastore Voldemort data-store clients, builders, validators, and related utilities.
integration-test Integration test support and resources.
jacoco-aggregate-report Aggregates JaCoCo coverage across modules.

Requirements

  • JDK 17
  • Maven 3.8+
  • Access to UniProt Maven Artifactory repositories for private dependencies
  • Brotli installed locally when running the same full build path as CI
  • Solr 8.11.x for local indexing/search workflows
  • Apache Spark 3.3.x for spark-indexer jobs

The root pom.xml declares the UniProt Artifactory repositories used by the build. If your environment requires credentials, configure them in your Maven settings.xml using the repository ids from pom.xml, such as:

  • uniprot-artifactory-release
  • uniprot-artifactory-snapshots
  • uniprot-artifactory-private-thirdparty

Build

Build all modules and run tests:

mvn clean install

Build without tests:

mvn clean install -DskipTests

Build a single module and the modules it depends on:

mvn -pl indexer -am clean install

Run the CodeQL-style package build used by GitHub Actions:

mvn -B -T 1C package -DskipTests

The build runs Spotless formatting during compile. To disable that behavior for a local build, use the no-spotless profile:

mvn clean install -Pno-spotless

Tests

The build separates unit tests and integration tests:

  • Unit tests run with Surefire during the test phase.
  • Integration tests use Failsafe during the verify phase and match *IT.java/IT*.java.
  • JaCoCo is enabled through the Maven lifecycle and the aggregate report is generated by the jacoco-aggregate-report module during verify.

Run unit tests only:

mvn test

Run unit tests for a specific module:

mvn -pl uniprot-search test

Run integration tests only:

mvn verify -DskipUTs=true

Run integration tests for a specific module:

mvn -pl integration-test verify -DskipUTs=true

Run all tests, including unit tests, integration tests, and the aggregate JaCoCo report:

mvn verify

Run the full lifecycle without Spotless formatting checks:

mvn verify -Pno-spotless

Skip integration tests:

mvn verify -DskipITs=true

Skip unit tests:

mvn verify -DskipUTs=true

CI runs Maven with additional UniProt resource configuration and then publishes the aggregate JaCoCo report from:

jacoco-aggregate-report/target/site/jacoco-aggregate/jacoco.xml

Some integration tests start local Spark, Solr, ZooKeeper, or Voldemort-related services and bind local ports. Run those tests in an environment that allows local socket binding.

Configuration

Runtime defaults are kept in module resource files:

  • indexer/src/main/resources/application.properties
  • spark-indexer/src/main/resources/application.properties
  • uniprot-datastore/src/main/resources/application.properties

Several values are placeholders or point at developer-local test files. Before running jobs against real data, provide environment-specific overrides for database connection details, Solr hosts or ZooKeeper hosts, Voldemort store hosts, input directories, and release file locations.

For Spring Boot jobs, standard Spring property override mechanisms apply, for example:

java -jar indexer/target/uniprot-indexer-*.jar \
  --spring.data.solr.httphost=http://localhost:8983/solr/ \
  --uniprot.job.name=uniprotkb

Running Jobs

The indexer module provides the Spring Boot entry point:

org.uniprot.store.indexer.IndexerSpringBootApplication

Select the job with uniprot.job.name and provide the required input, database, and Solr properties for the target collection.

The spark-indexer module contains Spark entry points for full indexing, HPS document generation, Solr indexing, and validation. Common main classes include:

  • org.uniprot.store.spark.indexer.main.IndexDataStoreMain
  • org.uniprot.store.spark.indexer.main.WriteIndexDocumentsToHPSMain
  • org.uniprot.store.spark.indexer.main.IndexHPSDocumentsInSolrMain
  • org.uniprot.store.spark.indexer.main.SolrIndexValidatorMain
  • org.uniprot.store.spark.indexer.validator.ValidateHPSDocumentsMain

Most Spark entry points expect release name, collection names, Spark master URL, and taxonomy database arguments. Check the relevant main method before running a job, because argument counts differ by entry point.

The uniprot-datastore module provides Voldemort client and builder utilities, including:

  • org.uniprot.store.datastore.voldemort.client.impl.UniProtClientMain
  • org.uniprot.store.datastore.voldemort.data.validator.UniprotKBEntryRetrieveParseVerifier

CI

The GitLab pipeline uses maven:3.8.5-openjdk-17, installs Brotli, retrieves Maven settings from the UniProt configuration project, runs mvn install, publishes JUnit reports, runs SonarCloud analysis, and deploys snapshots/releases from main.

GitHub Actions runs CodeQL for Java/Kotlin with JDK 17 and a manual Maven package build.

Repository Notes

  • The checked-in JavaScript files are Solr update scripts, not a Node.js application.
  • Generated build outputs belong under module target/ directories.
  • Keep secrets and environment-specific Maven settings outside the repository.

About

This project is for building uniprot search engine

Topics

Resources

Stars

3 stars

Watchers

7 watching

Forks

Releases

Packages

Used by

Contributors

Languages