gempy icon indicating copy to clipboard operation
gempy copied to clipboard

Improve saving/loading

Open Leguark opened this issue 4 years ago • 2 comments

Is your feature request related to a problem? Please describe. At the moment the saving and loading function is a bit of a mess.

Describe the solution you'd like Each Object we save - e.g. surfaces, surface points etc - should have a save and load method.

In the current save and load function we would just call those methods. This allows to easily scale the data that is saved.

Additional context

If many objects (I dont know surfaces and series) are saved exactly with the same code, we should create a class with the i/o logic that is inherited by those classes.

@javoha what do you think?

Leguark avatar Apr 27 '20 14:04 Leguark

Great reminder, so I would definitely agree that it is messy (sorry) and that we need a better solution. What you suggest definitely makes sense from a structural/coding perspective. I am still not sure how to save a model best: I used .npy files if I remember correctly but it was a little messy properly reconstructing the dataframes (with all dependencies) . Do you have a better idea for a saving format? Apart from that I am not entirely sure how important (confusing) it is for users to load single parts of the model (like series/surfaces) because that will probably get messy, right? If we have a nice api function though that should do it.

javoha avatar Apr 27 '20 16:04 javoha

I think by now csv files for the df are fine. Regarding saving individual objects, it is more for us to tidy up the code and test each individual piece than for the user that should have a similar experience as right now.

Important This issue is blocked by #396 is merged since I have move the location of several classes

Leguark avatar Apr 28 '20 06:04 Leguark