DrWatson.jl: How to put a float 1e15 in the name? and how to save txt files?

Olivier_Merchiers
Mon, 09 Nov 2020 23:59:41 +0000
General Usage

Hello everyone?
As the title says, it’s a DrWatson.jl related question.
Actually, I have 2 questions

Question 1

Let’s say I have

julia> using DrWatson
julia> params = Dict(:a=>1e15, :b=>1:23)
Dict{Symbol,Any} with 2 entries:
  :a => 1.0e15
  :b => 1:23

And now when I make the file name using the function savename, I get:

julia> savename(params,"bson")
"a=1000000000000000.bson"

which obviously I would prefer to be

"a=1.0e15.bson"

Using the scientific keyword is of no help:

julia> savename(params,"bson"; scientific =3)
"a=1000000000000000.bson"

A similar topic was discussed in this issue

Any help would be greatly appreciated.

Question 2

Are people using DrWatson to save txt files or csv files?
The workflow works very well for BSON files, but if anyone is using other file formats like txt or csv, I would love to see it.
This question comes from the fact that I cannot use the function savename directly in writedlm from DelimitedFiles since the directories will not be created automatically.

Thanks again,
Olivier

3 posts - 2 participants