Switch from .ini to TOML?
Following !244 (merged) , we will now have two file formats that we use in Gargantext to manage configuration files, one is via the standard .ini and one via TOML.
I have decided to introduce TOML because has better supports for more data types (like lists, for example) and there is a richer ecosystem on the Haskell side, with libraries like tomland (which we are now using) and even dhall-toml to effortlessly switch between Dhall and Toml.
Even our old .ini
file could be rewritten. Toml has support for maps, so sections like the [nlp] could be rewritten in a neater way:
[nlp]
languages = { en = "..", fr = "...", all = "..." }
The advantage of this being a map means that we can iterate over all its values, and we don't forget to handle new configuration values if we were to add a new language in the future, and this is just one practical example.