If a QC has failed in the past there will be a
record of it in raw_lines, raw_shots or preplot_points.
If that QC then stopped failing, e.g., because of a
change of parameters, then the QC results would correctly
reflect the change but not the line/shot tables and
hence, the event log.
This commit hopefully takes care of that.
The database upgrade script is updated to export
also user-entered data stored in columns of tables
containing also derived data, and to re-import
everything after the upgrade.
Unlike system_imports.py and system_exports.py, which
deal with whole tables via COPY, this allows us to
export / import *either* whole tables or specific
columns only.
The data will be exported to text files containing
the selected columns + the primary key columns for
the table.
When importing, those tables for which a selection
of columns was exported must already be populated.
The import process will overwrite the data of the
non primary key columns it knows about. If whole
tables are exported, on the other hand, when
re-importing rows will be appended rather than
updated. It is the user's responsibility to make
sure that this will not cause any conflicts.
The callback has the signature (err, res) where
res is the result object from the fetch() request
and err is non-null if an error occurred and fetch()
threw.
The callback is called before res.json() has had a
chance to run it is really not recommended to
consume the body from this callback as this will cause
an error in the API action itself.
Script meant to be run by runner.sh.
It will not overwrite existing files. If a
sequence is modified after the first export,
the resulting file needs to be removed by the
user before a re-export will occur.
The idea is to eventually export on demand
when a new raw is added to final_lines.
The events endpoint will return data in the format
agreed with Multiseis if the request has an
Accept: application/vnd.seis+json
header.
Related to #12.
The reason for refactoring was to accommodate
Multiseis / client sequence exports, which will be
served by this endpoint via a specific Content-Type.
In the process, the cache has been fixed and redesigned.
Related to #12.
This is not really a substitute for proper database
design but if deemed useful it might be refactored
into a more generic caching middleware and applied
to other requests as a low-cost alternative to
database refactoring while we gain usage and
performance information.
This is to enable the user to associate information, in
particular “QCAccepted” override labels, to individual
results. The information stays associated with tests
unless the data is removed or the results change (e.g.,
because the data was reprocessed or the test parameters
or algorithm were changed).