SciNim / Datamancer

A dataframe library with a dplyr like API
https://scinim.github.io/Datamancer/datamancer.html
MIT License
133 stars 7 forks source link

--panics:on causes dataframe test failure #51

Closed disruptek closed 1 year ago

disruptek commented 1 year ago

I need panics:on because I'm using CPS but when I enable it, a test fails to pass:

Traceback (most recent call last)
/home/adavidoff/git/datamancer/tests/testDf.nim(1508) testDf
/home/adavidoff/git/datamancer/src/datamancer/column.nim(1048) toNativeColumn
/home/adavidoff/nims/lib/std/assertions.nim(46) failedAssertImpl
/home/adavidoff/nims/lib/std/assertions.nim(36) raiseAssert
/home/adavidoff/nims/lib/system/fatal.nim(49) sysFatal
/home/adavidoff/nims/lib/system/fatal.nim(37) sysFatal
Error: unhandled exception: /home/adavidoff/git/datamancer/src/datamancer/column.nim(1048, 9) `cValue[i].kind == vKind` Column contains actual multiple datatypes! VString and VInt! [AssertionDefect]

I'm using v0.3.11 in commit 6d63164b015c58f9634e6095cda36698e52c0b7b.

Nim Compiler Version 1.9.3 [Linux: amd64]
Compiled at 2023-04-01
Copyright (c) 2006-2023 by Andreas Rumpf

git hash: 1c7fd717206c79be400f81a05eee771823b880ca
active boot switches: -d:release
Vindaar commented 1 year ago

Thanks for the report. I had never read up on --panics:on so far. I've been using doAssert in quite a few places where I should have used a catcheable exception. #52 should fix it.