mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-07 15:45:59 +00:00
Apply autoformat
This commit is contained in:
parent
e630786104
commit
e1bbc2edf5
@ -92,11 +92,11 @@ def webjarSettings(queryJS: Project) = Seq(
|
|||||||
}.taskValue,
|
}.taskValue,
|
||||||
Compile / resourceGenerators += Def.task {
|
Compile / resourceGenerators += Def.task {
|
||||||
val logger = streams.value.log
|
val logger = streams.value.log
|
||||||
val out = (queryJS/Compile/fullOptJS).value
|
val out = (queryJS / Compile / fullOptJS).value
|
||||||
logger.info(s"Produced query js file: ${out.data}")
|
logger.info(s"Produced query js file: ${out.data}")
|
||||||
copyWebjarResources(
|
copyWebjarResources(
|
||||||
Seq(out.data),
|
Seq(out.data),
|
||||||
(Compile/resourceManaged).value,
|
(Compile / resourceManaged).value,
|
||||||
name.value,
|
name.value,
|
||||||
version.value,
|
version.value,
|
||||||
logger
|
logger
|
||||||
@ -218,7 +218,9 @@ val openapiScalaSettings = Seq(
|
|||||||
field.copy(typeDef = TypeDef("OrgUse", Imports("docspell.common.OrgUse")))
|
field.copy(typeDef = TypeDef("OrgUse", Imports("docspell.common.OrgUse")))
|
||||||
case "equipmentuse" =>
|
case "equipmentuse" =>
|
||||||
field =>
|
field =>
|
||||||
field.copy(typeDef = TypeDef("EquipmentUse", Imports("docspell.common.EquipmentUse")))
|
field.copy(typeDef =
|
||||||
|
TypeDef("EquipmentUse", Imports("docspell.common.EquipmentUse"))
|
||||||
|
)
|
||||||
}))
|
}))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,14 +1,18 @@
|
|||||||
package docspell.analysis.classifier
|
package docspell.analysis.classifier
|
||||||
|
|
||||||
import munit._
|
|
||||||
import cats.effect._
|
|
||||||
import scala.concurrent.ExecutionContext
|
|
||||||
import java.nio.file.Paths
|
import java.nio.file.Paths
|
||||||
import cats.data.NonEmptyList
|
|
||||||
import docspell.common._
|
import scala.concurrent.ExecutionContext
|
||||||
import fs2.Stream
|
|
||||||
import cats.data.Kleisli
|
import cats.data.Kleisli
|
||||||
import TextClassifier.Data
|
import cats.data.NonEmptyList
|
||||||
|
import cats.effect._
|
||||||
|
import fs2.Stream
|
||||||
|
|
||||||
|
import docspell.analysis.classifier.TextClassifier.Data
|
||||||
|
import docspell.common._
|
||||||
|
|
||||||
|
import munit._
|
||||||
|
|
||||||
class StanfordTextClassifierSuite extends FunSuite {
|
class StanfordTextClassifierSuite extends FunSuite {
|
||||||
val logger = Logger.log4s[IO](org.log4s.getLogger)
|
val logger = Logger.log4s[IO](org.log4s.getLogger)
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package docspell.analysis.contact
|
package docspell.analysis.contact
|
||||||
|
|
||||||
import docspell.common.{NerLabel, NerTag}
|
import docspell.common.{NerLabel, NerTag}
|
||||||
|
|
||||||
import munit._
|
import munit._
|
||||||
|
|
||||||
class ContactAnnotateSpec extends FunSuite {
|
class ContactAnnotateSpec extends FunSuite {
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
package docspell.analysis.date
|
package docspell.analysis.date
|
||||||
|
|
||||||
import docspell.files.TestFiles
|
|
||||||
import munit._
|
|
||||||
import docspell.common._
|
|
||||||
import java.time._
|
import java.time._
|
||||||
|
|
||||||
|
import docspell.common._
|
||||||
|
import docspell.files.TestFiles
|
||||||
|
|
||||||
|
import munit._
|
||||||
|
|
||||||
class DateFindSpec extends FunSuite {
|
class DateFindSpec extends FunSuite {
|
||||||
|
|
||||||
test("find simple dates") {
|
test("find simple dates") {
|
||||||
|
@ -2,9 +2,10 @@ package docspell.analysis.nlp
|
|||||||
|
|
||||||
import docspell.analysis.Env
|
import docspell.analysis.Env
|
||||||
import docspell.common.Language.NLPLanguage
|
import docspell.common.Language.NLPLanguage
|
||||||
import munit._
|
|
||||||
import docspell.files.TestFiles
|
|
||||||
import docspell.common._
|
import docspell.common._
|
||||||
|
import docspell.files.TestFiles
|
||||||
|
|
||||||
|
import munit._
|
||||||
|
|
||||||
class BaseCRFAnnotatorSuite extends FunSuite {
|
class BaseCRFAnnotatorSuite extends FunSuite {
|
||||||
|
|
||||||
|
@ -3,12 +3,14 @@ package docspell.analysis.nlp
|
|||||||
import java.nio.file.Paths
|
import java.nio.file.Paths
|
||||||
|
|
||||||
import cats.effect.IO
|
import cats.effect.IO
|
||||||
|
|
||||||
import docspell.analysis.Env
|
import docspell.analysis.Env
|
||||||
import munit._
|
|
||||||
import docspell.files.TestFiles
|
|
||||||
import docspell.common._
|
import docspell.common._
|
||||||
import docspell.common.syntax.FileSyntax._
|
import docspell.common.syntax.FileSyntax._
|
||||||
|
import docspell.files.TestFiles
|
||||||
|
|
||||||
import edu.stanford.nlp.pipeline.StanfordCoreNLP
|
import edu.stanford.nlp.pipeline.StanfordCoreNLP
|
||||||
|
import munit._
|
||||||
|
|
||||||
class StanfordNerAnnotatorSuite extends FunSuite {
|
class StanfordNerAnnotatorSuite extends FunSuite {
|
||||||
lazy val germanClassifier =
|
lazy val germanClassifier =
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
package docspell.common
|
package docspell.common
|
||||||
|
|
||||||
|
import docspell.common.Glob._
|
||||||
|
|
||||||
import munit._
|
import munit._
|
||||||
import Glob._
|
|
||||||
|
|
||||||
class GlobTest extends FunSuite {
|
class GlobTest extends FunSuite {
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package docspell.common
|
package docspell.common
|
||||||
|
|
||||||
import cats.implicits._
|
import cats.implicits._
|
||||||
|
|
||||||
import munit._
|
import munit._
|
||||||
|
|
||||||
class LenientUriTest extends FunSuite {
|
class LenientUriTest extends FunSuite {
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
package docspell.common
|
package docspell.common
|
||||||
|
|
||||||
import munit._
|
|
||||||
import cats.data.NonEmptyList
|
import cats.data.NonEmptyList
|
||||||
|
|
||||||
import docspell.common.MetaProposal.Candidate
|
import docspell.common.MetaProposal.Candidate
|
||||||
|
|
||||||
|
import munit._
|
||||||
|
|
||||||
class MetaProposalListTest extends FunSuite {
|
class MetaProposalListTest extends FunSuite {
|
||||||
|
|
||||||
test("flatten retains order of candidates") {
|
test("flatten retains order of candidates") {
|
||||||
|
@ -3,16 +3,18 @@ package docspell.convert
|
|||||||
import java.nio.file.Paths
|
import java.nio.file.Paths
|
||||||
|
|
||||||
import cats.data.Kleisli
|
import cats.data.Kleisli
|
||||||
import cats.implicits._
|
|
||||||
import cats.effect.IO
|
import cats.effect.IO
|
||||||
|
import cats.implicits._
|
||||||
import fs2.Stream
|
import fs2.Stream
|
||||||
|
|
||||||
import docspell.common._
|
import docspell.common._
|
||||||
import docspell.convert.ConversionResult.Handler
|
import docspell.convert.ConversionResult.Handler
|
||||||
|
import docspell.convert.extern.OcrMyPdfConfig
|
||||||
import docspell.convert.extern.{TesseractConfig, UnoconvConfig, WkHtmlPdfConfig}
|
import docspell.convert.extern.{TesseractConfig, UnoconvConfig, WkHtmlPdfConfig}
|
||||||
import docspell.convert.flexmark.MarkdownConfig
|
import docspell.convert.flexmark.MarkdownConfig
|
||||||
import docspell.files.{ExampleFiles, TestFiles}
|
import docspell.files.{ExampleFiles, TestFiles}
|
||||||
|
|
||||||
import munit._
|
import munit._
|
||||||
import docspell.convert.extern.OcrMyPdfConfig
|
|
||||||
|
|
||||||
class ConversionTest extends FunSuite with FileChecks {
|
class ConversionTest extends FunSuite with FileChecks {
|
||||||
val blocker = TestFiles.blocker
|
val blocker = TestFiles.blocker
|
||||||
|
@ -6,6 +6,7 @@ import java.nio.file.{Files, Path}
|
|||||||
import cats.data.Kleisli
|
import cats.data.Kleisli
|
||||||
import cats.effect.IO
|
import cats.effect.IO
|
||||||
import fs2.{Pipe, Stream}
|
import fs2.{Pipe, Stream}
|
||||||
|
|
||||||
import docspell.common.MimeType
|
import docspell.common.MimeType
|
||||||
import docspell.convert.ConversionResult.Handler
|
import docspell.convert.ConversionResult.Handler
|
||||||
import docspell.files.TikaMimetype
|
import docspell.files.TikaMimetype
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
package docspell.convert.extern
|
package docspell.convert.extern
|
||||||
|
|
||||||
|
import java.nio.charset.StandardCharsets
|
||||||
import java.nio.file.{Path, Paths}
|
import java.nio.file.{Path, Paths}
|
||||||
|
|
||||||
import cats.effect._
|
import cats.effect._
|
||||||
|
|
||||||
import docspell.common._
|
import docspell.common._
|
||||||
import docspell.convert._
|
import docspell.convert._
|
||||||
import docspell.files.{ExampleFiles, TestFiles}
|
import docspell.files.{ExampleFiles, TestFiles}
|
||||||
|
|
||||||
import munit._
|
import munit._
|
||||||
import java.nio.charset.StandardCharsets
|
|
||||||
|
|
||||||
class ExternConvTest extends FunSuite with FileChecks {
|
class ExternConvTest extends FunSuite with FileChecks {
|
||||||
val blocker = TestFiles.blocker
|
val blocker = TestFiles.blocker
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
package docspell.extract.ocr
|
package docspell.extract.ocr
|
||||||
|
|
||||||
import cats.effect.IO
|
import cats.effect.IO
|
||||||
|
|
||||||
import docspell.common.Logger
|
import docspell.common.Logger
|
||||||
import docspell.files.TestFiles
|
import docspell.files.TestFiles
|
||||||
|
|
||||||
import munit._
|
import munit._
|
||||||
|
|
||||||
class TextExtractionSuite extends FunSuite {
|
class TextExtractionSuite extends FunSuite {
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
package docspell.extract.odf
|
package docspell.extract.odf
|
||||||
|
|
||||||
import cats.effect._
|
import cats.effect._
|
||||||
|
|
||||||
import docspell.files.{ExampleFiles, TestFiles}
|
import docspell.files.{ExampleFiles, TestFiles}
|
||||||
|
|
||||||
import munit._
|
import munit._
|
||||||
|
|
||||||
class OdfExtractTest extends FunSuite {
|
class OdfExtractTest extends FunSuite {
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
package docspell.extract.pdfbox
|
package docspell.extract.pdfbox
|
||||||
|
|
||||||
import cats.effect._
|
import cats.effect._
|
||||||
|
|
||||||
import docspell.files.{ExampleFiles, TestFiles}
|
import docspell.files.{ExampleFiles, TestFiles}
|
||||||
|
|
||||||
import munit._
|
import munit._
|
||||||
|
|
||||||
class PdfboxExtractTest extends FunSuite {
|
class PdfboxExtractTest extends FunSuite {
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
package docspell.extract.pdfbox
|
package docspell.extract.pdfbox
|
||||||
|
|
||||||
import cats.effect._
|
|
||||||
import docspell.files.{ExampleFiles, TestFiles}
|
|
||||||
import munit._
|
|
||||||
import java.nio.file.Path
|
import java.nio.file.Path
|
||||||
|
|
||||||
|
import cats.effect._
|
||||||
import fs2.Stream
|
import fs2.Stream
|
||||||
|
|
||||||
|
import docspell.files.{ExampleFiles, TestFiles}
|
||||||
|
|
||||||
|
import munit._
|
||||||
|
|
||||||
class PdfboxPreviewTest extends FunSuite {
|
class PdfboxPreviewTest extends FunSuite {
|
||||||
val blocker = TestFiles.blocker
|
val blocker = TestFiles.blocker
|
||||||
implicit val CS = TestFiles.CS
|
implicit val CS = TestFiles.CS
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
package docspell.extract.poi
|
package docspell.extract.poi
|
||||||
|
|
||||||
import cats.effect._
|
import cats.effect._
|
||||||
|
|
||||||
import docspell.common.MimeTypeHint
|
import docspell.common.MimeTypeHint
|
||||||
import docspell.files.{ExampleFiles, TestFiles}
|
import docspell.files.{ExampleFiles, TestFiles}
|
||||||
|
|
||||||
import munit._
|
import munit._
|
||||||
|
|
||||||
class PoiExtractTest extends FunSuite {
|
class PoiExtractTest extends FunSuite {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package docspell.extract.rtf
|
package docspell.extract.rtf
|
||||||
|
|
||||||
import docspell.files.ExampleFiles
|
import docspell.files.ExampleFiles
|
||||||
|
|
||||||
import munit._
|
import munit._
|
||||||
|
|
||||||
class RtfExtractTest extends FunSuite {
|
class RtfExtractTest extends FunSuite {
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
package docspell.files
|
package docspell.files
|
||||||
|
|
||||||
import cats.implicits._
|
|
||||||
import cats.effect.{Blocker, IO}
|
|
||||||
import munit._
|
|
||||||
|
|
||||||
import scala.concurrent.ExecutionContext
|
import scala.concurrent.ExecutionContext
|
||||||
import scala.util.Using
|
import scala.util.Using
|
||||||
|
|
||||||
|
import cats.effect.{Blocker, IO}
|
||||||
|
import cats.implicits._
|
||||||
|
|
||||||
|
import munit._
|
||||||
|
|
||||||
class ImageSizeTest extends FunSuite {
|
class ImageSizeTest extends FunSuite {
|
||||||
val blocker = Blocker.liftExecutionContext(ExecutionContext.global)
|
val blocker = Blocker.liftExecutionContext(ExecutionContext.global)
|
||||||
implicit val CS = IO.contextShift(ExecutionContext.global)
|
implicit val CS = IO.contextShift(ExecutionContext.global)
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
package docspell.files
|
package docspell.files
|
||||||
|
|
||||||
import cats.effect.{Blocker, ExitCode, IO, IOApp}
|
|
||||||
import docspell.common.MimeTypeHint
|
|
||||||
|
|
||||||
import scala.concurrent.ExecutionContext
|
import scala.concurrent.ExecutionContext
|
||||||
|
|
||||||
|
import cats.effect._
|
||||||
|
|
||||||
|
import docspell.common.MimeTypeHint
|
||||||
|
|
||||||
object Playing extends IOApp {
|
object Playing extends IOApp {
|
||||||
val blocker = Blocker.liftExecutionContext(ExecutionContext.global)
|
val blocker = Blocker.liftExecutionContext(ExecutionContext.global)
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package docspell.files
|
package docspell.files
|
||||||
|
|
||||||
|
import scala.concurrent.ExecutionContext
|
||||||
|
|
||||||
import cats.effect.{Blocker, IO}
|
import cats.effect.{Blocker, IO}
|
||||||
import fs2.Stream
|
import fs2.Stream
|
||||||
|
|
||||||
import scala.concurrent.ExecutionContext
|
|
||||||
|
|
||||||
object TestFiles {
|
object TestFiles {
|
||||||
val blocker = Blocker.liftExecutionContext(ExecutionContext.global)
|
val blocker = Blocker.liftExecutionContext(ExecutionContext.global)
|
||||||
implicit val CS = IO.contextShift(ExecutionContext.global)
|
implicit val CS = IO.contextShift(ExecutionContext.global)
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
package docspell.files
|
package docspell.files
|
||||||
|
|
||||||
import munit._
|
import scala.concurrent.ExecutionContext
|
||||||
|
|
||||||
import cats.effect._
|
import cats.effect._
|
||||||
import cats.implicits._
|
import cats.implicits._
|
||||||
import scala.concurrent.ExecutionContext
|
|
||||||
import docspell.common.Glob
|
import docspell.common.Glob
|
||||||
|
|
||||||
|
import munit._
|
||||||
|
|
||||||
class ZipTest extends FunSuite {
|
class ZipTest extends FunSuite {
|
||||||
|
|
||||||
val blocker = Blocker.liftExecutionContext(ExecutionContext.global)
|
val blocker = Blocker.liftExecutionContext(ExecutionContext.global)
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
package docspell.joex.analysis
|
package docspell.joex.analysis
|
||||||
|
|
||||||
import munit._
|
|
||||||
import NerFile.Pattern
|
|
||||||
import java.{util => ju}
|
import java.{util => ju}
|
||||||
|
|
||||||
|
import docspell.joex.analysis.NerFile.Pattern
|
||||||
|
|
||||||
|
import munit._
|
||||||
|
|
||||||
class NerFileTest extends FunSuite {
|
class NerFileTest extends FunSuite {
|
||||||
|
|
||||||
test("create valid case insensitive patterns") {
|
test("create valid case insensitive patterns") {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package docspell.joex.scheduler
|
package docspell.joex.scheduler
|
||||||
|
|
||||||
import docspell.common.Priority
|
import docspell.common.Priority
|
||||||
|
|
||||||
import munit._
|
import munit._
|
||||||
|
|
||||||
class CountingSchemeSpec extends FunSuite {
|
class CountingSchemeSpec extends FunSuite {
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
package docspell.query
|
package docspell.query
|
||||||
|
|
||||||
import cats.implicits._
|
import cats.implicits._
|
||||||
import munit._
|
|
||||||
import docspell.query.FulltextExtract.Result
|
import docspell.query.FulltextExtract.Result
|
||||||
|
|
||||||
|
import munit._
|
||||||
|
|
||||||
class FulltextExtractTest extends FunSuite {
|
class FulltextExtractTest extends FunSuite {
|
||||||
|
|
||||||
def findFts(q: String): Result = {
|
def findFts(q: String): Result = {
|
||||||
|
@ -2,6 +2,7 @@ package docspell.query.internal
|
|||||||
|
|
||||||
import docspell.query.ItemQuery.Attr
|
import docspell.query.ItemQuery.Attr
|
||||||
import docspell.query.internal.AttrParser
|
import docspell.query.internal.AttrParser
|
||||||
|
|
||||||
import munit._
|
import munit._
|
||||||
|
|
||||||
class AttrParserTest extends FunSuite {
|
class AttrParserTest extends FunSuite {
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
package docspell.query.internal
|
package docspell.query.internal
|
||||||
|
|
||||||
import munit._
|
|
||||||
import cats.data.{NonEmptyList => Nel}
|
import cats.data.{NonEmptyList => Nel}
|
||||||
|
|
||||||
import docspell.query.internal.BasicParser
|
import docspell.query.internal.BasicParser
|
||||||
|
|
||||||
|
import munit._
|
||||||
|
|
||||||
class BasicParserTest extends FunSuite {
|
class BasicParserTest extends FunSuite {
|
||||||
test("single string values") {
|
test("single string values") {
|
||||||
val p = BasicParser.singleString
|
val p = BasicParser.singleString
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
package docspell.query.internal
|
package docspell.query.internal
|
||||||
|
|
||||||
import munit._
|
|
||||||
import docspell.query.Date
|
|
||||||
import java.time.Period
|
import java.time.Period
|
||||||
|
|
||||||
|
import docspell.query.Date
|
||||||
|
|
||||||
|
import munit._
|
||||||
|
|
||||||
class DateParserTest extends FunSuite with ValueHelper {
|
class DateParserTest extends FunSuite with ValueHelper {
|
||||||
|
|
||||||
test("local date string") {
|
test("local date string") {
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
package docspell.query.internal
|
package docspell.query.internal
|
||||||
|
|
||||||
import docspell.query.ItemQuery._
|
|
||||||
import munit._
|
|
||||||
import cats.data.{NonEmptyList => Nel}
|
import cats.data.{NonEmptyList => Nel}
|
||||||
|
|
||||||
|
import docspell.query.ItemQuery._
|
||||||
|
|
||||||
|
import munit._
|
||||||
|
|
||||||
class ExprParserTest extends FunSuite with ValueHelper {
|
class ExprParserTest extends FunSuite with ValueHelper {
|
||||||
|
|
||||||
test("simple expr") {
|
test("simple expr") {
|
||||||
|
@ -2,9 +2,10 @@ package docspell.query.internal
|
|||||||
|
|
||||||
import cats.implicits._
|
import cats.implicits._
|
||||||
|
|
||||||
import munit._
|
|
||||||
import docspell.query.ItemQueryParser
|
|
||||||
import docspell.query.ItemQuery
|
import docspell.query.ItemQuery
|
||||||
|
import docspell.query.ItemQueryParser
|
||||||
|
|
||||||
|
import munit._
|
||||||
|
|
||||||
class ItemQueryParserTest extends FunSuite {
|
class ItemQueryParserTest extends FunSuite {
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package docspell.query.internal
|
package docspell.query.internal
|
||||||
|
|
||||||
import munit._
|
|
||||||
//import cats.parse.{Parser => P}
|
|
||||||
import docspell.query.ItemQuery.Expr
|
import docspell.query.ItemQuery.Expr
|
||||||
|
|
||||||
|
import munit._
|
||||||
|
|
||||||
class MacroParserTest extends FunSuite {
|
class MacroParserTest extends FunSuite {
|
||||||
|
|
||||||
test("recognize names shortcut") {
|
test("recognize names shortcut") {
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
package docspell.query.internal
|
package docspell.query.internal
|
||||||
|
|
||||||
import munit._
|
|
||||||
import docspell.query.ItemQuery.{Operator, TagOperator}
|
import docspell.query.ItemQuery.{Operator, TagOperator}
|
||||||
import docspell.query.internal.OperatorParser
|
import docspell.query.internal.OperatorParser
|
||||||
|
|
||||||
|
import munit._
|
||||||
|
|
||||||
class OperatorParserTest extends FunSuite {
|
class OperatorParserTest extends FunSuite {
|
||||||
test("operator values") {
|
test("operator values") {
|
||||||
val p = OperatorParser.op
|
val p = OperatorParser.op
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
package docspell.query.internal
|
package docspell.query.internal
|
||||||
|
|
||||||
import cats.data.{NonEmptyList => Nel}
|
|
||||||
import docspell.query.ItemQuery._
|
|
||||||
import munit._
|
|
||||||
import docspell.query.Date
|
|
||||||
import java.time.Period
|
import java.time.Period
|
||||||
|
|
||||||
|
import cats.data.{NonEmptyList => Nel}
|
||||||
|
|
||||||
|
import docspell.query.Date
|
||||||
|
import docspell.query.ItemQuery._
|
||||||
|
|
||||||
|
import munit._
|
||||||
|
|
||||||
class SimpleExprParserTest extends FunSuite with ValueHelper {
|
class SimpleExprParserTest extends FunSuite with ValueHelper {
|
||||||
|
|
||||||
test("string expr") {
|
test("string expr") {
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
package docspell.query.internal
|
package docspell.query.internal
|
||||||
|
|
||||||
|
import java.time.Period
|
||||||
|
|
||||||
import docspell.query.Date
|
import docspell.query.Date
|
||||||
import docspell.query.ItemQuery._
|
import docspell.query.ItemQuery._
|
||||||
import java.time.Period
|
|
||||||
|
|
||||||
trait ValueHelper {
|
trait ValueHelper {
|
||||||
|
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
package docspell.store
|
package docspell.store
|
||||||
|
|
||||||
|
import scala.concurrent.ExecutionContext
|
||||||
|
|
||||||
import cats.effect._
|
import cats.effect._
|
||||||
|
|
||||||
import docspell.common.LenientUri
|
import docspell.common.LenientUri
|
||||||
import docspell.store.impl.StoreImpl
|
import docspell.store.impl.StoreImpl
|
||||||
|
|
||||||
import doobie._
|
import doobie._
|
||||||
import org.h2.jdbcx.JdbcConnectionPool
|
import org.h2.jdbcx.JdbcConnectionPool
|
||||||
|
|
||||||
import scala.concurrent.ExecutionContext
|
|
||||||
|
|
||||||
trait StoreFixture {
|
trait StoreFixture {
|
||||||
def withStore(db: String)(code: Store[IO] => IO[Unit]): Unit = {
|
def withStore(db: String)(code: Store[IO] => IO[Unit]): Unit = {
|
||||||
//StoreFixture.store(StoreFixture.memoryDB(db)).use(code).unsafeRunSync()
|
//StoreFixture.store(StoreFixture.memoryDB(db)).use(code).unsafeRunSync()
|
||||||
|
@ -2,13 +2,14 @@ package docspell.store.generator
|
|||||||
|
|
||||||
import java.time.LocalDate
|
import java.time.LocalDate
|
||||||
|
|
||||||
import docspell.store.records._
|
|
||||||
import munit._
|
|
||||||
import docspell.common._
|
import docspell.common._
|
||||||
import docspell.query.ItemQueryParser
|
import docspell.query.ItemQueryParser
|
||||||
import docspell.store.queries.AttachCountTable
|
|
||||||
import docspell.store.qb.DSL._
|
import docspell.store.qb.DSL._
|
||||||
import docspell.store.qb.generator.{ItemQueryGenerator, Tables}
|
import docspell.store.qb.generator.{ItemQueryGenerator, Tables}
|
||||||
|
import docspell.store.queries.AttachCountTable
|
||||||
|
import docspell.store.records._
|
||||||
|
|
||||||
|
import munit._
|
||||||
|
|
||||||
class ItemQueryGeneratorTest extends FunSuite {
|
class ItemQueryGeneratorTest extends FunSuite {
|
||||||
import docspell.store.impl.DoobieMeta._
|
import docspell.store.impl.DoobieMeta._
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
package docspell.store.qb
|
package docspell.store.qb
|
||||||
|
|
||||||
import munit._
|
|
||||||
import docspell.store.qb.model._
|
|
||||||
import docspell.store.qb.DSL._
|
import docspell.store.qb.DSL._
|
||||||
|
import docspell.store.qb.model._
|
||||||
|
|
||||||
|
import munit._
|
||||||
|
|
||||||
class QueryBuilderTest extends FunSuite {
|
class QueryBuilderTest extends FunSuite {
|
||||||
|
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
package docspell.store.qb.impl
|
package docspell.store.qb.impl
|
||||||
|
|
||||||
import munit._
|
|
||||||
import docspell.store.qb._
|
|
||||||
import docspell.store.qb.DSL._
|
import docspell.store.qb.DSL._
|
||||||
|
import docspell.store.qb._
|
||||||
import docspell.store.qb.model.{CourseRecord, PersonRecord}
|
import docspell.store.qb.model.{CourseRecord, PersonRecord}
|
||||||
|
|
||||||
|
import munit._
|
||||||
|
|
||||||
class ConditionBuilderTest extends FunSuite {
|
class ConditionBuilderTest extends FunSuite {
|
||||||
|
|
||||||
val c = CourseRecord.as("c")
|
val c = CourseRecord.as("c")
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
package docspell.store.qb.impl
|
package docspell.store.qb.impl
|
||||||
|
|
||||||
import munit._
|
|
||||||
import docspell.store.qb._
|
|
||||||
import docspell.store.qb.DSL._
|
import docspell.store.qb.DSL._
|
||||||
|
import docspell.store.qb._
|
||||||
import docspell.store.qb.model.{CourseRecord, PersonRecord}
|
import docspell.store.qb.model.{CourseRecord, PersonRecord}
|
||||||
|
|
||||||
|
import munit._
|
||||||
|
|
||||||
class DSLTest extends FunSuite {
|
class DSLTest extends FunSuite {
|
||||||
|
|
||||||
val course = CourseRecord.as("c")
|
val course = CourseRecord.as("c")
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
package docspell.store.qb.impl
|
package docspell.store.qb.impl
|
||||||
|
|
||||||
import munit._
|
import docspell.store.qb.DSL._
|
||||||
import docspell.store.qb._
|
import docspell.store.qb._
|
||||||
import docspell.store.qb.model._
|
import docspell.store.qb.model._
|
||||||
import docspell.store.qb.DSL._
|
|
||||||
|
import munit._
|
||||||
|
|
||||||
class SelectBuilderTest extends FunSuite {
|
class SelectBuilderTest extends FunSuite {
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package docspell.store.qb.model
|
package docspell.store.qb.model
|
||||||
|
|
||||||
import cats.data.NonEmptyList
|
import cats.data.NonEmptyList
|
||||||
|
|
||||||
import docspell.store.qb._
|
import docspell.store.qb._
|
||||||
|
|
||||||
case class CourseRecord(
|
case class CourseRecord(
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
package docspell.store.qb.model
|
package docspell.store.qb.model
|
||||||
|
|
||||||
import cats.data.NonEmptyList
|
import cats.data.NonEmptyList
|
||||||
import docspell.store.qb._
|
|
||||||
import docspell.common._
|
import docspell.common._
|
||||||
|
import docspell.store.qb._
|
||||||
|
|
||||||
case class PersonRecord(id: Long, name: String, created: Timestamp)
|
case class PersonRecord(id: Long, name: String, created: Timestamp)
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ object ZolaPlugin extends AutoPlugin {
|
|||||||
zolaBuild := {
|
zolaBuild := {
|
||||||
val logger = streams.value.log
|
val logger = streams.value.log
|
||||||
logger.info("Building web site using zola ...")
|
logger.info("Building web site using zola ...")
|
||||||
(Compile/resources).value
|
(Compile / resources).value
|
||||||
buildSite(zolaCommand.value, zolaRootDir.value, zolaOutputDir.value, None, logger)
|
buildSite(zolaCommand.value, zolaRootDir.value, zolaOutputDir.value, None, logger)
|
||||||
logger.info("Website built")
|
logger.info("Website built")
|
||||||
},
|
},
|
||||||
@ -43,7 +43,7 @@ object ZolaPlugin extends AutoPlugin {
|
|||||||
val logger = streams.value.log
|
val logger = streams.value.log
|
||||||
val baseurl = zolaTestBaseUrl.value
|
val baseurl = zolaTestBaseUrl.value
|
||||||
logger.info("Building web site (test) using zola ...")
|
logger.info("Building web site (test) using zola ...")
|
||||||
(Compile/resources).value
|
(Compile / resources).value
|
||||||
buildSite(
|
buildSite(
|
||||||
zolaCommand.value,
|
zolaCommand.value,
|
||||||
zolaRootDir.value,
|
zolaRootDir.value,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user