Skip to content

Commit

Permalink
refactor: rdfc-orchestrator uses correct package name
Browse files Browse the repository at this point in the history
  • Loading branch information
jenspots committed Oct 29, 2024
1 parent ccbcdd2 commit 8956747
Show file tree
Hide file tree
Showing 34 changed files with 73 additions and 82 deletions.
4 changes: 2 additions & 2 deletions orchestrator/rdfc-cli/src/main/kotlin/Exec.kt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package technology.idlab.rdfc.cli

import java.io.File
import technology.idlab.orchestrator.impl.SimpleOrchestrator
import technology.idlab.rdfc.core.log.Log
import technology.idlab.rdfc.orchestrator.orchestrator.impl.SimpleOrchestrator
import technology.idlab.rdfc.orchestrator.resolver.impl.GenericResolver
import technology.idlab.rdfc.parser.impl.JenaParser
import technology.idlab.resolver.impl.GenericResolver

/**
* Execute a pipeline at a given path.
Expand Down
2 changes: 1 addition & 1 deletion orchestrator/rdfc-cli/src/main/kotlin/Install.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package technology.idlab.rdfc.cli
import java.io.File
import technology.idlab.rdfc.core.intermediate.IRPackage
import technology.idlab.rdfc.core.process.ProcessManager
import technology.idlab.rdfc.orchestrator.resolver.impl.GenericResolver
import technology.idlab.rdfc.parser.impl.JenaParser
import technology.idlab.resolver.impl.GenericResolver

/**
* Resolve, prepare and install all dependencies in the configuration file.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package technology.idlab.broker
package technology.idlab.rdfc.orchestrator.broker

/**
* A broker is a simple class which takes in messages targeting a specific URI, and routes them to
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package technology.idlab.broker
package technology.idlab.rdfc.orchestrator.broker

/**
* In order to interact with a broker, an object must implement this interface. It must list all the
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package technology.idlab.broker
package technology.idlab.rdfc.orchestrator.broker

import technology.idlab.rdfc.core.RDFCException

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package technology.idlab.broker.exception
package technology.idlab.rdfc.orchestrator.broker.exception

import technology.idlab.broker.BrokerException
import technology.idlab.rdfc.orchestrator.broker.BrokerException

/**
* An interaction with a dead channel was requested.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package technology.idlab.broker.exception
package technology.idlab.rdfc.orchestrator.broker.exception

import technology.idlab.broker.BrokerException
import technology.idlab.rdfc.orchestrator.broker.BrokerException

/**
* An attempt was made to send a message into a channel where there are no known senders remaining.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package technology.idlab.broker.exception
package technology.idlab.rdfc.orchestrator.broker.exception

import technology.idlab.broker.BrokerException
import technology.idlab.rdfc.orchestrator.broker.BrokerException

/**
* An interaction with an unknown channel was requested.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package technology.idlab.broker.simple
package technology.idlab.rdfc.orchestrator.broker.simple

import technology.idlab.broker.Broker
import technology.idlab.broker.BrokerClient
import technology.idlab.broker.exception.DeadChannelException
import technology.idlab.broker.exception.NoRegisteredSenderException
import technology.idlab.broker.exception.UnknownChannelException
import technology.idlab.rdfc.orchestrator.broker.Broker
import technology.idlab.rdfc.orchestrator.broker.BrokerClient
import technology.idlab.rdfc.orchestrator.broker.exception.DeadChannelException
import technology.idlab.rdfc.orchestrator.broker.exception.NoRegisteredSenderException
import technology.idlab.rdfc.orchestrator.broker.exception.UnknownChannelException

/**
* A simple data class which keeps track of the senders and receivers of a given channel. Note that
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package technology.idlab.orchestrator
package technology.idlab.rdfc.orchestrator.orchestrator

/** The orchestrator handles inter-runner communication and the execution of the pipeline. */
interface Orchestrator {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package technology.idlab.orchestrator.impl
package technology.idlab.rdfc.orchestrator.orchestrator.impl

import kotlinx.coroutines.Deferred
import kotlinx.coroutines.async
import kotlinx.coroutines.awaitAll
import kotlinx.coroutines.coroutineScope
import technology.idlab.broker.Broker
import technology.idlab.broker.simple.SimpleBroker
import technology.idlab.orchestrator.Orchestrator
import technology.idlab.rdfc.orchestrator.broker.Broker
import technology.idlab.rdfc.orchestrator.broker.simple.SimpleBroker
import technology.idlab.rdfc.orchestrator.orchestrator.Orchestrator
import technology.idlab.rdfc.orchestrator.runner.Runner
import technology.idlab.rdfc.parser.Parser
import technology.idlab.runner.Runner

/**
* A simple implementation of an orchestrator which only succeeds if all runners succeed without
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package technology.idlab.resolver
package technology.idlab.rdfc.orchestrator.resolver

import java.io.File
import technology.idlab.rdfc.core.intermediate.IRDependency
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package technology.idlab.resolver
package technology.idlab.rdfc.orchestrator.resolver

import technology.idlab.rdfc.core.RDFCException

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package technology.idlab.resolver.exception
package technology.idlab.rdfc.orchestrator.resolver.exception

import technology.idlab.resolver.ResolverException
import technology.idlab.rdfc.orchestrator.resolver.ResolverException

/**
* The dependency type is not recognized.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package technology.idlab.resolver.impl
package technology.idlab.rdfc.orchestrator.resolver.impl

import java.io.File
import technology.idlab.rdfc.core.intermediate.IRDependency
import technology.idlab.resolver.Resolver
import technology.idlab.resolver.exception.UnresolvableException
import technology.idlab.rdfc.orchestrator.resolver.Resolver
import technology.idlab.rdfc.orchestrator.resolver.exception.UnresolvableException

class GenericResolver : Resolver {
override fun resolve(dependency: IRDependency): File {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package technology.idlab.resolver.impl
package technology.idlab.rdfc.orchestrator.resolver.impl

import java.io.File
import org.eclipse.jgit.api.Git
import technology.idlab.rdfc.core.intermediate.IRDependency
import technology.idlab.resolver.Resolver
import technology.idlab.rdfc.orchestrator.resolver.Resolver

/** Resolve a Git repository by cloning it locally and reading its configuration file. */
class GitResolver : Resolver {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package technology.idlab.resolver.impl
package technology.idlab.rdfc.orchestrator.resolver.impl

import java.io.File
import kotlin.io.path.Path
import kotlin.io.path.createSymbolicLinkPointingTo
import kotlin.io.path.isSymbolicLink
import kotlin.io.path.readSymbolicLink
import technology.idlab.rdfc.core.intermediate.IRDependency
import technology.idlab.resolver.Resolver
import technology.idlab.rdfc.orchestrator.resolver.Resolver

/** Resolve a file on the local file system. */
class LocalResolver : Resolver {
Expand Down
14 changes: 7 additions & 7 deletions orchestrator/rdfc-orchestrator/src/main/kotlin/runner/Runner.kt
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
package technology.idlab.runner
package technology.idlab.rdfc.orchestrator.runner

import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Job
import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
import technology.idlab.broker.Broker
import technology.idlab.broker.BrokerClient
import technology.idlab.rdfc.core.intermediate.IRRunner
import technology.idlab.rdfc.core.intermediate.IRStage
import technology.idlab.rdfc.core.intermediate.runner.RunnerType
import technology.idlab.runner.exception.NoSuchRunnerException
import technology.idlab.runner.exception.UnsupportedRunnerTypeException
import technology.idlab.runner.grpc.GRPCRunner
import technology.idlab.runner.jvm.JVMRunner
import technology.idlab.rdfc.orchestrator.broker.Broker
import technology.idlab.rdfc.orchestrator.broker.BrokerClient
import technology.idlab.rdfc.orchestrator.runner.exception.NoSuchRunnerException
import technology.idlab.rdfc.orchestrator.runner.exception.UnsupportedRunnerTypeException
import technology.idlab.rdfc.orchestrator.runner.grpc.GRPCRunner
import technology.idlab.rdfc.orchestrator.runner.jvm.JVMRunner

/**
* A runner is responsible for executing a set of stages concurrently. A concrete implementation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package technology.idlab.runner
package technology.idlab.rdfc.orchestrator.runner

import technology.idlab.rdfc.core.RDFCException

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package technology.idlab.runner.exception
package technology.idlab.rdfc.orchestrator.runner.exception

import technology.idlab.runner.RunnerException
import technology.idlab.rdfc.orchestrator.runner.RunnerException

/**
* Attempted to access an argument which does not exist.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package technology.idlab.runner.exception
package technology.idlab.rdfc.orchestrator.runner.exception

import technology.idlab.runner.RunnerException
import technology.idlab.rdfc.orchestrator.runner.RunnerException

/**
* A runner was referenced by a stage, but no such runner was found.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package technology.idlab.runner.exception
package technology.idlab.rdfc.orchestrator.runner.exception

import technology.idlab.runner.RunnerException
import technology.idlab.rdfc.orchestrator.runner.RunnerException

/**
* Thrown if the implementation of a processor is invalid.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package technology.idlab.runner.exception
package technology.idlab.rdfc.orchestrator.runner.exception

import technology.idlab.rdfc.core.RDFCException

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package technology.idlab.runner.exception
package technology.idlab.rdfc.orchestrator.runner.exception

import technology.idlab.rdfc.core.RDFCException
import technology.idlab.rdfc.core.intermediate.runner.RunnerType
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package technology.idlab.runner.grpc
package technology.idlab.rdfc.orchestrator.runner.grpc

import io.grpc.ManagedChannel
import io.grpc.ManagedChannelBuilder
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package technology.idlab.runner.grpc
package technology.idlab.rdfc.orchestrator.runner.grpc

import com.google.protobuf.ByteString
import io.grpc.ConnectivityState
Expand All @@ -21,8 +21,8 @@ import technology.idlab.rdfc.core.intermediate.IRStage
import technology.idlab.rdfc.core.intermediate.runner.RunnerType
import technology.idlab.rdfc.core.process.ProcessManager
import technology.idlab.rdfc.core.util.retries
import technology.idlab.runner.Runner
import technology.idlab.runner.exception.UnrecognizedRequestException
import technology.idlab.rdfc.orchestrator.runner.Runner
import technology.idlab.rdfc.orchestrator.runner.exception.UnrecognizedRequestException

/**
* Attempt to connect to a gRPC server. `attempts` indicates the number of retries before throwing
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package technology.idlab.runner.grpc
package technology.idlab.rdfc.orchestrator.runner.grpc

import com.google.protobuf.Timestamp
import com.google.protobuf.kotlin.toByteStringUtf8
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package technology.idlab.runner.jvm
package technology.idlab.rdfc.orchestrator.runner.jvm

import java.net.URI
import java.net.URLClassLoader
Expand All @@ -12,9 +12,9 @@ import technology.idlab.rdfc.core.intermediate.argument.LiteralArgument
import technology.idlab.rdfc.core.intermediate.argument.NestedArgument
import technology.idlab.rdfc.core.intermediate.parameter.LiteralParameterType
import technology.idlab.rdfc.core.log.Log
import technology.idlab.rdfc.orchestrator.runner.Runner
import technology.idlab.rdfc.processor.Arguments
import technology.idlab.rdfc.processor.Processor
import technology.idlab.runner.Runner

/**
* Return a class loader. If a path is given, return a URLClassLoader which loads the JAR file at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
package broker

import technology.idlab.broker.Broker
import technology.idlab.broker.BrokerClient
package technology.idlab.rdfc.orchestrator.broker

/**
* A broker client which registers all collects all calls in collections for testing purposes only.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package broker
package technology.idlab.rdfc.orchestrator.broker

import kotlin.test.Test
import kotlin.test.assertEquals
import org.junit.jupiter.api.assertThrows
import technology.idlab.broker.Broker
import technology.idlab.broker.BrokerClient
import technology.idlab.broker.exception.DeadChannelException
import technology.idlab.broker.exception.NoRegisteredSenderException
import technology.idlab.broker.exception.UnknownChannelException
import technology.idlab.broker.simple.SimpleBroker
import technology.idlab.rdfc.orchestrator.broker.exception.DeadChannelException
import technology.idlab.rdfc.orchestrator.broker.exception.NoRegisteredSenderException
import technology.idlab.rdfc.orchestrator.broker.exception.UnknownChannelException
import technology.idlab.rdfc.orchestrator.broker.simple.SimpleBroker

/** This abstract class provides some simple tests for concrete broker implementations. */
abstract class BrokerTest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package broker.simple
package technology.idlab.rdfc.orchestrator.broker.simple

import broker.BrokerTest
import technology.idlab.broker.Broker
import technology.idlab.broker.BrokerClient
import technology.idlab.broker.simple.SimpleBroker
import technology.idlab.rdfc.orchestrator.broker.Broker
import technology.idlab.rdfc.orchestrator.broker.BrokerClient
import technology.idlab.rdfc.orchestrator.broker.BrokerTest

class SimpleBrokerTest : BrokerTest() {
override fun setup(clients: Collection<BrokerClient<Int>>): Broker<Int> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package resolver
package technology.idlab.rdfc.orchestrator.resolver

import java.nio.file.Files
import kotlin.test.Test
import technology.idlab.rdfc.core.intermediate.IRDependency
import technology.idlab.resolver.Resolver

abstract class ResolverTest {
/** The URI of a dependency which must be handled successfully. */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package resolver.impl
package technology.idlab.rdfc.orchestrator.resolver.impl

import resolver.ResolverTest
import technology.idlab.resolver.impl.GitResolver
import technology.idlab.rdfc.orchestrator.resolver.ResolverTest

class GitResolverTest : ResolverTest() {
override val uri: String = "https://github.com/jenspots/rdfc-template-kt.git"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package resolver.impl
package technology.idlab.rdfc.orchestrator.resolver.impl

import java.io.File
import resolver.ResolverTest
import technology.idlab.resolver.impl.LocalResolver
import technology.idlab.rdfc.orchestrator.resolver.ResolverTest

class LocalResolverTest : ResolverTest() {
override val uri: String = File("../..").canonicalPath + "/packages/shacl-validator-kt"
Expand Down

0 comments on commit 8956747

Please sign in to comment.