Skip to content

Commit

Permalink
fixed merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
datomo committed Apr 11, 2024
2 parents bbc750a + 250079c commit e9badef
Show file tree
Hide file tree
Showing 1,909 changed files with 36,259 additions and 68,301 deletions.
12 changes: 0 additions & 12 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ ij_csv_keep_indents_on_empty_lines = true
ij_csv_wrap_long_lines = false

[*.feature]
indent_size = 2
ij_continuation_indent_size = 8
ij_visual_guides = none
ij_gherkin_keep_indents_on_empty_lines = false
Expand Down Expand Up @@ -315,7 +314,6 @@ ij_java_wrap_first_method_in_call_chain = false
ij_java_wrap_long_lines = false

[*.less]
indent_size = 2
ij_continuation_indent_size = 8
ij_visual_guides = none
ij_less_align_closing_brace_with_properties = false
Expand All @@ -340,8 +338,6 @@ ij_less_use_double_quotes = true
ij_less_value_alignment = 0

[*.proto]
indent_size = 2
tab_width = 2
ij_visual_guides = none
ij_protobuf_keep_blank_lines_in_code = 2
ij_protobuf_keep_indents_on_empty_lines = false
Expand All @@ -353,8 +349,6 @@ ij_protobuf_spaces_within_braces = false
ij_protobuf_spaces_within_brackets = false

[*.sass]
indent_size = 2
tab_width = 2
ij_visual_guides = none
ij_sass_align_closing_brace_with_properties = false
ij_sass_blank_lines_around_nested_selector = 1
Expand All @@ -377,8 +371,6 @@ ij_sass_use_double_quotes = true
ij_sass_value_alignment = 0

[*.scss]
indent_size = 2
tab_width = 2
ij_visual_guides = none
ij_scss_align_closing_brace_with_properties = false
ij_scss_blank_lines_around_nested_selector = 1
Expand Down Expand Up @@ -433,8 +425,6 @@ ij_xml_text_wrap = normal
ij_xml_use_custom_settings = false

[{*.bash,*.sh,*.zsh}]
indent_size = 2
tab_width = 2
ij_visual_guides = none
ij_shell_binary_ops_start_line = false
ij_shell_keep_column_alignment_padding = false
Expand Down Expand Up @@ -812,8 +802,6 @@ ij_markdown_wrap_text_if_long = true
ij_markdown_wrap_text_inside_blockquotes = true

[{*.pb,*.textproto}]
indent_size = 2
tab_width = 2
ij_visual_guides = none
ij_prototext_keep_blank_lines_in_code = 2
ij_prototext_keep_indents_on_empty_lines = false
Expand Down
23 changes: 11 additions & 12 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,33 @@ jobs:
fail-fast: false
matrix:
adapter: [ mongodb, hsqldb, monetdb, postgresql, file, cottontail, neo4j ]
name: Integration Tests (Java 11)
name: Integration Tests (Java 17)
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11
distribution: 'temurin'
java-version: 17
- name: Set env variable
run: |
echo "POLYPHENY_HOME=$GITHUB_WORKSPACE" >> $GITHUB_ENV
- name: Assemble
uses: nick-invision/retry@v2
uses: nick-fields/retry@v2
with:
max_attempts: 2
max_attempts: 1
timeout_minutes: 60
command: ./gradlew assemble
- name: Build Plugins
uses: nick-invision/retry@v2
uses: nick-fields/retry@v2
with:
max_attempts: 1
timeout_minutes: 60
command: ./gradlew assemblePlugins

