Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning from TableRex dependency #1063

Closed
billylanchantin opened this issue Feb 7, 2025 · 4 comments · Fixed by #1067
Closed

Warning from TableRex dependency #1063

billylanchantin opened this issue Feb 7, 2025 · 4 comments · Fixed by #1067

Comments

@billylanchantin
Copy link
Member

Explorer.DataFrame.print/2 uses the TableRex dependency. We're currently getting a warning from it:

iex> df = Explorer.Datasets.iris()
iex> Explorer.DataFrame.print(df)
warning: using map.field notation (without parentheses) to invoke function TableRex.Renderer.Text.default_options() is deprecated, you must add parentheses instead: remote.function()
  (table_rex 4.0.0) lib/table_rex/table.ex:267: TableRex.Table.render/2
  (table_rex 4.0.0) lib/table_rex/table.ex:280: TableRex.Table.render!/2
  (explorer 0.11.0-dev) lib/explorer/data_frame.ex:6036: Explorer.DataFrame.print/2
  (elixir 1.18.1) src/elixir.erl:386: :elixir.eval_external_handler/3
  (stdlib 6.1.2) erl_eval.erl:904: :erl_eval.do_apply/7

This warning is internal to TableRex. There's an issue about it with a fix:

But I get the sense that this project isn't maintained all that actively.

I see three options to address:

  1. Mitigate on our end by wrapping the call or something.
  2. Go with a different table displaying library. Scribe comes to mind.
  3. Write our own table displaying function.

Those are ordered by increasing difficulty. (3) in particular is a lot of work.

@philss
Copy link

philss commented Feb 8, 2025

Hi @billylanchantin!

If you decide to go with option 2, I have a new library that I've been working on for the past weeks: it's called TableKitty 🐈 .

I made it as an alternative to TableRex, but with a very different and compact API, and with an integration with Table. It's not documented yet, but I have examples in the tests cases.

I just released version 0.1.0 and I plan to continue polishing the options and documentation.

There is one example of how we would print an Explorer DF in the tests, but you could just do TableKitty.print(df) and it would print a basic version of the dataframe.

That said, it's totally fine if you decide to follow a different approach, or use another lib :)

@billylanchantin
Copy link
Member Author

Hey @philss,

Very cool! I've been thinking that a project exactly like that is needed for interop with Table.

I'm not sure we want to go with option 2 yet. But your lib has definitely jumped the queue.

@djm
Copy link

djm commented Feb 16, 2025

@billylanchantin TableRex just launched 4.1 which solves this.

Nice to see a new library in the space too @philss, good luck with it!

@billylanchantin
Copy link
Member Author

Thanks @djm! That fixed the problem :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants