Skip to content

Commit

Permalink
Merge pull request #207 from vitrivr/dev
Browse files Browse the repository at this point in the history
v3.2.0: New Cottontail API, New Temporal Scoring

Former-commit-id: eaf13aa
  • Loading branch information
silvanheller authored Oct 15, 2021
2 parents 62f2f6d + 06ddfa7 commit 17bb5bb
Show file tree
Hide file tree
Showing 498 changed files with 20,442 additions and 7,795 deletions.
29 changes: 29 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Java sources
*.java text diff=java
*.gradle text diff=java
*.gradle.kts text diff=java

# These files are text and should be normalized (Convert crlf => lf)
*.css text diff=css
*.df text
*.htm text diff=html
*.html text diff=html
*.js text
*.jsp text
*.jspf text
*.jspx text
*.properties text
*.tld text
*.tag text
*.tagx text
*.xml text

# These files are binary and should be left untouched
# (binary is a macro for -text -diff)
*.class binary
*.dll binary
*.ear binary
*.jar binary
*.so binary
*.war binary
*.jks binary
39 changes: 34 additions & 5 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,30 @@ jobs:

runs-on: ubuntu-latest

# Setup Cottontail DB service container
services:
cottontail:
image: vitrivr/cottontaildb:0.12.11
ports:
- 1865:1865
options: -it