- name: Execute integration tests for ${{ matrix.adapter }}
uses: nick-invision/retry@v2
uses: nick-fields/retry@v2
with:
max_attempts: 3
max_attempts: 1
timeout_minutes: 30
command: ./gradlew integrationTests -Dstore.default=${{ matrix.adapter }}
command: ./gradlew integrationTests -Dstore.default=${{ matrix.adapter }}
20 changes: 10 additions & 10 deletions .github/workflows/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,35 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [ 11, 15, 17 ]
java: [ 17, 21 ]
os: [ macos-latest, ubuntu-latest, windows-latest ]
name: Java ${{ matrix.java }} @ ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'zulu'
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Set env variable
run: |
echo "POLYPHENY_HOME=$GITHUB_WORKSPACE" >> $GITHUB_ENV
- name: Assemble
uses: nick-invision/retry@v2
uses: nick-fields/retry@v2
with:
max_attempts: 2
max_attempts: 1
timeout_minutes: 60
command: ./gradlew assemble
- name: Build Plugins
uses: nick-invision/retry@v2
uses: nick-fields/retry@v2
with:
max_attempts: 1
timeout_minutes: 60
command: ./gradlew assemblePlugins
- name: Execute tests
uses: nick-invision/retry@v2
uses: nick-fields/retry@v2
with:
max_attempts: 3
max_attempts: 1
timeout_minutes: 30
command: ./gradlew check
command: ./gradlew check
46 changes: 46 additions & 0 deletions .github/workflows/plugins.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Polypheny-DB Plugin Matrix CI

on:
push:
pull_request:
types: [ opened, synchronize, reopened, ready_for_review ]

