First adds the very basics of the Experiment wrapper type, then adds the interface for AxisExperimentQuery.
To elaborate on this from the commit message:
Because there is no TileDB-specific behavior in ExperimentAxisQuery, I believe we can actually pull the entire implementation here (it only uses the properties of Experiment itself) but that is for a later date.
I think this may actually be necessary—because of the “wrap, don’t extend” design of the Measurement and Experiment types (where they are implemented to be a proxy around any existing Collection rather than to be subclassed as a separate parent of a concrete Collection implementation), we want to provide the implementation so that in the SOMA library, it looks like:
# inside the SOMA implementation
exp_collection = load_collection()
soma_exp = somacore.Experiment(exp_collection)
# what the user does
query = soma_exp.axis_query(...)
An implementation could implement their own specialization of the axis query and experiment:
class SpecialExperiment(somacore.Experiment):
# This is OK provided that SpecialAxisQuery is a subclass of AxisQuery.
def axis_query(self, ...) -> SpecialAxisQuery:
...
This is still a useful place to get started, though.
First adds the very basics of the
Experiment
wrapper type, then adds the interface forAxisExperimentQuery
.To elaborate on this from the commit message:
I think this may actually be necessary—because of the “wrap, don’t extend” design of the
Measurement
andExperiment
types (where they are implemented to be a proxy around any existingCollection
rather than to be subclassed as a separate parent of a concreteCollection
implementation), we want to provide the implementation so that in the SOMA library, it looks like:An implementation could implement their own specialization of the axis query and experiment:
This is still a useful place to get started, though.