Skip to content

Commit

Permalink
Merge branch 'halestudio:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuelaepure10 authored Apr 21, 2024
2 parents 522e60b + 1190433 commit ad509d2
Show file tree
Hide file tree
Showing 8 changed files with 111 additions and 16 deletions.
32 changes: 32 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
$schema: "https://docs.renovatebot.com/renovate-schema.json",
extends: [
"github>wetransform/renovate-config:default.json5",
"github>wetransform/renovate-config:hale-studio.json5",
"group:allNonMajor",
],
// Regex syntax: https://github.com/google/re2/wiki/Syntax
// If you're looking for an online regex testing tool that supports capture groups, try regex101.com. You must select the ECMAScript (JavaScript) flavor of regex. Be aware that backslashes ('\') of the resulting regex have to still be escaped e.g. \n\s --> \\n\\s. You can use the Code Generator in the sidebar and copy the regex in the generated "Alternative syntax" comment into JSON.
customManagers: [
{
"customType": "regex",
"fileMatch": ["\\.target$"],
"datasourceTemplate": "custom.p2OfflineResources",
"matchStrings": [
// Example: <unit id="to.wetransform.offlineresources.feature.feature.group" version="2024.3.15.bnd-bQhqgw"/>
// https://regex101.com/r/OGGb5r/1
'<unit id="to\\.wetransform\\.offlineresources\\.feature\\.feature\\.group" version="(?<currentValue>.*?)"\\/>'
],
// OSGi version with optional qualifier - https://regex101.com/r/SHYlv1/1
"versioningTemplate": "regex:^(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)(\\.(?<build>[\\w\\-]+))?$",
// fixed dependency name for now, but could in principle also be extracted and used in the custom data source
"depNameTemplate": "to.wetransform.offlineresources.feature"
}
],
customDatasources: {
// custom datasource for feature "to.wetransform.offlineresources.feature" from offline-resources update site
p2OfflineResources: {
"defaultRegistryUrlTemplate": "http://build-artifacts.wetransform.to/p2/offline-resources/site/to.wetransform.offlineresources.feature_versions.json",
}
}
}
6 changes: 3 additions & 3 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

# Note: Actually we don't need Maven CLI, only Java 17, but this may have additional benefits due to the Maven cache
- name: Setup Maven
uses: s4u/setup-maven-action@v1.5.1
uses: s4u/setup-maven-action@4fdbe2a6a718a03bf4874636eed4311886cab6ba # v1.5.1
with:
java-version: 17
java-distribution: temurin
Expand All @@ -31,7 +31,7 @@ jobs:

# https://github.com/marketplace/actions/junit-report-action
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
uses: mikepenz/action-junit-report@9379f0ccddcab154835d4e2487555ee79614fe95 # v4.2.1
if: always() # always run even if the previous step fails
with:
report_paths: 'build/target/testReports/*.xml'
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/tf-conventional-commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
#
# PLEASE NOTE: Managed workflow - do not change manually
#
name: Check commit conventions

on:
pull_request:
branches:
- '*'

jobs:
verify-commits:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