jobs:
build:
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
java: [ 17, 21 ]
os: [ macos-latest, ubuntu-latest, windows-latest ]
name: Java ${{ matrix.java }} @ ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Set env variable
run: |
echo "POLYPHENY_HOME=$GITHUB_WORKSPACE" >> $GITHUB_ENV
- name: Assemble
uses: nick-fields/retry@v2
with:
max_attempts: 1
timeout_minutes: 60
command: ./gradlew assemble
- name: Build Plugins
uses: nick-fields/retry@v2
with:
max_attempts: 1
timeout_minutes: 60
command: ./gradlew assemblePlugins
- name: Execute tests
uses: nick-fields/retry@v2
with:
max_attempts: 1
timeout_minutes: 30
command: ./gradlew -p plugins test
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ _Polypheny-DB_ builds upon the great work of several other projects:
* [Apache Calcite](https://calcite.apache.org/): A framework for building databases
* [HSQLDB](http://hsqldb.org/): A relational database written in Java
* [JavaCC](https://javacc.org/): A parser generator
* [Java Spark](http://sparkjava.com/): A framework for building web services
* [Javalin](https://javalin.io/): A framework for building web services
* [Project Lombok](https://projectlombok.org/): A library which provides annotations for tedious tasks

Except for the first two, those projects are used "as is" and integrated as a library. _Apache Avatica_ we [forked](https://github.com/polypheny/Avatica) and made some Polypheny-DB specific adjustments. From _Apache Calcite_ we use parts of the code as foundation for Polypheny-DB.
Expand Down
59 changes: 45 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ buildscript {
classpath group: "io.freefair.gradle", name: "lombok-plugin", version: lombok_version
classpath group: "com.adarshr", name: "gradle-test-logger-plugin", version: gradle_test_logger_version
classpath group: "org.reflections", name: "reflections", version: reflections_version
classpath group: "com.jaredsburrows", name: "gradle-license-plugin", version: license_report_version
}
}


plugins {
id "org.jetbrains.kotlin.jvm" version "1.5.31"
id "java"
id "org.jetbrains.gradle.plugin.idea-ext" version "1.1.7"
}

Expand Down Expand Up @@ -45,23 +46,25 @@ allprojects {
}
}


apply plugin: "java-library"
apply plugin: "io.freefair.lombok"
apply plugin: "com.adarshr.test-logger"
apply plugin: "com.jaredsburrows.license"

compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
javadoc.options.encoding = "UTF-8"

sourceCompatibility = 1.11
targetCompatibility = 1.11
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

tasks.withType(JavaCompile) {
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
}


repositories {
mavenLocal()
mavenCentral()
Expand All @@ -77,11 +80,7 @@ allprojects {
}
}

tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}

configurations.all {
configurations.configureEach {
// check for updates every build
resolutionStrategy.cacheChangingModulesFor 0, "seconds"
}
Expand All @@ -98,13 +97,13 @@ allprojects {

String storeName = System.getProperty("store.default") != null ? System.getProperty("store.default") : 'hsqldb'

task integrationTests(type: Test) {
tasks.register('integrationTests', Test) {
description = 'Runs integration tests.'
group = 'verification'
systemProperty 'store.default', storeName
useJUnitPlatform {
includeTags("adapter")
excludeTags(storeName.capitalize() + "Excluded")
excludeTags(storeName.toLowerCase() + "Excluded")
}
shouldRunAfter(tasks.named('test'))
}
Expand Down Expand Up @@ -140,7 +139,17 @@ allprojects {
exclude group: "org.slf4j"
}
testImplementation(group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: junit_jupiter_version)
testRuntimeOnly(group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: junit_jupiter_version)
}

test {
useJUnitPlatform()
}

licenseReport {
generateJsonReport = true
generateCsvReport = false
generateHtmlReport = false
generateTextReport = false
}

idea {
Expand All @@ -159,6 +168,28 @@ allprojects {

}

tasks.register('gatherLicenseReports', Copy) {
// Define the destination directory for the reports
def destinationDir = "${rootProject.buildDir}/reports/licenses"

// Go through each subproject
subprojects.each { subproject ->
from("${subproject.buildDir}/reports/licenses") {
include 'licenseReport.json'
// Rename the report file to include the module name
rename { String fileName ->
"${subproject.name}-$fileName"
}
}
}

// Set the destination for the copied files
into destinationDir
}
gradle.projectsEvaluated { // Make sure the task runs after all projects are evaluated
gatherLicenseReports.dependsOn subprojects*.tasks*.findByName('licenseReport')
}

// plugin location
ext.pluginsDir = rootProject.buildDir.path + '/plugins'

Expand Down
3 changes: 1 addition & 2 deletions config/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ sourceSets {
main {
java {
srcDirs = ["src/main/java"]
outputDir = file(project.buildDir.absolutePath + "/classes")
}
resources {
srcDirs = ["src/main/resources"]
Expand All @@ -39,7 +38,7 @@ sourceSets {
test {
java {
srcDirs = ["src/test/java"]
outputDir = file(project.buildDir.absolutePath + "/test-classes")
destinationDirectory.set(file(project.buildDir.absolutePath + "/test-classes"))
}
resources {
srcDirs = ["src/test/resources"]
Expand Down
5 changes: 2 additions & 3 deletions config/src/main/java/org/polypheny/db/config/Config.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2023 The Polypheny Project
* Copyright 2019-2024 The Polypheny Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -959,8 +959,7 @@ protected void notifyConfigListeners() {
boolean validate( final Object i ) {
if ( this.validationMethod != null ) {
return this.validationMethod.validate( i );
} //else if (this.validationMethod == null ) {
else {
} else {
return true;
}
}
Expand Down
4 changes: 2 additions & 2 deletions config/src/main/java/org/polypheny/db/config/ConfigClazz.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 The Polypheny Project
* Copyright 2019-2024 The Polypheny Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -187,7 +187,7 @@ public Set<Class> read( final JsonReader in ) throws IOException {
}


class ValueAdapter extends TypeAdapter<Class> {
static class ValueAdapter extends TypeAdapter<Class> {

@Override
public void write( final JsonWriter out, final Class value ) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 The Polypheny Project
* Copyright 2019-2024 The Polypheny Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -215,7 +215,7 @@ private Class getByString( String str ) throws ConfigRuntimeException {
}


class ValueAdapter extends TypeAdapter<List<Class>> {
static class ValueAdapter extends TypeAdapter<List<Class>> {

@Override
public void write( final JsonWriter out, final List<Class> classes ) throws IOException {
Expand Down
Loading

0 comments on commit e9badef

Please sign in to comment.