DerivedMeasurements: add process_raw() + doc updates
- Add process_raw() method to the API. This is inteneded to be invoked
on any raw output (i.e. not MeasurmentCsv) generated by an Instrument.
- Both process() process_raw() are portional to be overriden by
impolementation; the default behavior is to return an empty list.
- The output specification for both is extened to allow
MeasurementCsv's, as well as DerivedMetric's.
- Documentation has been reworded for clarity.
diff --git a/devlib/derived/__init__.py b/devlib/derived/__init__.py
index 5f7dc6e..24ac060 100644
--- a/devlib/derived/__init__.py
+++ b/devlib/derived/__init__.py
@@ -53,6 +53,8 @@
class DerivedMeasurements(object):
- @staticmethod
- def process(measurements_csv):
- raise NotImplementedError()
+ def process(self, measurements_csv):
+ return []
+
+ def process_raw(self, *args):
+ return []