I'd like to also parse HY3 files. The problem is that I can't just add new records to models.py: for example HY3's have a similar but incompatible B1 record, so it's not possible to wedge the new models into the existing code.
So what I'd like is instead of having a single global registry REGISTERED_MODELS, to support multiple registries. I've given it a quick look, and I think that if @model and decode_records (and maybe a few others, as pass-throughs) took a registry parameter (name to be bike-shedded) that defaults to REGISTERED_MODELS, then I could create an independent set of models, in another registry, and leverage the rest of the code to parse HY3 files.
How does that sound? If it's okay, I'll work up a patch as I work on my HY3 parsing.
I'd like to also parse HY3 files. The problem is that I can't just add new records to models.py: for example HY3's have a similar but incompatible B1 record, so it's not possible to wedge the new models into the existing code.
So what I'd like is instead of having a single global registry
REGISTERED_MODELS
, to support multiple registries. I've given it a quick look, and I think that if@model
anddecode_records
(and maybe a few others, as pass-throughs) took aregistry
parameter (name to be bike-shedded) that defaults toREGISTERED_MODELS
, then I could create an independent set of models, in another registry, and leverage the rest of the code to parse HY3 files.How does that sound? If it's okay, I'll work up a patch as I work on my HY3 parsing.