In #32 we outsourced the creation of ParserResults to the parsers, and ProvDAG no longer defines the behavior that produces its data locally. This is way more flexible and extensible, but separates the data collection from the ProvDAG object that guarantees certain data be present.
Should ProvDAG vet that e.g. every node has non-Null node_data and has_provenance attributes? Alternately, maybe we can enforce this in the Parser ABC. The only machinery currently making ProvNodes is in archive_parser, so there's no real risk right now, but because we can now write and plug in arbitrary parsers here, the door is no longer closed to introduced breaches of that guarantee.
In #32 we outsourced the creation of ParserResults to the parsers, and ProvDAG no longer defines the behavior that produces its data locally. This is way more flexible and extensible, but separates the data collection from the ProvDAG object that guarantees certain data be present.
Should ProvDAG vet that e.g. every node has non-Null
node_data
andhas_provenance
attributes? Alternately, maybe we can enforce this in the Parser ABC. The only machinery currently making ProvNodes is in archive_parser, so there's no real risk right now, but because we can now write and plug in arbitrary parsers here, the door is no longer closed to introduced breaches of that guarantee.