From 2d28670c50bd8a6ee38a36b27b926e4836fd23e0 Mon Sep 17 00:00:00 2001 From: Hendrik Cannoodt Date: Fri, 13 Oct 2023 15:16:03 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20github=20uri=20->=20repo,=20add=20local?= =?UTF-8?q?=20repository=20and=20local=20dependency=20exa=E2=80=A6=20(#569?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix github uri -> repo, add local repository and local dependency example * Fix indentation in dependency examples --- .../io/viash/functionality/dependencies/Dependency.scala | 8 +++++++- .../functionality/dependencies/LocalRepository.scala | 8 ++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/main/scala/io/viash/functionality/dependencies/Dependency.scala b/src/main/scala/io/viash/functionality/dependencies/Dependency.scala index 92cf4958e..a93ef0f92 100644 --- a/src/main/scala/io/viash/functionality/dependencies/Dependency.scala +++ b/src/main/scala/io/viash/functionality/dependencies/Dependency.scala @@ -32,7 +32,7 @@ import io.viash.exceptions.MissingBuildYamlException """name: qc/multiqc |repository: | type: github - | uri: openpipelines-bio/modules + | repo: openpipelines-bio/modules | tag: 0.3.0 |""".stripMargin, "yaml", @@ -52,6 +52,12 @@ import io.viash.exceptions.MissingBuildYamlException "yaml", "Definition of a dependency with a repository defined as 'openpipelines-bio' under `.functionality.repositories`." ) +@exampleWithDescription( + """name: qc/multiqc + |""".stripMargin, + "yaml", + "Definition of a local dependency. This dependency is present in the current code base and will be built when `viash ns build` is run." +) case class Dependency( @description("The full name of the dependency component. This should include the namespace.") @example("name: \"my_namespace\"component", "yaml") diff --git a/src/main/scala/io/viash/functionality/dependencies/LocalRepository.scala b/src/main/scala/io/viash/functionality/dependencies/LocalRepository.scala index 69472d470..c90d10fbc 100644 --- a/src/main/scala/io/viash/functionality/dependencies/LocalRepository.scala +++ b/src/main/scala/io/viash/functionality/dependencies/LocalRepository.scala @@ -26,6 +26,14 @@ import java.nio.file.Paths |Alternatively, this can be used to refer to a code repository present on the local hard-drive instead of fetchable remotely, for example during development. |""".stripMargin ) +@exampleWithDescription( + """name: my_local_code + |type: local + |path: /additional_code/src + |""".stripMargin, + "yaml", + "Refer to a local code repository under `additional_code/src` referenced to the Viash Project Config file." +) @subclass("local") case class LocalRepository( name: String = "",