Closed wangyinz closed 8 months ago
I am not sure what to do with the error. The test that failed basically set starttime
in exclude_keys
. With the new changes, exclude_keys
do not work on starttime
and endtime
. While I don't think people would ever do that, it does complicates things as exclude_keys
now has exceptions.
Maybe those keys should be added in md2doc
? What do you think? @pavlis
Three attributes in wf documents are special and need to be handled with care. They are: starttime, endtime, and npts. The reason they are so special in MsPASS is that all three must be closely linked with three internal attributes that are part of the C++ class (attributes of the class): npts, dt, and t0. The endtime attribute is more of a sanity check as endtime is a method of BasicTimeSeries
that is the superclass of both TimeSeries
and Seismogram
. If we have tests listing any of these attributes int he exclude list the tests need to be changed.
These cannot be handled in md2doc. The reason is that the "md" in md2doc is for Metadata. The starttime attribute in Metadata can become disconnected with the value of the "t0" attribute in a TimeSeries or Seismogram. I think a problem can happen because one can set t0 with a constuct like d.t0=t
or d.set_to(t)
. The later resets the "starttime" Metadata field but the first does not. For that reason save_data
must force starttime. endtime is different because it is always derived, but is worse because i could also be stale when any of t0, npts, or dt change.
Attention: 1 lines
in your changes are missing coverage. Please review.
Comparison is base (
fd629f1
) 53.58% compared to head (0393d02
) 53.59%.
Files | Patch % | Lines |
---|---|---|
python/mspasspy/db/database.py | 92.30% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This is fixing #485 #484