JuliaData / DataFrames.jl

In-memory tabular data in Julia
https://dataframes.juliadata.org/stable/
Other
1.73k stars 367 forks source link

Storing display settings in Preferences.jl #3286

Open bkamins opened 1 year ago

bkamins commented 1 year ago

@nalimilan, @ronisbr, @pdeffebach - what would you say if we stored display settings for DataFrames.jl in Preferences.jl?

Now we use ENV, but it is a bit clumsy and not persistent. Additionally then we could allow users to set more preferences.

The downside is that display would be a bit less reproducible.

ronisbr commented 1 year ago

It would be awesome! Many years ago I tried to develop a similar system in PrettyTables to store pre-defined keyword parameters. However, when I tried, I could not manage to make it work without affect the TTFX by a huge margin. I think it is time to revisit this :)

bkamins commented 1 year ago

Yes - this was also my thought that maybe these settings could be on PrettyTables.jl level (and not only on DataFrames.jl level). Let us wait and see what others think (we have ~5 months to decide, as I am aiming at mating 1.6 release for JuliaCon2023).

nalimilan commented 1 year ago

I agree that sounds like a better mechanism than environment variables. Though this part of the docs is a bit worrying:

Preferences that are accessed during compilation are automatically marked as compile-time preferences, and any change recorded to these preferences will cause the Julia compiler to recompile any cached precompilation .ji files for that module.

With extensive precompilation, does that mean that changing preferences will require recompilation? That would sound absurd in our case.

bkamins commented 1 year ago

I would assume that only compile-time preferences would cause recompilation. @timholy - could you please confirm? Thank you!

timholy commented 1 year ago

Indeed, runtime preferences do not force recompilation. Display preferences are much better as runtime preferences (you can change them on-the-fly), so I think you're fine.