Skip to content

Commit

Permalink
chore: Minor dependency updates (#3078)
Browse files Browse the repository at this point in the history
  • Loading branch information
daschbot committed Mar 1, 2024
1 parent 320a4a8 commit f60d937
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 25 deletions.
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
@@ -0,0 +1,2 @@
# Scala Steward: Reformat with scalafmt 3.8.0
870d2491e283d5f6e329fa64ce0725f512dcadae
2 changes: 1 addition & 1 deletion .scalafmt.conf
@@ -1,4 +1,4 @@
version = "3.7.17"
version = "3.8.0"
runner.dialect = Scala213Source3
maxColumn = 120
align.preset = most
Expand Down
6 changes: 3 additions & 3 deletions project/Dependencies.scala
Expand Up @@ -95,7 +95,7 @@ object Dependencies {
val rdf4jSparql = "org.eclipse.rdf4j" % "rdf4j-sparqlbuilder" % Rdf4jVersion
val saxonHE = "net.sf.saxon" % "Saxon-HE" % "12.4"
val scalaGraph = "org.scala-graph" %% "graph-core" % "2.0.1" // Should be Scala 3 compatible
val titaniumJSONLD = "com.apicatalog" % "titanium-json-ld" % "1.3.3"
val titaniumJSONLD = "com.apicatalog" % "titanium-json-ld" % "1.4.0"
val xmlunitCore = "org.xmlunit" % "xmlunit-core" % "2.9.1"

// test
Expand All @@ -108,9 +108,9 @@ object Dependencies {
// Fixes error message when running IT in IntelliJ
// A needed class was not found. This could be due to an error in your runpath.Missing class: scoverage / Invoker$
// java.lang.NoClassDefFoundError: scoverage / Invoker$
val scoverage = "org.scoverage" %% "scalac-scoverage-runtime" % "2.0.11"
val scoverage = "org.scoverage" %% "scalac-scoverage-runtime" % "2.1.0"
val testcontainers = "org.testcontainers" % "testcontainers" % "1.19.5"
val wiremock = "org.wiremock" % "wiremock" % "3.3.1"
val wiremock = "org.wiremock" % "wiremock" % "3.4.2"

// found/added by the plugin but deleted anyway
val commonsLang3 = "org.apache.commons" % "commons-lang3" % "3.14.0"
Expand Down
Expand Up @@ -984,13 +984,14 @@ final case class StandoffResponderV2Live(
standoffPropertyEntities.standoffPropertyInfoMap.keySet
.intersect(standoffPropertyIrisFromMapping.map(_.toSmartIri))

_ <- ZIO.fail {
NotFoundException(
s"the ontology responder could not find information about these standoff properties: " +
s"${(standoffPropertyIrisFromMapping.map(_.toSmartIri) -- propertyDefinitionsFromMappingFoundInOntology)
.mkString(", ")}"
)
}.when(standoffPropertyIrisFromMapping.map(_.toSmartIri) != propertyDefinitionsFromMappingFoundInOntology)
_ <-
ZIO.fail {
NotFoundException(
s"the ontology responder could not find information about these standoff properties: " +
s"${(standoffPropertyIrisFromMapping.map(_.toSmartIri) -- propertyDefinitionsFromMappingFoundInOntology)
.mkString(", ")}"
)
}.when(standoffPropertyIrisFromMapping.map(_.toSmartIri) != propertyDefinitionsFromMappingFoundInOntology)

// check that for each standoff property defined in the mapping element for a standoff class, a corresponding cardinality exists in the ontology
_ <- ZIO.attempt {
Expand Down
Expand Up @@ -1518,13 +1518,14 @@ final case class ValuesResponderV2Live(
)

// Don't accept link properties.
_ <- ZIO.when(propertyInfoForSubmittedProperty.isLinkProp) {
ZIO.fail(
BadRequestException(
s"Invalid property <${propertyInfoForSubmittedProperty.entityInfoContent.propertyIri.toOntologySchema(ApiV2Complex)}>. Use a link value property to submit a link."
)
)
}
_ <-
ZIO.when(propertyInfoForSubmittedProperty.isLinkProp) {
ZIO.fail(
BadRequestException(
s"Invalid property <${propertyInfoForSubmittedProperty.entityInfoContent.propertyIri.toOntologySchema(ApiV2Complex)}>. Use a link value property to submit a link."
)
)
}

// Don't accept knora-api:hasStandoffLinkToValue.
_ <- ZIO.when(deleteValue.propertyIri.toString == OntologyConstants.KnoraApiV2Complex.HasStandoffLinkToValue)(
Expand Down Expand Up @@ -2057,13 +2058,14 @@ final case class ValuesResponderV2Live(
subClassResponse <- messageRelay.ask[CheckSubClassResponseV2](subClassRequest)

// If it isn't, fail with an exception.
_ <- ZIO.when(!subClassResponse.isSubClass) {
ZIO.fail(
OntologyConstraintException(
s"A value of type <${valueContent.valueType}> cannot be the target of property <$propertyIri>, because it is not a member of class <$objectClassConstraint>"
)
)
}
_ <-
ZIO.when(!subClassResponse.isSubClass) {
ZIO.fail(
OntologyConstraintException(
s"A value of type <${valueContent.valueType}> cannot be the target of property <$propertyIri>, because it is not a member of class <$objectClassConstraint>"
)
)
}

} yield ()
}
Expand Down

0 comments on commit f60d937

Please sign in to comment.