mirror of
https://github.com/facebook/duckling.git
synced 2024-09-11 21:27:13 +03:00
Move tests to tests and exes to exe
Summary: This works around https://github.com/haskell/cabal/issues/4350 If we don't do this files get compiled multiple times and cabal is unhappy. Reviewed By: patapizza Differential Revision: D4782749 fbshipit-source-id: 5bbe425
This commit is contained in:
parent
02e74cacd6
commit
bd94622f64
11
README.md
11
README.md
@ -16,16 +16,11 @@ A Haskell environment is required. We recommend using
|
||||
To compile and run the binary:
|
||||
```
|
||||
$ stack build
|
||||
$ stack exec duckling-example-exec
|
||||
$ stack exec duckling-example-exe
|
||||
```
|
||||
The first time you run it, it will download all required packages.
|
||||
|
||||
To run a source file directly (after compiling once):
|
||||
```
|
||||
$ stack ExampleMain.hs
|
||||
```
|
||||
|
||||
See `ExampleMain.hs` for an example on how to integrate Duckling in your
|
||||
See `exe/ExampleMain.hs` for an example on how to integrate Duckling in your
|
||||
project.
|
||||
|
||||
## Supported dimensions
|
||||
@ -50,7 +45,7 @@ Duckling supports many languages, but most don't support all dimensions yet
|
||||
## Extending Duckling
|
||||
To regenerate the classifiers and run the test suite:
|
||||
```
|
||||
$ stack RegenMain.hs && stack test
|
||||
$ stack exec duckling-regen-exe && stack test
|
||||
```
|
||||
|
||||
It's important to regenerate the classifiers after updating the code and before
|
||||
|
@ -454,6 +454,7 @@ library
|
||||
test-suite duckling-test
|
||||
type: exitcode-stdio-1.0
|
||||
main-is: TestMain.hs
|
||||
hs-source-dirs: tests
|
||||
build-depends: duckling
|
||||
, base >= 4.8.2 && < 5.0
|
||||
, attoparsec >= 0.13.1.0 && < 0.14
|
||||
@ -557,6 +558,7 @@ test-suite duckling-test
|
||||
|
||||
-- Ordinal
|
||||
, Duckling.Ordinal.AR.Tests
|
||||
, Duckling.Ordinal.DA.Tests
|
||||
, Duckling.Ordinal.DE.Tests
|
||||
, Duckling.Ordinal.EN.Tests
|
||||
, Duckling.Ordinal.ET.Tests
|
||||
@ -638,6 +640,7 @@ test-suite duckling-test
|
||||
|
||||
executable duckling-regen-exe
|
||||
main-is: RegenMain.hs
|
||||
hs-source-dirs: exe
|
||||
ghc-options: -threaded -rtsopts -with-rtsopts=-N
|
||||
other-modules: Duckling.Ranking.Train
|
||||
, Duckling.Ranking.Generate
|
||||
@ -664,6 +667,7 @@ executable duckling-regen-exe
|
||||
|
||||
executable duckling-example-exe
|
||||
main-is: ExampleMain.hs
|
||||
hs-source-dirs: exe
|
||||
ghc-options: -threaded -rtsopts -with-rtsopts=-N
|
||||
other-modules: Duckling.Data.TimeZone
|
||||
build-depends: duckling
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user