# Start actual job.
steps:
- uses: actions/checkout@v2
- name: nc connection test
run: nc -zv 127.0.0.1 1865
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v2
with:
java-version: 11.0.6
java-version: '11'
distribution: 'adopt'
- name: Cleanup Gradle Cache
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
- name: Grant execute permission for gradlew
run: chmod +x gradlew
# https://github.com/actions/cache/blob/main/examples.md#java---gradle
Expand All @@ -29,12 +47,23 @@ jobs:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Test with Gradle
run: ./gradlew test
- name: core-jar
run: ./gradlew cineast-core:shadowJar
- name: runtime-jar
run: ./gradlew cineast-runtime:shadowJar
- name: api-jar
run: ./gradlew cineast-api:shadowJar
- name: nc connection test
run: nc -zv 127.0.0.1 1865
- name: Test with Gradle
timeout-minutes: 5
run: ./gradlew test --debug
- name: Cleanup Gradle Cache
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
33 changes: 33 additions & 0 deletions .github/workflows/release-maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish Cineast artifacts to the Maven Central Repository
on:
push:
branches:
- main
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up Java
uses: actions/setup-java@v1
with:
java-version: 11.0.6
server-id: maven
- id: get_version
name: Extract publication version from tag.
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
- id: publish-gradle
name: Publish package the Maven Central Repository
run: gradle publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
MAVEN_PUBLICATION_VERSION: ${{ env.VERSION }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
27 changes: 27 additions & 0 deletions .github/workflows/snapshot-maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish Cineast artifacts to the OSS Snapshot Repository
on:
push:
branches:
- main

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up Java
uses: actions/setup-java@v1
with:
java-version: 11.0.6
server-id: maven
- id: publish-gradle
name: Publish package to the OSS Snapshot Repository & GitHub Packages
run: gradle publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,10 @@ index*

##macOS
.DS_Store

output/
logs/
resources/

#IIIF
iiif-media-*/
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@ Cineast is a multi-feature content-based multimedia retrieval engine. It is capa
Cineast is written in Java and uses [CottontailDB](https://github.com/vitrivr/cottontaildb) as a storage backend.

## Building Cineast
For setup information, consult our [Wiki](https://github.com/vitrivr/cineast/wiki/Environment-Setup)
Cineast can be built using [Gradle](https://gradle.org/). Building and running it is as easy as
```
$> git clone https://github.com/vitrivr/cineast.git
$> cd cineast
$> ./gradlew cineast-runtime:shadowJar
$> java -jar cineast-runtime/build/libs/cineast-runtime-x.x-full.jar cineast.json
```

For more setup information, consult our [Wiki](https://github.com/vitrivr/cineast/wiki)

## Docker image

Expand Down Expand Up @@ -84,4 +92,4 @@ Please use the file supplied in the `docs/` folder

To automatically apply the styleguide in [IntelliJ IDEA](https://www.jetbrains.com/idea/) go to_File_ -> _Settings_ -> _Editor_ -> _Code Style_ -> _Java_ and import the supplied file via the gear icon.

You can also use [Eclipse](https://www.eclipse.org/) for development and use Google's [styleguide for eclipse](https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml).
You can also use [Eclipse](https://www.eclipse.org/) for development and use Google's [styleguide for eclipse](https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml).
79 changes: 40 additions & 39 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
plugins {
id 'com.github.johnrengelman.shadow' version '6.1.0'
id 'java'
id 'idea'
id 'de.undercouch.download' version "4.1.1"
id 'com.google.osdetector' version '1.6.2'
id 'java-library'
id 'idea'
}

allprojects {
/* Group name of our artifacts */
group = 'org.vitrivr'

/* Our current version */
version = '3.0.3'
version = '3.2.0-SNAPSHOT'

apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'signing'
}

project.ext.protobufVersion = "3.14.0"
project.ext.grpcVersion = "1.34.0"


subprojects {
buildscript {
repositories {
jcenter()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2"
Expand All @@ -44,7 +42,9 @@ subprojects {
repositories {
jcenter()
mavenCentral()

maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
}

/* Important warnings that are currently missing simply because there are too many: "cast", "rawtypes". Ideally, "all" should be used in the future. */
Expand All @@ -57,37 +57,18 @@ subprojects {

dependencies {
/** Log4j 2 */
compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.12.0'
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.12.0'
compile group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.12.0'
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: version_log4j2
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: version_log4j2
implementation group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: version_log4j2

/** Jackson (JSON conversion) */
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.12.0'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.12.0'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: version_jackson
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: version_jackson

/** Test dependencies (JUnit 5) */
testCompile group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.5.0'
testCompile group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.3.2'
testRuntime group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.5.0'

/** Protobuf & gRPC. */
compile group: "com.google.protobuf", name: "protobuf-java", version: "$protobufVersion"
compile group: "io.grpc", name: "grpc-netty", version: "${grpcVersion}"
compile group: "io.grpc", name: "grpc-protobuf", version: "${grpcVersion}"
compile group: "io.grpc", name: "grpc-stub", version: "${grpcVersion}"
}
}

project(':cineast-runtime') {
dependencies {
compile project(path: ':cineast-core', configuration: 'shadow')
}
}

project(':cineast-api') {
dependencies {
compile project(path: ':cineast-runtime', configuration: 'shadow')
compile project(path: ':cineast-core')
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: version_junit
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: version_junit
testImplementation group: 'org.junit.platform', name: 'junit-platform-launcher', version: version_junit_platform
}
}

Expand All @@ -97,6 +78,9 @@ idea {

excludeDirs += file('data')
excludeDirs += file('thumbnails')
excludeDirs += file('output')
excludeDirs += file('logs')
excludeDirs += file('resources')
}
}

Expand All @@ -105,15 +89,27 @@ task getExternalFiles {
def fileList = rootProject.file("externalFiles.csv")
fileList.eachLine { String line ->
def split = line.split(",")
def destination = split[1]
download {
src split[0]
dest split[1]
dest destination
}
if (destination.endsWith(".tar.gz")) {
def compressed = file(destination)
def target = file(destination.substring(0, destination.length() - 7))

copy {
from tarTree(compressed)
into target
}
delete(compressed)
}
return
}
}
}

task generateOpenApiSpecs(type: JavaExec){
task generateOpenApiSpecs(type: JavaExec) {
classpath = project(":cineast-api").sourceSets.main.runtimeClasspath
main = 'org.vitrivr.cineast.api.docs.GenerateOpenApiSpecs'

Expand All @@ -122,3 +118,8 @@ task generateOpenApiSpecs(type: JavaExec){
args("${config}")
}

task generateOAS(type: Download){
/* This requires a locally running Cineast */
src 'http://localhost:4567/openapi-specs'
dest "${project.projectDir}/docs/openapi.json"
}
Loading

0 comments on commit 17bb5bb

Please sign in to comment.