Open MoralCode opened 3 years ago
it may also be good to have parser classes or methods for both a dataset as a whole, as well as individual records, then these parsers can act as a kind of "wrapper" around each entry in the database so the actions can perform operations on a per-record basis without worrying about the internal format
the basic idea is that actions should be able to just request the kind of data ("what") they need (has available vaccines, coordinates, address .etc) and the parser's job is to focus on the "how to get it" part in order to abstract away the actual parsing.
This might require getting sample data from various projects and datasources to see what information comes up the most.
one form this could take is some kind of "universal mapping" or registry where there's one big dictionary defined internally that has a set of keys that every action uses to refer to data. this mapping dict would then keep a list of the corresponding data (and how to access it) for each key (and data format being parsed)