Closed JSCU-CNI closed 6 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 80.46%. Comparing base (
523b96c
) to head (71e7a16
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This PR implements the
__hash__
functions for theRecord
class, enabling grouping records in sets. This enables set operations on collections of records, e.g:For some record types though, there will be fields that you might want to ignore, such as
_generated
and possibly_source
when comparing record output from two different targets. Preferably you want the fields to ignore to be configurable at runtime. Therefore, we opted to add an environment variableFLOW_RECORD_IGNORE
which can contain a list of comma-separated field names to ignore.We implemented a check where hashed records are considered 'immutable' and a
ValueError
is raised if a property is changed after__hash__
has been called on aRecord
instance. This may have some performance impact though. Feel free to suggest alternative approaches.