default save history for Database revision #449
pavlis
started this conversation in
Design & Development
Replies: 1 comment
-
yes, we should provide that option, which will mirror the one in read_data: mspass/python/mspasspy/db/database.py Line 337 in 23898f4 I think keeping the default as true is probably better. It wouldn't hurt to save the history even if users don't want it, but it will hurt in the opposite. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is a minor issue for the new Database implementation, but worth preserving for the record. As you know I've been cleaning up duplicate code in the
Database
class. In the process as noted elsewhere I've been pushing to deprecate the functions that explicitly tag ensembles and simply reads and writes to two core method of Database:save_data
andread_data
.With that background a simple question comes up. The current version of
Database
will always save any object-level history stored in aTimeSeries
orSeismogram
within theProcessingHistory
container. The user has no choice. If the container has data it will be saved. I made a choice to add a new boolean argument tosave_data
with the obvious namesave_history
. The function is backward compatible with the current version ofsave_data
when I set the default to True. Several tests failed when I initially set the default False. From the above that would be expected, but I didn't remember that feature of the current implementation and the errors were baffling for a while.So there are two points I want to preserve here for the record:
Beta Was this translation helpful? Give feedback.
All reactions