Open ml-evs opened 3 years ago
One important problem with the current mapper: it does not cache the values it scrapes from the schema, which will be re-resolved for every request. This is a drawback of the current class-level definitions. Options:
NB: this is the advantage of using the Quantity
approach we have now, as the un-cached properties are only touched on FilterTransformer
init and are then baked into the quantities themselves
Have pushed a metaclass mapper implementation to 51d54a0795b70a19af8cf65eceeaaa81a3fe3419, will see how it goes
Following on from discussions with @markus1978 and @CasperWA in #797, we should consider refactoring much of the functionality provided by the
Quantity
class into the base entry resource mapper.Originally posted by @CasperWA in https://github.com/Materials-Consortia/optimade-python-tools/pull/797#r636050872