The list of modules retrieved from a `Target` may include configuration
as a dictionary. This helper function will produce a set of only the
module names allowing for comparison.
When updating a ParameterDict with another ParameterDict the unencoded
values were being merged. Ensure consistent behaviour by implicitally
iterating via `__iter__` which will cause ParameterDict values to be
decoded before being re-endcoded as expected.
Fix warnings reported when running unit tests via pytest.
- Rename TestDevice to MockDevice, so that it is not interpreted as a
test case.
- Fix collections abstract base class imports.
- Add an ini file to ignore the same from "past".
Improve checking of whether cpu idle state information is available for
processing.
Add debug message to inform user if the cpuidle module is not detected
on the target.
In the case of an empty iterable an empty string would be returned
however this was not an valid value so ensure that the brackets are
always inserted into the output.
Include missing `flatten_mapping` call in our implementation of
`construct_mapping`. This is performed by a subclass in the default
implementation which was missing in our previous fix.
When attempting to access the message of a exception check not only that
e.args is populated, but also that e.args[0] actually contains
something, before defaulting to str(e).
In newer versions of PyYAML we need to manually specify the `Loader` to
be used as per https://msg.pyyaml.org/load.
`FullLoader` is now the default loader which attempts to avoid arbitrary
code execution, however if we are running an older version where this is
not available default back to the original Loader.
Add a new mix-in class for classes that are serialized to PODs, the aim
of this class is to provide a way to ensure that both the original data
version and the current serialization version are known. When attempting
to de-serialize a POD the serialization version will be compared to the
latest version in WA if not matching will call the appropriate method to
upgrade the pod to a known structure state populating any missing fields
with a sensible default or converting the existing data to the new
format.
- change magic string literal to a b'' string so that the comparison
works in python 3
- expand timestamp tuples (struct.unpack always returns a tuple) before
attempting to cast to float.
The Output processor which is used to upload the results found in the
wa_output folder to a Postgres database, whose schema is defined by the
WA Create Database command.
- Change how "source" and "dest" are handled inside merge() to be more
sane and less confusing, ensuring that disabling toggles are merged
correctly.
- Do not drop disabling values during merge, to ensure that merging
is a transitive operation.
- Add unit tests for the above fixes.
- Add copyright headers to files that did not already have them
- Update the year to the last year the file was modified in files with
existing headers.