Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,23 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Log in to the Container registry
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@v6
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: .
push: true
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: PR check

on:
pull_request:
branches: ['main']

jobs:
docker-smoke-test:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v7

- name: Build Docker image
run: docker build -t ci-worker-smoke .

- name: Run self-test in Docker
run: docker run --rm ci-worker-smoke ci-worker self-test
11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# GraalVM CE 22.3.3-b1 Java 17, Scala 3.3.3, SBT 1.9.9
FROM sbtscala/scala-sbt:graalvm-ce-22.3.3-b1-java17_1.9.9_3.3.3 as builder
FROM sbtscala/scala-sbt:eclipse-temurin-25.0.3_9_1.12.12_3.8.4 AS builder

# Copy the project sources
COPY . /app
Expand All @@ -9,11 +8,11 @@ WORKDIR /app
RUN sbt assembly

# Create the final image
FROM eclipse-temurin:19-jre-jammy
MAINTAINER "Piotr Sowiński <piotr.sowinski@ibspan.waw.pl>"
FROM eclipse-temurin:25-jre-noble
LABEL maintainer="Piotr Sowiński <piotr@neverblink.eu>"

RUN apt update && \
apt install -y git wget && \
RUN apt-get update && \
apt-get install -y git wget && \
rm -rf /var/lib/apt/lists/*

# Copy the executable jar
Expand Down
19 changes: 9 additions & 10 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
ThisBuild / version := "0.1.0-SNAPSHOT"
ThisBuild / scalaVersion := "3.7.1"
ThisBuild / scalaVersion := "3.8.4"

resolvers +=
"Sonatype OSS Snapshots" at "https://s01.oss.sonatype.org/content/repositories/snapshots"

lazy val circeV = "0.14.14"
lazy val jellyV = "3.4.0"
lazy val circeV = "0.14.15"
lazy val jellyV = "3.7.3"
lazy val jenaV = "5.3.0"
lazy val pekkoV = "1.1.5"
lazy val pekkoHttpV = "1.2.0"
lazy val pekkoConnV = "1.1.0"
lazy val rdf4jV = "5.1.4"
lazy val icu4jV = "77.1"
lazy val pekkoHttpV = "1.3.0"
lazy val pekkoConnV = "1.3.0"
lazy val rdf4jV = "5.3.1"
lazy val icu4jV = "78.3"

lazy val root = (project in file("."))
.settings(
Expand All @@ -20,7 +20,7 @@ lazy val root = (project in file("."))

// Scala 3 or not Scala at all
libraryDependencies ++= Seq(
"com.google.guava" % "guava" % "33.4.8-jre",
"com.google.guava" % "guava" % "33.6.0-jre",
"com.ibm.icu" % "icu4j" % icu4jV,
"eu.neverblink.jelly" %% "jelly-pekko-stream" % jellyV,
"eu.neverblink.jelly" % "jelly-jena" % jellyV,
Expand All @@ -40,8 +40,7 @@ lazy val root = (project in file("."))
"org.eclipse.rdf4j" % "rdf4j-model" % rdf4jV,
"org.eclipse.rdf4j" % "rdf4j-rio-turtle" % rdf4jV,
"org.eclipse.rdf4j" % "rdf4j-rio-trig" % rdf4jV,
// datasketches 8 requires Java 21 it seems, so we use 7 for now
"org.apache.datasketches" % "datasketches-java" % "7.0.1",
"org.apache.datasketches" % "datasketches-java" % "9.0.0",
),

// Discard module-info.class files
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/commands/PackageCommand.scala
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ object PackageCommand extends Command:
if !metadata.conformance.usesRdfStar then
val rdfStar = ds.find().asScala
.flatMap(q => q.getGraph :: q.getSubject :: q.getPredicate :: q.getObject :: Nil)
.exists(_.isNodeTriple)
.exists(_.isTripleTerm)
if rdfStar then
return Some(s"The dataset contains an RDF-star node, " +
s"but the metadata does not declare the use of RDF-star.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ object DegreeDistributionsCommand extends Command:
counter.value += 1

val statementSource: Source[Triple | Quad, NotUsed] = Source.futureSource(response.map(_.entity.dataBytes))
.via(Compression.gunzip())
.via(Compression.gzipDecompress())
.toMat(StreamConverters.asInputStream())(Keep.right)
.mapMaterializedValue(JellyIo.fromIoStream)
.run()
Expand Down
4 changes: 2 additions & 2 deletions src/main/scala/util/StatCounterSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class StatCounterSuite(val size: Long):
// Find triples recursively – needed for RDF-star
def getTriples(t: Triple): List[Triple] =
t +: (t.getSubject :: t.getPredicate :: t.getObject :: Nil)
.filter(_.isNodeTriple)
.filter(_.isTripleTerm)
.flatMap(n => getTriples(n.getTriple))

val allNodes = ds.find().asScala.flatMap(t => {
Expand Down Expand Up @@ -148,7 +148,7 @@ class StatCounterSuite(val size: Long):
datatypes += n.getLiteralDatatypeURI
else
simpleLiterals += n.getLiteralLexicalForm
else if n.isNodeTriple then
else if n.isTripleTerm then
// isomorphism in RDF-star is a pain...
quotedTripleCount += 1
})
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/util/io/FileHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ object FileHelper:
// Unfortunately, Pekko untar stage is glitchy with large archives, so we have to
// use the non-reactive Apache Commons implementation instead.
val tarIs = source
.via(Compression.gunzip())
.via(Compression.gzipDecompress())
.toMat(StreamConverters.asInputStream())(Keep.right)
.mapMaterializedValue(bytesIs => TarArchiveInputStream(bytesIs))
.run()
Expand Down
2 changes: 2 additions & 0 deletions src/main/scala/util/rdf/JsonLdEmbedding.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import org.apache.jena.vocabulary.*
import java.io.FileOutputStream
import java.nio.file.Path
import java.util
import scala.annotation.nowarn
import scala.collection.mutable
import scala.jdk.CollectionConverters.*

Expand Down Expand Up @@ -69,6 +70,7 @@ object JsonLdEmbedding:
* @param m RDF model
* @param mdFilePath file name of the original markdown file
*/
@nowarn("msg=deprecated")
def saveEmbed(m: Model, subject: Resource, mdFilePath: Path): Unit =
val mCopy = translateDcatToSchema(m, subject)
// val mCopy = ModelFactory.createDefaultModel().add(m)
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/util/rdf/SubjectNodeShape.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ object SubjectNodeShape:
override def findInDs(ds: DatasetGraph) = customInstance match
case RdfUtil.`yagoTarget` => ds.find(null, null, null, null).asScala
.map(_.getSubject)
.filter(_.isNodeTriple)
.filter(_.isTripleTerm)
.map(_.getTriple.getSubject)
.toSeq
case _ => throw new Exception(s"Unknown custom target instance: $customInstance")
Expand Down