-
Notifications
You must be signed in to change notification settings - Fork 7
/
datamancer.nimble
60 lines (49 loc) · 1.87 KB
/
datamancer.nimble
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Package
version = "0.5.0"
author = "Vindaar"
description = "A dataframe library with a dplyr like API"
license = "MIT"
srcDir = "src"
# Dependencies
requires "nim >= 1.2.0"
requires "https://github.com/Vindaar/seqmath >= 0.2.1"
requires "arraymancer >= 0.7.30"
task test, "Run standard tests":
exec "nim c -r tests/testDf.nim"
exec "nim c -r tests/tests.nim"
exec "nim c -r tests/test_issue20.nim"
exec "nim c -r tests/test_issue28.nim"
exec "nim c -r tests/testsFormula.nim"
exec "nim c -r tests/testParse.nim"
# preview farm hash
if (NimMajor, NimMinor) >= (2, 1):
exec "nim c -r -d:nimPreviewHashFarm tests/testDf.nim"
exec "nim c -r -d:nimPreviewHashFarm tests/tests.nim"
exec "nim c -r -d:nimPreviewHashFarm tests/test_issue20.nim"
exec "nim c -r -d:nimPreviewHashFarm tests/test_issue28.nim"
exec "nim c -r -d:nimPreviewHashFarm tests/testsFormula.nim"
exec "nim c -r -d:nimPreviewHashFarm tests/testParse.nim"
task testJs, "Run test for JS":
exec "nim js -r tests/testdf_js_simple.nim"
import os, strutils, strformat
const
pkgName = "datamancer"
orgFile = "docs" / (pkgName & ".org")
rstFile = "docs" / (pkgName & ".rst")
rstFileAuto = "docs" / (pkgName & "_autogen.rst")
template canImport(x: untyped): untyped =
compiles:
import x
when canImport(docs / docs):
# can define the `gen_docs` task (docs already imported now)
# this is to hack around weird nimble + nimscript behavior.
# when overwriting an install nimble will try to parse the generated
# nimscript file and for some reason then it won't be able to import
# the module (even if it's put into `src/`).
task gen_docs, "Generate datamancer documentation":
# build the actual docs and the index
exec "pandoc " & orgFile & " -o " & rstFile
buildDocs(
"src/", "docs/",
defaultFlags = "--hints:off --warnings:off"
)