# https://github.com/taskmedia/action-conventional-commits
- uses: taskmedia/action-conventional-commits@1aea91552f4a5d1407481066c5c9d83f1936b170 # v1.1.15
with:
types: "feat|fix|refactor|revert|ci|chore|docs|build|perf|test|style"
skip_revert: false
6 changes: 3 additions & 3 deletions build/buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ dependencies {
implementation 'org.slf4j:slf4j-simple:1.7.30'
implementation 'org.eclipse.aether:aether-connector-basic:1.1.0'
implementation 'org.eclipse.aether:aether-transport-wagon:1.1.0'
implementation 'org.apache.maven.wagon:wagon-http:3.5.2'
implementation 'org.apache.maven.wagon:wagon-provider-api:3.5.2'
implementation 'org.apache.maven.wagon:wagon-http-lightweight:3.5.2'
implementation 'org.apache.maven.wagon:wagon-http:3.5.3'
implementation 'org.apache.maven.wagon:wagon-provider-api:3.5.3'
implementation 'org.apache.maven.wagon:wagon-http-lightweight:3.5.3'
implementation 'org.eclipse.tycho:org.eclipse.osgi:3.13.0.v20180226-1711'
implementation group: 'org.apache.maven.resolver', name: 'maven-resolver-api', version: '1.8.2'
implementation 'org.yaml:snakeyaml:1.13'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Import-Package: com.google.common.base;version="1.6.0",
eu.esdihumboldt.util.io,
javax.annotation;version="[1.2.0,1.2.0]",
net.jcip.annotations,
org.apache.commons.io.output,
org.apache.commons.lang;version="2.4.0",
org.locationtech.jts.geom,
org.slf4j;version="1.5.11",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintStream;
import java.net.URI;

import org.apache.commons.io.output.CloseShieldOutputStream;

import eu.esdihumboldt.hale.common.align.io.EntityResolver;
import eu.esdihumboldt.hale.common.align.io.impl.internal.AlignmentToJaxb;
import eu.esdihumboldt.hale.common.align.io.impl.internal.JaxbToAlignment;
Expand Down Expand Up @@ -171,7 +174,21 @@ public static void save(AlignmentType alignment, IOReporter reporter, OutputStre
}

/**
* Print a cell to an output stream (intended for tests/debugging).
* Print a cell to a {@link PrintStream} (intended for tests/debugging). The
* stream is prevented from being closed, which is intended to prevent for
* instance System.out from being closed.
*
* @param cell the cell to print
* @param out the output stream
* @throws Exception if an error occurs trying to print the cell
*/
public static void printCell(MutableCell cell, PrintStream out) throws Exception {
printCell(cell, CloseShieldOutputStream.wrap(out));
}

/**
* Print a cell to an output stream (intended for tests/debugging). The
* stream is closed when the cell was written.
*
* @param cell the cell to print
* @param out the output stream
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,32 @@ public Collection<? extends Cell> getTypeCells(Cell queryCell) {
.getDefinition().getType();
if (target == null || DefinitionUtil.isSuperType(target, typeCellTarget)) {
// target matches
if (sources.isEmpty() || matchesSources(typeCell.getSource(), sources)) {
// source matches, too
result.add(typeCell);

if (sources.size() == 1) {
/*
* Special case handling when there is exactly one type,
* that in this case also allows to find a Join that only
* uses one of the types.
*
* Unclear if this is intended, but the else case does not
* yield any results in such cases, which could be due to
* the implementation of `matchesSources` in that case being
* focused on property relations.
*/
TypeEntityDefinition type = sources.iterator().next();
if (sources.isEmpty() || matchesSources(type,
typeCell.getSource().values().stream()
.map(e -> AlignmentUtil.getTypeEntity(e.getDefinition()))
.toList())) {
// source matches, too
result.add(typeCell);
}
}
else {
if (sources.isEmpty() || matchesSources(typeCell.getSource(), sources)) {
// source matches, too
result.add(typeCell);
}
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions platform/hale-platform.target
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@
<unit id="org.eclipse.gef.all.feature.group" version="3.11.0.201606061308"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
<repository location="http://build-artifacts.wetransform.to/p2/equinox-test/build_4"/>
<unit id="de.fhg.igd.equinox.test.feature.feature.group" version="1.2.0.202203220819"/>
<repository location="https://gitlab.wetransform.to/hale/hale-build-support/raw/0342a0f0c4f57a1ec4109f1fbe6e6fecd7dc722b/updatesites/platform"/>
<unit id="eu.esdihumboldt.hale.platform.feature.group" version="5.0.0.i20240220"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
<repository location="http://build-artifacts.wetransform.to/p2/offline-resources/current"/>
<unit id="to.wetransform.offlineresources.feature.feature.group" version="2024.3.8.bnd-W1hqew"/>
<repository location="http://build-artifacts.wetransform.to/p2/equinox-test/96b3ede3cee11a98a1290edc330e421bb6ae2c86"/>
<unit id="de.fhg.igd.equinox.test.feature.feature.group" version="1.2.0.202403131049"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
<repository location="https://gitlab.wetransform.to/hale/hale-build-support/raw/0342a0f0c4f57a1ec4109f1fbe6e6fecd7dc722b/updatesites/platform"/>
<unit id="eu.esdihumboldt.hale.platform.feature.group" version="5.0.0.i20240220"/>
<repository location="http://build-artifacts.wetransform.to/p2/offline-resources/site"/>
<unit id="to.wetransform.offlineresources.feature.feature.group" version="2024.3.19.bnd-D8pqQ"/>
</location>
</locations>
</target>

0 comments on commit ad509d2

Please sign in to comment.