scicloj / tablecloth

Dataset manipulation library built on the top of tech.ml.dataset
https://scicloj.github.io/tablecloth
MIT License
305 stars 27 forks source link

Which versions of `dtype-next` does tablecloth support? #103

Closed teodorlu closed 1 year ago

teodorlu commented 1 year ago

Hi!

I'm having trouble using scicloj/tablecloth {:mvn/version "6.103.1"} with cnuernber/dtype-next {:mvn/version "10.000-beta-39"}.

$ cat deps.edn
{:deps {scicloj/tablecloth {:mvn/version "6.103.1"}
        cnuernber/dtype-next {:mvn/version "10.000-beta-39"}}
 :aliases {}}
$ clj
Clojure 1.11.1
user=> (require '[tablecloth.api :as tc])
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Execution error (FileNotFoundException) at tech.v3.dataset.dynamic-int-list/eval12413$loading (dynamic_int_list.clj:1).
Could not locate com/github/ztellman/primitive_math__init.class, com/github/ztellman/primitive_math.clj or com/github/ztellman/primitive_math.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.

I realize that beta versions of dtype-next might be a bit of a moving target.

Do you have a recommendation on which versions of dtype-next I should stick to?

I wanted to use cnuernber/dtype-next {:mvn/version "10.000-beta-39"} because it works with ham_fisted.Transformables/toDoubleReductionFn from cnuernber/ham-fisted. As far as I can tell, tablecloth seems to get dtype-next 10.000-beta-35 by default (which works just fine for me), but dtype-next 10.000-beta-39 causes problems.

Also, taking the chance to say thanks for tablecloth. I really like the API!

teodorlu commented 1 year ago

if I try to bump tech.ml.dataset (#104), I get a failing test:

$ lein test
If there are a lot of uncached dependencies this might take a while ...
WARNING: update-keys already refers to: #'clojure.core/update-keys in namespace: io.aviso.exception, being replaced by: #'io.aviso.exception/update-keys

FAIL dataset-creation at (dataset_test.clj:25)
Expected:
[[999] "Single value"]
Actual:
[nil "Single value"]
Diffs: in [0] expected [999], was nil
Mar 23, 2023 12:01:35 AM clojure.tools.logging$eval676$fn__679 invoke
WARNING: Column has no values and strategy (:value) is dependent upon existing values
Mar 23, 2023 12:01:35 AM clojure.tools.logging$eval676$fn__679 invoke
WARNING: Column has no values and strategy (:mid) is dependent upon existing values

lein test user

Ran 0 tests containing 0 assertions.
0 failures, 0 errors.
lein test  20,10s user 0,72s system 128% cpu 16,218 total

Looks like it's this test:

      (fact ((juxt #(get % 0) api/dataset-name)
             (api/dataset 999 {:single-value-column-name ""
                               :dataset-name             "Single value"}))
            => [[999] "Single value"])
genmeblog commented 1 year ago

Try to add techascent/tech.ml.dataset {:mvn/version "7.000-beta-31"} instead of dtype-next (bumping only dtype-next is risky).

genmeblog commented 1 year ago

Ok, I see that it doesn't help. Temporarily you can try to use bumped version. I'll verify what's going on (probably some regression)

teodorlu commented 1 year ago

OK - thank you!

genmeblog commented 1 year ago

also: lein midje is valid test call (we switched to midje at some point).

teodorlu commented 1 year ago

OK :+1:

I found this in the README:

  1. Before commiting changes please perform tests. I ususally do: lein do clean, check, test and build documentation as described above (which also tests whole library).

https://github.com/teodorlu/tablecloth/blob/8c7cb8296b977bb2ec441e5fd72d272a1b3a52de/README.md#L138-L140

genmeblog commented 1 year ago

Haha, indeed. Subject to change. Help needed! PR welcome :)

teodorlu commented 1 year ago

I was a bit hesitant to try make any large changes without any experience, so perhaps stick to a simple PR for now? :smile:

https://github.com/scicloj/tablecloth/pull/105

genmeblog commented 1 year ago

No worries :) I'll dig this issue with singleton.

genmeblog commented 1 year ago

Bug fixed and version bumped.