Adopt deprecated APIs from fs2; use fs2.Path

This commit is contained in:
eikek
2021-08-07 12:20:38 +02:00
parent f92aeb6a0f
commit 1901fe1a8c
41 changed files with 124 additions and 109 deletions

View File

@ -24,7 +24,7 @@ class StanfordTextClassifierSuite extends FunSuite {
val logger = Logger.log4s[IO](org.log4s.getLogger)
test("learn from data") {
val cfg = TextClassifierConfig(Paths.get("target"), NonEmptyList.of(Map()))
val cfg = TextClassifierConfig(File.path(Paths.get("target")), NonEmptyList.of(Map()))
val data =
Stream
@ -52,8 +52,8 @@ class StanfordTextClassifierSuite extends FunSuite {
}
test("run classifier") {
val cfg = TextClassifierConfig(Paths.get("target"), NonEmptyList.of(Map()))
val things = File.withTempDir[IO](Paths.get("target"), "testcls")
val cfg = TextClassifierConfig(File.path(Paths.get("target")), NonEmptyList.of(Map()))
val things = File.withTempDir[IO](File.path(Paths.get("target")), "testcls")
things
.use { dir =>

View File

@ -13,7 +13,6 @@ import cats.effect.unsafe.implicits.global
import docspell.analysis.Env
import docspell.common._
import docspell.common.syntax.FileSyntax._
import docspell.files.TestFiles
import edu.stanford.nlp.pipeline.StanfordCoreNLP
@ -100,7 +99,7 @@ class StanfordNerAnnotatorSuite extends FunSuite {
|""".stripMargin
File
.withTempDir[IO](Paths.get("target"), "test-regex-ner")
.withTempDir[IO](File.path(Paths.get("target")), "test-regex-ner")
.use { dir =>
for {
out <- File.writeString[IO](dir / "regex.txt", regexNerContent)